On Donnerstag, 21. April 2022 16:20:14 CEST Frank Lichtenheld wrote:
> > Heiko Hund hat am 21.04.2022 15:58 geschrieben:
> [...]
>
> > +ROOTDIR=$(git rev-parse --show-toplevel)
> > +
> > +# If called so, install this script as pre-commit hook
> > +if [ "$1" = "install" ] ; then
> > +HOOKSDIR=
> Heiko Hund hat am 21.04.2022 15:58 geschrieben:
[...]
> +ROOTDIR=$(git rev-parse --show-toplevel)
> +
> +# If called so, install this script as pre-commit hook
> +if [ "$1" = "install" ] ; then
> +HOOKSDIR="$ROOTDIR/$(git rev-parse --git-path hooks)"
Hmm, no. While in a default install $(
The script is self installing if you call it with "install" as the first
parameter. Once installed as the pre-commit hook it will check files to
be committed according to the rules in uncrustify.conf and abort the
commit if there's formatting issues. The script produces a patch in /tmp
which can be