X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=tree-diff.c;h=0459e54d3d89a413330f52ab34662f51924b04ea;hb=4af819d4cad206648b832f4d6103547981ab8004;hp=edd83949bf0896bedff4cab8e2b037eba574a45e;hpb=3ba4f3a9fc68ba4c5a0064107e8993c5fc5b684f;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);