aboutsummaryrefslogtreecommitdiff
path: root/templates/hooks--prepare-commit-msg.sample
diff options
context:
space:
mode:
authorBen Walton <bwalton@artsci.utoronto.ca>2010-03-20 10:48:08 -0400
committerJunio C Hamano <gitster@pobox.com>2010-03-20 09:03:52 -0700
commit502be959531b34e2d9283213b7bca51842639240 (patch)
treedfa1e75d548773be3c947021cbb7bbabb070a3e5 /templates/hooks--prepare-commit-msg.sample
parentf1ba1c90e1704e937ff59ee510a8d46a5ab52a1a (diff)
downloadgit-502be959531b34e2d9283213b7bca51842639240.tar.gz
git-502be959531b34e2d9283213b7bca51842639240.tar.xz
Make templates honour SHELL_PATH and PERL_PATH
The hook script templates were hard coded to use /bin/sh and perl. This patch ensures that they use the same tools specified for the rest of the suite. The impetus for the change was noticing that, as shipped, some of the hooks used shell constructs that wouldn't work under Solaris' /bin/sh (eg: $(cmd...) substitutions). Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'templates/hooks--prepare-commit-msg.sample')
-rwxr-xr-xtemplates/hooks--prepare-commit-msg.sample4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/hooks--prepare-commit-msg.sample b/templates/hooks--prepare-commit-msg.sample
index 365242499..e8d1754f9 100755
--- a/templates/hooks--prepare-commit-msg.sample
+++ b/templates/hooks--prepare-commit-msg.sample
@@ -22,10 +22,10 @@
case "$2,$3" in
merge,)
- perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
+ @PERL_PATH@ -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
# ,|template,)
-# perl -i.bak -pe '
+# @PERL_PATH@ -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$1" ;;