summaryrefslogtreecommitdiff
path: root/scripts/git-hooks
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-12 22:23:09 +0100
committerJim Meyering <meyering@redhat.com>2011-11-12 22:23:09 +0100
commit7bd653dada12e0f12f081ea9cccdf85a728052cd (patch)
tree05eaf743b165644f8a2c97353db1b63ac9e03fbc /scripts/git-hooks
parent635bcd0d19a1f8d16cb74eac3cdbf1c2694063ed (diff)
downloadcoreutils-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 'scripts/git-hooks')
-rwxr-xr-xscripts/git-hooks/pre-applypatch14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/git-hooks/pre-applypatch b/scripts/git-hooks/pre-applypatch
new file mode 100755
index 000000000..b1f187c2e
--- /dev/null
+++ b/scripts/git-hooks/pre-applypatch
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed
+# by applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-applypatch".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/pre-commit" &&
+ exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
+: