pre-commit.hook: mention need to run git add after fixing the indentation
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 2 Aug 2009 13:43:04 +0000 (14:43 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 2 Aug 2009 16:06:04 +0000 (17:06 +0100)
hooks/pre-commit.hook

index 4d4682d..02641bf 100755 (executable)
@@ -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