t/t6500-gc.sh: refactor cruft pack tests
commit50685e0e0ba743892c9832c414494093ae3e8703
authorTaylor Blau <me@ttaylorr.com>
Tue, 18 Apr 2023 20:40:46 +0000 (18 16:40 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Apr 2023 21:56:48 +0000 (18 14:56 -0700)
tree6ca64d315e87cffff34a4b625bb18d1fffba97f2
parentb31d45b8315adc49b729496f3c0ed18a41ca08f6
t/t6500-gc.sh: refactor cruft pack tests

In 12253ab6d0 (gc: add tests for --cruft and friends, 2022-10-26), we
added a handful of tests to t6500 to ensure that `git gc` respected the
value of `--cruft` and `gc.cruftPacks`.

Then, in c695592850 (config: let feature.experimental imply
gc.cruftPacks=true, 2022-10-26), another set of similar tests was added
to ensure that `feature.experimental` correctly implied enabling cruft
pack generation (or not).

These tests are similar and could be consolidated. Do so in this patch
to prepare for expanding the set of command-line invocations that enable
or disable writing cruft packs. This makes it possible to easily test
more combinations of arguments without being overly repetitive.

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