Skip to content

Commit aa984db

Browse files
avargitster
authored andcommitted
index-pack tests: don't leave test repo dirty at end
Change a test added in 5105417 ("index-pack: detect local corruption in collision check", 2017-04-01) so that the repository isn't left dirty at the end. Due to the caveats explained in 720dae5 ("config doc: elaborate on fetch.fsckObjects security", 2018-07-27) even a "fetch" that fails will write to the local object store, so let's copy the bit-error test directory before running this test. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 228135d commit aa984db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/t1060-object-corruption.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ test_expect_failure 'clone --local detects misnamed objects' '
117117
'
118118

119119
test_expect_success 'fetch into corrupted repo with index-pack' '
120+
cp -R bit-error bit-error-cp &&
121+
test_when_finished "rm -rf bit-error-cp" &&
120122
(
121-
cd bit-error &&
123+
cd bit-error-cp &&
122124
test_must_fail git -c transfer.unpackLimit=1 \
123125
fetch ../no-bit-error 2>stderr &&
124126
test_i18ngrep ! -i collision stderr

0 commit comments

Comments
 (0)