sample hooks template.
authorJunio C Hamano <junkio@cox.net>
Sun, 26 Feb 2006 23:16:41 +0000 (15:16 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 26 Feb 2006 23:16:41 +0000 (15:16 -0800)
These two sample hooks try to detect and use the corresponding
commit hook from the same repository.  However, they forgot to
set up GIT_DIR for their own use, so was not in effect.

Signed-off-by: Junio C Hamano <junkio@cox.net>
templates/hooks--applypatch-msg
templates/hooks--pre-applypatch

index bda3c86..02de1ef 100644 (file)
@@ -9,6 +9,7 @@
 #
 # To enable this hook, make this file executable.
 
+. git-sh-setup
 test -x "$GIT_DIR/hooks/commit-msg" &&
        exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
 :
index a547516..5f56ce8 100644 (file)
@@ -8,6 +8,7 @@
 #
 # To enable this hook, make this file executable.
 
+. git-sh-setup
 test -x "$GIT_DIR/hooks/pre-commit" &&
        exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
 :