]> git.ipfire.org Git - thirdparty/git.git/commit
pack-objects tests: cover blindspots in stdin handling
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 21 Jun 2021 15:03:37 +0000 (17:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Jun 2021 03:27:27 +0000 (20:27 -0700)
commitfb20d4b1268d97646ae24f07661892cf6da64c31
tree989524bdc353aafe14892fc418710f879d3f5ddd
parentebf3c04b262aa27fbb97f8a0156c2347fecafafb
pack-objects tests: cover blindspots in stdin handling

Cover blindspots in the testing of stdin handling, including the
"!len" condition added in b5d97e6b0a0 (pack-objects: run rev-list
equivalent internally., 2006-09-04). The codepath taken with --revs
and read_object_list_from_stdin() acts differently in some of these
common cases, let's test for those.

The "--stdin --revs" test being added here stresses the combination of
--stdin-packs and the revision.c --stdin argument, some of this was
covered in a test added in 339bce27f4f (builtin/pack-objects.c: add
'--stdin-packs' option, 2021-02-22), but let's make sure that
GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=true keeps erroring out about
--stdin, and it isn't picked up by the revision.c API's handling of
that option.

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