aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xdev/tools/pre-commit4
1 files changed, 1 insertions, 3 deletions
diff --git a/dev/tools/pre-commit b/dev/tools/pre-commit
index 7718b26d5..ce8bc67df 100755
--- a/dev/tools/pre-commit
+++ b/dev/tools/pre-commit
@@ -4,9 +4,7 @@
set -e
-# NB: even though we use --cached it seems to exit code 1 with
-# unstaged whitespace errors. That just means they get fixed though.
-if git diff-index --check --cached HEAD --quiet;
+if git diff-index --check --cached HEAD >/dev/null 2>&1 ;
then
:
else