]> git.ipfire.org Git - thirdparty/git.git/commit - t/t5300-pack-object.sh
pack-objects tests: don't leave test .git corrupt at end
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 30 Oct 2018 18:43:30 +0000 (18:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 31 Oct 2018 02:12:05 +0000 (11:12 +0900)
commit228135d9efee6eb1dfac5d78ac24518f53ab093e
tree6223c75edee43a0adbeeabd24b08d4890a23eb75
parent80938c39e2c4374ecd9f3b1a579f4cf5271f6670
pack-objects tests: don't leave test .git corrupt at end

Change the pack-objects tests to not leave their .git directory
corrupt and the end.

In 2fca19fbb5 ("fix multiple issues with t5300", 2010-02-03) a comment
was added warning against adding any subsequent tests, but since
4614043c8f ("index-pack: use streaming interface for collision test on
large blobs", 2012-05-24) the comment has drifted away from the code,
mentioning two test, when we actually have three.

Instead of having this warning let's just create a new .git directory
specifically for these tests.

As an aside, it would be interesting to instrument the test suite to
run a "git fsck" at the very end (in "test_done"). That would have
errored before this change, and may find other issues #leftoverbits.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5300-pack-object.sh