summaryrefslogtreecommitdiff
path: root/templates/hooks--applypatch-msg.sample
diff options
context:
space:
mode:
Diffstat (limited to 'templates/hooks--applypatch-msg.sample')
-rwxr-xr-xtemplates/hooks--applypatch-msg.sample4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/hooks--applypatch-msg.sample b/templates/hooks--applypatch-msg.sample
index 8b2a2fe..a5d7b84 100755
--- a/templates/hooks--applypatch-msg.sample
+++ b/templates/hooks--applypatch-msg.sample
@@ -10,6 +10,6 @@
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
-test -x "$GIT_DIR/hooks/commit-msg" &&
- exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
+commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
+test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
: