summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-06-25 18:35:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-06-26 00:21:52 (GMT)
commit3015fa5846c19e79f99c1d6a49fd2510ed9291b8 (patch)
tree1d78e7f18e9da6c8686ad64d52c94a541297523d /templates
parente2da671a642d5987d9a08f56b19172767272d9be (diff)
downloadgit-3015fa5846c19e79f99c1d6a49fd2510ed9291b8.zip
git-3015fa5846c19e79f99c1d6a49fd2510ed9291b8.tar.gz
git-3015fa5846c19e79f99c1d6a49fd2510ed9291b8.tar.bz2
Fix use of "perl -i" on Windows
The perldiag(1) has following to say about this: "Can't do inplace edit without backup" (F) You're on a system such as MS-DOS that gets confused if you try reading from a deleted (but still opened) file. You have to say -i.bak, or some such. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'templates')
-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 aa42acf..3652424 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 -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
+ perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
# ,|template,)
-# perl -i -pe '
+# perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$1" ;;