aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-23 13:39:50 -0800
committerJunio C Hamano <gitster@pobox.com>2023-01-23 13:39:50 -0800
commit8a40af9cabe2efbb830bf90c864ffda3136926ba (patch)
tree39d9cadffe0693da25fa5d77afdeeb506d1b23c7 /t
parentMerge branch 'en/t6426-todo-cleanup' (diff)
parentls-tree: remove dead store and strbuf for quote_c_style() (diff)
downloadgit-8a40af9cabe2efbb830bf90c864ffda3136926ba.tar.gz
git-8a40af9cabe2efbb830bf90c864ffda3136926ba.zip
Merge branch 'rs/ls-tree-path-expansion-fix'
"git ls-tree --format='%(path) %(path)' $tree $path" showed the path three times, which has been corrected. * rs/ls-tree-path-expansion-fix: ls-tree: remove dead store and strbuf for quote_c_style() ls-tree: fix expansion of repeated %(path)
Diffstat (limited to 't')
-rwxr-xr-xt/t3104-ls-tree-format.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t3104-ls-tree-format.sh b/t/t3104-ls-tree-format.sh
index 74053978f4..3adb206a93 100755
--- a/t/t3104-ls-tree-format.sh
+++ b/t/t3104-ls-tree-format.sh
@@ -35,6 +35,12 @@ test_ls_tree_format () {
'
}
+test_expect_success "ls-tree --format='%(path) %(path) %(path)' HEAD top-file" '
+ git ls-tree --format="%(path) %(path) %(path)" HEAD top-file.t >actual &&
+ echo top-file.t top-file.t top-file.t >expect &&
+ test_cmp expect actual
+'
+
test_ls_tree_format \
"%(objectmode) %(objecttype) %(objectname)%x09%(path)" \
""