summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-12-12 14:54:30 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-12 14:55:59 -0800
commit3e651e3c6b241eaeab70e63c267366e9678b6b52 (patch)
treee5662f7755e9d7f3cd58aa794f0c402bb056e1fe /build-aux
parent27cada035a79b633e856a437dd0e037acc1d61c6 (diff)
downloademacs-3e651e3c6b241eaeab70e63c267366e9678b6b52.tar.gz
* build-aux/git-hooks/pre-commit: Add whitespace comment.
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/git-hooks/pre-commit8
1 files changed, 8 insertions, 0 deletions
diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit
index 5a512442b18..3709784fd13 100755
--- a/build-aux/git-hooks/pre-commit
+++ b/build-aux/git-hooks/pre-commit
@@ -45,4 +45,12 @@ for new_name in `$git_diff HEAD`; do
esac
done
+# The '--check' option of git diff-index makes Git complain if changes
+# introduce whitespace errors. This can be a pain when editing test
+# files that deliberately contain lines with trailing whitespace.
+# To work around the problem you can run a command like 'git config
+# core.whitespace -trailing-space'. It may be better to revamp the
+# tests so that trailing spaces are generated on the fly rather than
+# being committed as source.
+
exec git diff-index --check --cached HEAD --