Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-24 00:39:50 +0300
committerJunio C Hamano <gitster@pobox.com>2023-01-24 00:39:50 +0300
commit8a40af9cabe2efbb830bf90c864ffda3136926ba (patch)
tree39d9cadffe0693da25fa5d77afdeeb506d1b23c7 /t/t3104-ls-tree-format.sh
parentb26956351209415520487c036541d58c2fd7ef2d (diff)
parentc388fcda9943c0cf46960787041a1ff3bcf5e833 (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-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)" \
""