aboutsummaryrefslogtreecommitdiffstats
path: root/t/lib-t3100.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-06-03 12:23:10 +0200
committerJunio C Hamano <gitster@pobox.com>2022-06-03 09:47:11 -0700
commit1d232d38bde689fb04161824d1e494617b3f8082 (patch)
treedd392ed203c1a293b8a427389ab00a4d5d483307 /t/lib-t3100.sh
parent350296cc78912c245847ec65e55143053450cce1 (diff)
downloadgit-1d232d38bde689fb04161824d1e494617b3f8082.tar.gz
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>
Diffstat (limited to 't/lib-t3100.sh')
-rw-r--r--t/lib-t3100.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/lib-t3100.sh b/t/lib-t3100.sh
new file mode 100644
index 0000000000..eabb5fd803
--- /dev/null
+++ b/t/lib-t3100.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+setup_basic_ls_tree_data () {
+ mkdir dir &&
+ test_commit dir/sub-file &&
+ test_commit top-file &&
+ git clone . submodule &&
+ git submodule add ./submodule &&
+ git commit -m"add submodule"
+}