Skip to content

Commit a204756

Browse files
author
Junio C Hamano
committed
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 <[email protected]>
1 parent 6d5129a commit a204756

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

templates/hooks--applypatch-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#
1010
# To enable this hook, make this file executable.
1111

12+
. git-sh-setup
1213
test -x "$GIT_DIR/hooks/commit-msg" &&
1314
exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
1415
:

templates/hooks--pre-applypatch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#
99
# To enable this hook, make this file executable.
1010

11+
. git-sh-setup
1112
test -x "$GIT_DIR/hooks/pre-commit" &&
1213
exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
1314
:

0 commit comments

Comments
 (0)