diff-tree: convert diff_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:
committed by
Junio C Hamano
parent
9e5e0c289a
commit
66f414f885
@ -455,7 +455,7 @@ static int rev_compare_tree(struct rev_info *revs,
|
||||
|
||||
tree_difference = REV_TREE_SAME;
|
||||
DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES);
|
||||
if (diff_tree_sha1(t1->object.oid.hash, t2->object.oid.hash, "",
|
||||
if (diff_tree_oid(&t1->object.oid, &t2->object.oid, "",
|
||||
&revs->pruning) < 0)
|
||||
return REV_TREE_DIFFERENT;
|
||||
return tree_difference;
|
||||
@ -471,7 +471,7 @@ static int rev_same_tree_as_empty(struct rev_info *revs, struct commit *commit)
|
||||
|
||||
tree_difference = REV_TREE_SAME;
|
||||
DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES);
|
||||
retval = diff_tree_sha1(NULL, t1->object.oid.hash, "", &revs->pruning);
|
||||
retval = diff_tree_oid(NULL, &t1->object.oid, "", &revs->pruning);
|
||||
|
||||
return retval >= 0 && (tree_difference == REV_TREE_SAME);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user