From: Lennart Poettering Date: Tue, 12 May 2009 23:56:54 +0000 (+0200) Subject: git: enable whitespace checking commit hook during in autogen.sh X-Git-Tag: dbus-1.3.0~4^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74bff5af804817372aece931c792b53c8ec534e1;p=thirdparty%2Fdbus.git git: enable whitespace checking commit hook during in autogen.sh Trailing whitespace sucks. This change modifies autogen.sh to activate the example pre-commit that ships with git. It will make sure that from then on no further commits with trailing whitespace can be made --- diff --git a/autogen.sh b/autogen.sh index 76561338d..bf53b2770 100755 --- a/autogen.sh +++ b/autogen.sh @@ -13,6 +13,12 @@ FILE=dbus-1.pc.in DIE=0 +if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then + echo "Activating pre-commit hook." + cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit + chmod -c +x .git/hooks/pre-commit +fi + (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have autoconf installed to compile $PROJECT."