X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=tree-diff.c;h=0459e54d3d89a413330f52ab34662f51924b04ea;hb=a5d07d0f5c838acb2c9d69a19907c50f72848b3b;hp=edd83949bf0896bedff4cab8e2b037eba574a45e;hpb=d1c8c0c8c42912eb768a05115c798de50e595f8b;p=git.git diff --git a/tree-diff.c b/tree-diff.c index edd83949b..0459e54d3 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -239,6 +239,12 @@ static void show_entry(struct diff_options *opt, const char *prefix, struct tree if (!tree || type != OBJ_TREE) die("corrupt tree sha %s", sha1_to_hex(sha1)); + if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE)) { + newbase[baselen + pathlen] = 0; + opt->add_remove(opt, *prefix, mode, sha1, newbase); + newbase[baselen + pathlen] = '/'; + } + init_tree_desc(&inner, tree, size); show_tree(opt, prefix, &inner, newbase, baselen + 1 + pathlen);