git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fix t5303 (the test case for pack corruptions) on Windows

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jun 25, 2008, 16:44 UTC
Message-ID
<20080625164438.GA4039@steel.home>
In-Reply-To
<alpine.LFD.1.10.0806232123420.2979@xanadu.home>
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>
---
 t/t5303-pack-corruption-resilience.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t5303-pack-corruption-resilience.sh b/t/t5303-pack-corruption-resilience.sh
index b0f5693..31b20b2 100755
--- a/t/t5303-pack-corruption-resilience.sh
+++ b/t/t5303-pack-corruption-resilience.sh
@@ -90,7 +90,7 @@ test_expect_success \
     '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'
@@ -138,7 +138,7 @@ test_expect_success \
     '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'
-- 
1.5.6.28.g6f71b
Previous: Nicolas PitreNext: Junio C Hamano
Message 2 of 4 in “test case for pack resilience against corruptions”
  1. 3/3 test case for pack resilience against corruptionsNicolas Pitre, Jun 24, 2008
  2. Fix t5303 (the test case for pack corruptions) on WindowsAlex Riesen, Jun 25, 2008
  3. Junio C HamanoJun 25, 2008
  4. Fix t5303 (the test case for pack corruptions) on WindowsAlex Riesen, Jun 25, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.