gc: add tests for --cruft and friends
commit12253ab6d0033aa8214c8a15bc2ea37ff052ff1c
authorEmily Shaffer <emilyshaffer@google.com>
Wed, 26 Oct 2022 21:32:43 +0000 (26 17:32 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Oct 2022 21:39:30 +0000 (26 14:39 -0700)
tree55d71d35d434c8bbbf9645afa07de3b8562048b7
parent4af7188bc97f70277d0f10d56d5373022b1fa385
gc: add tests for --cruft and friends

In 5b92477f89 (builtin/gc.c: conditionally avoid pruning objects via
loose, 2022-05-20) gc learned to respect '--cruft' and 'gc.cruftPacks'.
'--cruft' is exercised in t5329-pack-objects-cruft.sh, but in a way that
doesn't check whether a lone gc run generates these cruft packs.
'gc.cruftPacks' is never exercised.

Add some tests to exercise these options to gc in the gc test suite.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6500-gc.sh