summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-05-30 17:30:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-02 00:36:07 (GMT)
commitb9acf54dbd2906249abb2a406d466b47da44678e (patch)
tree72bdfd4a15a8437bd7ce55e1a379369449f6f9db
parentbd25f288767aa26f42ac02d2d36695c8df9134dd (diff)
downloadgit-b9acf54dbd2906249abb2a406d466b47da44678e.zip
git-b9acf54dbd2906249abb2a406d466b47da44678e.tar.gz
git-b9acf54dbd2906249abb2a406d466b47da44678e.tar.bz2
combine-diff: convert diff_tree_combined to struct object_id
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/diff.c2
-rw-r--r--combine-diff.c10
-rw-r--r--diff.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/builtin/diff.c b/builtin/diff.c
index b2d7c32..73b4ff3 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -194,7 +194,7 @@ static int builtin_diff_combined(struct rev_info *revs,
revs->dense_combined_merges = revs->combine_merges = 1;
for (i = 1; i < ents; i++)
oid_array_append(&parents, &ent[i].item->oid);
- diff_tree_combined(ent[0].item->oid.hash, &parents,
+ diff_tree_combined(&ent[0].item->oid, &parents,
revs->dense_combined_merges, revs);
oid_array_clear(&parents);
return 0;
diff --git a/combine-diff.c b/combine-diff.c
index ad063ec..84981df 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1384,7 +1384,7 @@ static struct combine_diff_path *find_paths_multitree(
}
-void diff_tree_combined(const unsigned char *sha1,
+void diff_tree_combined(const struct object_id *oid,
const struct oid_array *parents,
int dense,
struct rev_info *rev)
@@ -1448,11 +1448,11 @@ void diff_tree_combined(const unsigned char *sha1,
* diff(sha1,parent_i) for all i to do the job, specifically
* for parent0.
*/
- paths = find_paths_generic(sha1, parents, &diffopts);
+ paths = find_paths_generic(oid->hash, parents, &diffopts);
}
else {
int stat_opt;
- paths = find_paths_multitree(sha1, parents, &diffopts);
+ paths = find_paths_multitree(oid->hash, parents, &diffopts);
/*
* show stat against the first parent even
@@ -1463,7 +1463,7 @@ void diff_tree_combined(const unsigned char *sha1,
if (stat_opt) {
diffopts.output_format = stat_opt;
- diff_tree_sha1(parents->oid[0].hash, sha1, "", &diffopts);
+ diff_tree_sha1(parents->oid[0].hash, oid->hash, "", &diffopts);
diffcore_std(&diffopts);
if (opt->orderfile)
diffcore_order(opt->orderfile);
@@ -1539,6 +1539,6 @@ void diff_tree_combined_merge(const struct commit *commit, int dense,
oid_array_append(&parents, &parent->item->object.oid);
parent = parent->next;
}
- diff_tree_combined(commit->object.oid.hash, &parents, dense, rev);
+ diff_tree_combined(&commit->object.oid, &parents, dense, rev);
oid_array_clear(&parents);
}
diff --git a/diff.h b/diff.h
index 150f1c5..6aeeda0 100644
--- a/diff.h
+++ b/diff.h
@@ -236,7 +236,7 @@ struct combine_diff_path {
extern void show_combined_diff(struct combine_diff_path *elem, int num_parent,
int dense, struct rev_info *);
-extern void diff_tree_combined(const unsigned char *sha1, const struct oid_array *parents, int dense, struct rev_info *rev);
+extern void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev);
extern void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev);