summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-30 15:08:10 +0100
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-30 15:08:10 +0100
commit43efcf42382e87de4aa423e5e1607958ad1717d0 (patch)
tree7e19a0765b0dd6885fbdf69d3a8d0159a1b42de8 /tree-diff.c
parent45d74c4b0fe38218b4569a90da7102cf48d616c2 (diff)
parentc7fd06b6411fb04eb4d9acd7f8822a288a50dc17 (diff)
downloadgit-43efcf42382e87de4aa423e5e1607958ad1717d0.tar.gz
Merge branch 'baserock/jonathanmaw/S9007/upgrade-git' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk> Reviewed-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Diffstat (limited to 'tree-diff.c')
-rw-r--r--tree-diff.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tree-diff.c b/tree-diff.c
index 28ad6db9ff..ba01563a02 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -49,12 +49,12 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2,
if (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode1)) {
if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE)) {
opt->change(opt, mode1, mode2,
- sha1, sha2, base->buf, 0, 0);
+ sha1, sha2, 1, 1, base->buf, 0, 0);
}
strbuf_addch(base, '/');
diff_tree_sha1(sha1, sha2, base->buf, opt);
} else {
- opt->change(opt, mode1, mode2, sha1, sha2, base->buf, 0, 0);
+ opt->change(opt, mode1, mode2, sha1, sha2, 1, 1, base->buf, 0, 0);
}
strbuf_setlen(base, old_baselen);
return 0;
@@ -100,7 +100,7 @@ static void show_entry(struct diff_options *opt, const char *prefix,
die("corrupt tree sha %s", sha1_to_hex(sha1));
if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE))
- opt->add_remove(opt, *prefix, mode, sha1, base->buf, 0);
+ opt->add_remove(opt, *prefix, mode, sha1, 1, base->buf, 0);
strbuf_addch(base, '/');
@@ -108,7 +108,7 @@ static void show_entry(struct diff_options *opt, const char *prefix,
show_tree(opt, prefix, &inner, base);
free(tree);
} else
- opt->add_remove(opt, prefix[0], mode, sha1, base->buf, 0);
+ opt->add_remove(opt, prefix[0], mode, sha1, 1, base->buf, 0);
strbuf_setlen(base, old_baselen);
}
@@ -212,8 +212,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
diff_opts.rename_score = opt->rename_score;
paths[0] = NULL;
diff_tree_setup_paths(paths, &diff_opts);
- if (diff_setup_done(&diff_opts) < 0)
- die("unable to set up diff options to follow renames");
+ diff_setup_done(&diff_opts);
diff_tree(t1, t2, base, &diff_opts);
diffcore_std(&diff_opts);
diff_tree_release_paths(&diff_opts);