summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2da671)
raw | patch | inline | side by side (parent: e2da671)
author | Alex Riesen <raa.lkml@gmail.com> | |
Wed, 25 Jun 2008 18:35:13 +0000 (20:35 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Jun 2008 00:21:52 +0000 (17:21 -0700) |
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>
"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>
t/t5303-pack-corruption-resilience.sh | patch | blob | history | |
t/t9106-git-svn-dcommit-clobber-series.sh | patch | blob | history | |
templates/hooks--prepare-commit-msg.sample | patch | blob | history |
index b0f5693482db963f59b5a0d0df5efae06a5402b9..31b20b21d23c2066fd124bf6a33dbdc689930170 100755 (executable)
'create_new_pack &&
git prune-packed &&
chmod +w ${pack}.pack &&
- perl -i -pe "s/ base /abcdef/" ${pack}.pack &&
+ perl -i.bak -pe "s/ base /abcdef/" ${pack}.pack &&
test_must_fail git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null'
'create_new_pack &&
git prune-packed &&
chmod +w ${pack}.pack &&
- perl -i -pe "s/ delta1 /abcdefgh/" ${pack}.pack &&
+ perl -i.bak -pe "s/ delta1 /abcdefgh/" ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null'
index a400dc796666e820c27dd6989ef9ee1b9922fad3..f8f4718c361fc16749fd82fe9bd797643a7a399b 100755 (executable)
test x"`sed -n -e 61p < file`" = x61 &&
svn co "$svnrepo" tmp &&
cd tmp &&
- perl -i -p -e "s/^58$/5588/" file &&
- perl -i -p -e "s/^61$/6611/" file &&
+ perl -i.bak -p -e "s/^58$/5588/" file &&
+ perl -i.bak -p -e "s/^61$/6611/" file &&
poke file &&
test x"`sed -n -e 58p < file`" = x5588 &&
test x"`sed -n -e 61p < file`" = x6611 &&
test_expect_success 'change file but in unrelated area' "
test x\"\`sed -n -e 4p < file\`\" = x4 &&
test x\"\`sed -n -e 7p < file\`\" = x7 &&
- perl -i -p -e 's/^4\$/4444/' file &&
- perl -i -p -e 's/^7\$/7777/' file &&
+ perl -i.bak -p -e 's/^4\$/4444/' file &&
+ perl -i.bak -p -e 's/^7\$/7777/' file &&
test x\"\`sed -n -e 4p < file\`\" = x4444 &&
test x\"\`sed -n -e 7p < file\`\" = x7777 &&
git commit -m '4 => 4444, 7 => 7777' file &&
diff --git a/templates/hooks--prepare-commit-msg.sample b/templates/hooks--prepare-commit-msg.sample
index aa42acfd68dcb04634d1e7309b00b6e85d9933e2..365242499dcf0ee35c26ccb2917724d6e559be69 100755 (executable)
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" ;;