Port autogen.sh hook creation to Apple Git

* autogen.sh: Do not assume that the hook samples exist.
This ports to git version 1.9.3 (Apple Git-50).
For some reason Apple decided to populate the git hooks directory
in a different way from the way that standard Git does it.
The downside is that patch applications won't be checked on Apple,
but that's better than autogen.sh failing.
Problem reported by Sam Steingold in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00898.html
This commit is contained in:
Paul Eggert 2015-01-26 22:34:25 -08:00
parent b28c81bcf2
commit 589094a489
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,15 @@
2015-01-27 Paul Eggert <eggert@cs.ucla.edu>
Port autogen.sh hook creation to Apple Git
* autogen.sh: Do not assume that the hook samples exist.
This ports to git version 1.9.3 (Apple Git-50).
For some reason Apple decided to populate the git hooks directory
in a different way from the way that standard Git does it.
The downside is that patch applications won't be checked on Apple,
but that's better than autogen.sh failing.
Problem reported by Sam Steingold in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00898.html
2015-01-26 Paul Eggert <eggert@cs.ucla.edu>
* INSTALL.REPO: Mention minimum Git version.

View file

@ -226,6 +226,7 @@ if test -d .git/hooks; then
tailored_hooks="$tailored_hooks $hook"
done
for hook in applypatch-msg pre-applypatch; do
test ! -r .git/hooks/$hook.sample ||
cmp .git/hooks/$hook.sample .git/hooks/$hook >/dev/null 2>&1 ||
sample_hooks="$sample_hooks $hook"
done