aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/pre-commit5
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