summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-05-13 01:56:54 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-20 02:09:32 +0200
commit74bff5af804817372aece931c792b53c8ec534e1 (patch)
tree62980d7557ca8673428205e1cb96aa013292c799
parentcbf0874f018c6ddd831de26b1ac5bcf7b517e2da (diff)
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
-rwxr-xr-xautogen.sh6
1 files changed, 6 insertions, 0 deletions
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."