diff options
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-x | tools/pre-commit | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/pre-commit b/tools/pre-commit index 46fe838655..234b6c5a9d 100755 --- a/tools/pre-commit +++ b/tools/pre-commit @@ -11,6 +11,11 @@ # If there are whitespace errors, print the offending file names and fail. (from git pre-commit.sample) exec git diff-index --check --cached HEAD +# Check for newer versions of the pre-commit script +if [ ./.git/hooks/pre-commit -ot ./tools/pre-commit ] ; then + echo "Pre-commit hook script is outdated, please update!" +fi + for FILE in `git diff-index --cached --name-only HEAD` ; do #Exit immediately if a command exits with a non-zero status. set -e |