Permalink
Browse files

Adding more helpful trailing-whitespace error message to pre-commit h…

…ook.
  • Loading branch information...
1 parent 0610126 commit a7f5baea4401766517274d70d8148a6ba0d47dc1 @jlebar jlebar committed Jul 1, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 pre-commit
View
9 pre-commit
@@ -33,7 +33,12 @@ if ! git diff-index --check --cached $against --; then
echo
echo "Error: Trailing whitespace in commit."
echo
- echo "Try git rebase --whitespace=fix, or, if you really want to proceed,"
- echo "commit with --no-verify."
+ echo "You can automagically fix trailing whitespace with: "
+ echo
+ echo " git commit -a --no-verify -m TEMP"
+ echo " git rebase --whitespace=fix HEAD^"
+ echo " git reset HEAD^"
+ echo
+ echo "If you really want to proceed, commit with --no-verify."
exit 2
fi

0 comments on commit a7f5bae

Please sign in to comment.