]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'rs/ls-tree-path-expansion-fix' into maint-2.39
authorJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2023 22:15:52 +0000 (14:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2023 22:15:52 +0000 (14:15 -0800)
"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)

1  2 
builtin/ls-tree.c
t/t3104-ls-tree-format.sh

index c3ea09281afebe0c9aefb690f6f10044142a4d1a,35e793d4afc7f9b78cdf9b79445f14c667a5f429..b1f69fbe92d89704a5e7e11f8f560f65ef092216
@@@ -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);
Simple merge