summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-02 14:43:04 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-02 17:06:04 +0100
commit792d198f3f694e5475d1467b5ae9371a23baf7a3 (patch)
treee3989ffd2e529a31c0637165e32776ec7a0de9d2
parentac26f5b34e124580d7591bd7a1b28799910694fc (diff)
pre-commit.hook: mention need to run git add after fixing the indentation
-rwxr-xr-xhooks/pre-commit.hook10
1 files changed, 9 insertions, 1 deletions
diff --git a/hooks/pre-commit.hook b/hooks/pre-commit.hook
index 4d4682d..02641bf 100755
--- a/hooks/pre-commit.hook
+++ b/hooks/pre-commit.hook
@@ -61,7 +61,15 @@ for file in `git-diff-index --cached --name-only HEAD --diff-filter=ACMR| grep "
rm "${newfile}"
rm "${nf}"
if [ $r != 0 ] ; then
-echo "Code style error in $file, please fix before commiting."
+echo "================================================================================================="
+echo " Code style error in: $file "
+echo " "
+echo " Please fix before committing. Don't forget to run git add before trying to commit again. "
+echo " If the whole file is to be committed, this should work (run from the top-level directory): "
+echo " "
+echo " gst-indent $file; git add $file; git commit"
+echo " "
+echo "================================================================================================="
exit 1
fi
done