]> git.ipfire.org Git - thirdparty/git.git/commit
t5312: test non-destructive repack
authorJeff King <peff@peff.net>
Fri, 24 Sep 2021 18:36:42 +0000 (14:36 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Sep 2021 19:36:45 +0000 (12:36 -0700)
commit078eecbcbe04bf77e8b9afee01a58c905c3b3c50
tree211e160616da25fbb049266b34f619d86435258a
parentf805844676ac4d6f5def5c2ace1d0430c410e21e
t5312: test non-destructive repack

In t5312, we create a state with a broken ref, and then make sure that
destructive repacks don't silently ignore the breakage (where a
destructive repack is one that might drop objects). But we don't check
the behavior of non-destructive repacks at all (i.e., ones where we'd
keep unreachable objects).

So let's add a test to confirm the current behavior, which is that
they are allowed (i.e., ignoring the breakage and considering any
objects it points to as unreachable). This may change in the future, but
we'd like for the test suite to alert us to that fact.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5312-prune-corruption.sh