diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-12 22:23:09 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-12 22:23:09 +0100 |
commit | 7bd653dada12e0f12f081ea9cccdf85a728052cd (patch) | |
tree | 05eaf743b165644f8a2c97353db1b63ac9e03fbc /Makefile.am | |
parent | 635bcd0d19a1f8d16cb74eac3cdbf1c2694063ed (diff) | |
download | coreutils-7bd653dada12e0f12f081ea9cccdf85a728052cd.tar.xz |
maint: add rule to ensure that our commit hook copies are up to date
* Makefile.am (check-git-hook-script-sync): New rule -- not used
anywhere, because it depends on having very recent git.
* scripts/git-hooks/pre-applypatch: New file.
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 1ec2b3605..716cbdde1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -155,3 +155,17 @@ THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version echo; \ printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \ } > $@-t && mv $@-t $@ + +# 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 $(abs_top_srcdir)/scripts/git-hooks/$$i $$i.sample \ + || fail=1; \ + done; \ + rm -rf $$t; \ + test $$fail = 0 |