diff options
Diffstat (limited to 'util/git-hooks/pre-commit')
-rwxr-xr-x | util/git-hooks/pre-commit | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/git-hooks/pre-commit b/util/git-hooks/pre-commit new file mode 100755 index 0000000..dbccb9e --- /dev/null +++ b/util/git-hooks/pre-commit @@ -0,0 +1,9 @@ +#!/bin/sh +# +# A hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. + +# Check for whitespace errors +git diff-index --check --cached HEAD -- || exit 1 |