diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2008-06-25 20:35:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-25 17:21:52 -0700 |
commit | 3015fa5846c19e79f99c1d6a49fd2510ed9291b8 (patch) | |
tree | 1d78e7f18e9da6c8686ad64d52c94a541297523d /templates | |
parent | Merge branch 'sb/rebase' (diff) | |
download | tgif-3015fa5846c19e79f99c1d6a49fd2510ed9291b8.tar.xz |
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-x | templates/hooks--prepare-commit-msg.sample | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/hooks--prepare-commit-msg.sample b/templates/hooks--prepare-commit-msg.sample index aa42acfd68..365242499d 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" ;; |