diff options
author | Jim Meyering <meyering@fb.com> | 2016-08-12 11:17:26 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2016-08-13 21:56:16 -0700 |
commit | b3def738f3b435cbe6f2a8406bae5a71175a0b80 (patch) | |
tree | a984782eeab1f99f25a5bf7950cc6f71fbbf67fd /Makefile.am | |
parent | 1a0df4396ebe3b9a58b882bb976cfce3f50d3cac (diff) | |
download | diffutils-b3def738f3b435cbe6f2a8406bae5a71175a0b80.tar.gz |
maint: require that commit messages be of a certain form
* bootstrap.conf (bootstrap_epilogue): Merge from coreutils, so that
a local commit hook will now help enforce consistent commit messages.
* Makefile.am (check-git-hook-script-sync): New rule, largely copied
from coreutils.
* scripts/git-hooks/commit-msg: New file, from coreutils, but
with adapted list of program names.
* scripts/git-hooks/applypatch-msg: New file, from git.
* scripts/git-hooks/pre-applypatch: Likewise.
* scripts/git-hooks/pre-commit: Likewise.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 244024e..edee5fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,3 +42,17 @@ gen-ChangeLog: ALL_RECURSIVE_TARGETS += distcheck-hook distcheck-hook: $(MAKE) my-distcheck + +# Some of our git hook scripts are supposed to be identical to git's samples. +# See if they are still in sync. +.PHONY: check-git-hook-script-sync +check-git-hook-script-sync: + @fail=0; \ + t=$$(mktemp -d) \ + && cd $$t && git init -q && cd .git/hooks \ + && for i in pre-commit pre-applypatch applypatch-msg; do \ + diff -u $(abs_top_srcdir)/scripts/git-hooks/$$i $$i.sample \ + || fail=1; \ + done; \ + rm -rf $$t; \ + test $$fail = 0 |