diff options
Diffstat (limited to 'tree-diff.c')
-rw-r--r-- | tree-diff.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tree-diff.c b/tree-diff.c index edd83949bf..0459e54d3d 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); |