diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-01-24 00:39:50 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-24 00:39:50 +0300 |
commit | 8a40af9cabe2efbb830bf90c864ffda3136926ba (patch) | |
tree | 39d9cadffe0693da25fa5d77afdeeb506d1b23c7 /t/t3104-ls-tree-format.sh | |
parent | b26956351209415520487c036541d58c2fd7ef2d (diff) | |
parent | c388fcda9943c0cf46960787041a1ff3bcf5e833 (diff) |
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/t3104-ls-tree-format.sh')
-rwxr-xr-x | t/t3104-ls-tree-format.sh | 6 |
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)" \ "" |