1. Stefan Saasen
  2. git

Commits

Junio C Hamano  committed a204756

sample hooks template.

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>

  • Participants
  • Parent commits 6d5129a
  • Branches master

Comments (0)

Files changed (2)

File templates/hooks--applypatch-msg

View file
 #
 # 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+"$@"}
 :

File templates/hooks--pre-applypatch

View file
 #
 # 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+"$@"}
 :