From 74bff5af804817372aece931c792b53c8ec534e1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 13 May 2009 01:56:54 +0200 Subject: 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 --- autogen.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autogen.sh b/autogen.sh index 76561338..bf53b277 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." -- cgit