tree-diff: convert diff_root_tree_sha1 to struct object_id
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
09fae19aa8
commit
7b8dea0c75
@ -566,7 +566,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
|
||||
commit->tree->object.oid.hash, "", &rev->diffopt);
|
||||
}
|
||||
else
|
||||
diff_root_tree_sha1(commit->tree->object.oid.hash,
|
||||
diff_root_tree_oid(&commit->tree->object.oid,
|
||||
"", &rev->diffopt);
|
||||
|
||||
/* Export the referenced blobs, and remember the marks. */
|
||||
|
2
diff.h
2
diff.h
@ -215,7 +215,7 @@ extern struct combine_diff_path *diff_tree_paths(
|
||||
struct strbuf *base, struct diff_options *opt);
|
||||
extern int diff_tree_sha1(const unsigned char *old, const unsigned char *new,
|
||||
const char *base, struct diff_options *opt);
|
||||
extern int diff_root_tree_sha1(const unsigned char *new, const char *base,
|
||||
extern int diff_root_tree_oid(const struct object_id *new_oid, const char *base,
|
||||
struct diff_options *opt);
|
||||
|
||||
struct combine_diff_path {
|
||||
|
@ -803,7 +803,7 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
|
||||
parents = get_saved_parents(opt, commit);
|
||||
if (!parents) {
|
||||
if (opt->show_root_diff) {
|
||||
diff_root_tree_sha1(oid->hash, "", &opt->diffopt);
|
||||
diff_root_tree_oid(oid, "", &opt->diffopt);
|
||||
log_tree_diff_flush(opt);
|
||||
}
|
||||
return !opt->loginfo;
|
||||
|
@ -20,7 +20,7 @@ int commit_patch_id(struct commit *commit, struct diff_options *options,
|
||||
diff_tree_sha1(commit->parents->item->object.oid.hash,
|
||||
commit->object.oid.hash, "", options);
|
||||
else
|
||||
diff_root_tree_sha1(commit->object.oid.hash, "", options);
|
||||
diff_root_tree_oid(&commit->object.oid, "", options);
|
||||
diffcore_std(options);
|
||||
return diff_flush_patch_id(options, oid, diff_header_only);
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ int diff_tree_sha1(const unsigned char *old, const unsigned char *new, const cha
|
||||
return retval;
|
||||
}
|
||||
|
||||
int diff_root_tree_sha1(const unsigned char *new, const char *base, struct diff_options *opt)
|
||||
int diff_root_tree_oid(const struct object_id *new_oid, const char *base, struct diff_options *opt)
|
||||
{
|
||||
return diff_tree_sha1(NULL, new, base, opt);
|
||||
return diff_tree_sha1(NULL, new_oid->hash, base, opt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user