b = (struct commit_dist *)b_;
if (a->distance != b->distance)
return b->distance - a->distance; /* desc sort */
- return hashcmp(a->commit->object.sha1, b->commit->object.sha1);
+ return oidcmp(&a->commit->object.oid, &b->commit->object.oid);
}
static struct commit_list *best_bisection_sorted(struct commit_list *list, int nr)
struct commit_list *next = list->next;
list->next = NULL;
if (0 <= sha1_array_lookup(&skipped_revs,
- get_object_hash(list->item->object))) {
+ list->item->object.oid.hash)) {
if (skipped_first && !*skipped_first)
*skipped_first = 1;
/* Move current to tried list */
for (i = 0; cur; cur = cur->next, i++) {
if (i == index) {
- if (hashcmp(cur->item->object.sha1, current_bad_oid->hash))
+ if (oidcmp(&cur->item->object.oid, current_bad_oid))
return cur;
if (previous)
return previous;
result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1);
for (; result; result = result->next) {
- const unsigned char *mb = get_object_hash(result->item->object);
+ const unsigned char *mb = result->item->object.oid.hash;
if (!hashcmp(mb, current_bad_oid->hash)) {
handle_bad_merge_base();
} else if (0 <= sha1_array_lookup(&good_revs, mb)) {
exit(4);
}
- bisect_rev = get_object_hash(revs.commits->item->object);
+ bisect_rev = revs.commits->item->object.oid.hash;
if (!hashcmp(bisect_rev, current_bad_oid->hash)) {
exit_if_skipped_commits(tried, current_bad_oid);