From: Junio C Hamano Date: Tue, 14 Feb 2023 22:15:52 +0000 (-0800) Subject: Merge branch 'rs/ls-tree-path-expansion-fix' into maint-2.39 X-Git-Tag: v2.40.0-rc0~24^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f071460d3c367ee87d2d15add2388da2c6c68df;p=thirdparty%2Fgit.git Merge branch 'rs/ls-tree-path-expansion-fix' into maint-2.39 "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) --- 1f071460d3c367ee87d2d15add2388da2c6c68df diff --cc builtin/ls-tree.c index c3ea09281a,35e793d4af..b1f69fbe92 --- a/builtin/ls-tree.c +++ b/builtin/ls-tree.c @@@ -142,9 -141,8 +142,8 @@@ static int show_recursive(const char *b } static int show_tree_fmt(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, void *context) + const char *pathname, unsigned mode, void *context UNUSED) { - size_t baselen; int recurse = 0; struct strbuf sb = STRBUF_INIT; enum object_type type = object_type(mode);