Merge branch 'rd/init-typo'
[gitweb.git] / templates / hooks--applypatch-msg.sample
index 8b2a2fe84feaeaba56953d6d4d0d649b3cf755eb..a5d7b84a673458d14d9aab082183a1968c2c7492 100755 (executable)
@@ -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+"$@"}
 :