]> git.ipfire.org Git - thirdparty/git.git/commit
ls-tree: test for the regression in 9c4d58ff2c3
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 3 Jun 2022 10:23:10 +0000 (12:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Jun 2022 16:47:11 +0000 (09:47 -0700)
commit1d232d38bde689fb04161824d1e494617b3f8082
treedd392ed203c1a293b8a427389ab00a4d5d483307
parent350296cc78912c245847ec65e55143053450cce1
ls-tree: test for the regression in 9c4d58ff2c3

Add a test for the regression introduced in my 9c4d58ff2c3 (ls-tree:
split up "fast path" callbacks, 2022-03-23) and fixed in
350296cc789 (ls-tree: `-l` should not imply recursive listing,
2022-04-04), and test for the test of ls-tree option/mode combinations
to make sure we don't have other blind spots.

The setup for these tests can be shared with those added in the
1041d58b4d9 (Merge branch 'tl/ls-tree-oid-only', 2022-04-04) topic, so
let's create a new t/lib-t3100.sh to help them share data.

The existing tests in "t3104-ls-tree-format.sh" didn't deal with a
submodule, which they'll now encounter with as the
setup_basic_ls_tree_data() sets one up.

This extensive testing should give us confidence that there were no
further regressions in this area. The lack of testing was noted back
in [1], but unfortunately we didn't cover that blind-spot before
9c4d58ff2c3.

1. https://lore.kernel.org/git/211115.86o86lqe3c.gmgdl@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-t3100.sh [new file with mode: 0644]
t/t3104-ls-tree-format.sh
t/t3105-ls-tree-output.sh [new file with mode: 0755]