From 792d198f3f694e5475d1467b5ae9371a23baf7a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 2 Aug 2009 14:43:04 +0100 Subject: [PATCH] pre-commit.hook: mention need to run git add after fixing the indentation --- hooks/pre-commit.hook | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.7.4