Re: [Openvpn-devel] [PATCH v2] Add git pre-commit hook script to uncrustify

2022-04-21 Thread Heiko Hund
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=

Re: [Openvpn-devel] [PATCH v2] Add git pre-commit hook script to uncrustify

2022-04-21 Thread Frank Lichtenheld
> 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 $(

[Openvpn-devel] [PATCH v2] Add git pre-commit hook script to uncrustify

2022-04-21 Thread Heiko Hund
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