summaryrefslogtreecommitdiff
path: root/t/t1060-object-corruption.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-10-30 18:43:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-31 02:12:05 (GMT)
commitaa984dbe5ea51462a826e3697506c41b6c6c43fb (patch)
tree34ff43057890d5ad6c3e6822fccb05a451c3b83b /t/t1060-object-corruption.sh
parent228135d9efee6eb1dfac5d78ac24518f53ab093e (diff)
downloadgit-aa984dbe5ea51462a826e3697506c41b6c6c43fb.zip
git-aa984dbe5ea51462a826e3697506c41b6c6c43fb.tar.gz
git-aa984dbe5ea51462a826e3697506c41b6c6c43fb.tar.bz2
index-pack tests: don't leave test repo dirty at end
Change a test added in 51054177b3 ("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 720dae5a19 ("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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1060-object-corruption.sh')
-rwxr-xr-xt/t1060-object-corruption.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t1060-object-corruption.sh b/t/t1060-object-corruption.sh
index ac1f189..4feb651 100755
--- a/t/t1060-object-corruption.sh
+++ b/t/t1060-object-corruption.sh
@@ -117,8 +117,10 @@ test_expect_failure 'clone --local detects misnamed objects' '
'
test_expect_success 'fetch into corrupted repo with index-pack' '
+ cp -R bit-error bit-error-cp &&
+ test_when_finished "rm -rf bit-error-cp" &&
(
- cd bit-error &&
+ cd bit-error-cp &&
test_must_fail git -c transfer.unpackLimit=1 \
fetch ../no-bit-error 2>stderr &&
test_i18ngrep ! -i collision stderr