Skip to content

Commit

Permalink
sample hooks template.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 26, 2006
1 parent 6d5129a commit a204756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/hooks--applypatch-msg
Original file line number Diff line number Diff line change
Expand Up @@ -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+"$@"}
:
1 change: 1 addition & 0 deletions templates/hooks--pre-applypatch
Original file line number Diff line number Diff line change
Expand Up @@ -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+"$@"}
:
Expand Down

0 comments on commit a204756

Please sign in to comment.