]> git.ipfire.org Git - thirdparty/git.git/commit
cat-file tests: test bad usage
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 28 Dec 2021 13:28:41 +0000 (14:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Dec 2021 21:05:28 +0000 (13:05 -0800)
commitddf8420b59297b6b40246a33d8a1c760bedc93cc
tree8b121a616349ea0005b4050fc9e20438340c0f54
parentabe6bb3905392d5eb6b01fa6e54d7e784e0522aa
cat-file tests: test bad usage

Stress test the usage emitted when options are combined in ways that
isn't supported. Let's test various option combinations, some of these
we buggily allow right now.

E.g. this reveals a bug in 321459439e1 (cat-file: support
--textconv/--filters in batch mode, 2016-09-09) that we'll fix in a
subsequent commit. We're supposed to be emitting a relevant message
when --batch-all-objects is combined with --textconv or --filters, but
we don't.

The cases of needing to assign to opt=2 in the "opt" loop are because
on those we do the right thing already, in subsequent commits the
"test_expect_failure" cases will be fixed, and the for-loops unified.

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