Convert remaining callers of sha1_array_lookup to object_id
There are a very small number of callers which don't already use struct object_id. Convert them. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
98a72ddc12
commit
4ce3621a6d
14
bisect.c
14
bisect.c
@ -754,9 +754,9 @@ static void handle_bad_merge_base(void)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void handle_skipped_merge_base(const unsigned char *mb)
|
||||
static void handle_skipped_merge_base(const struct object_id *mb)
|
||||
{
|
||||
char *mb_hex = sha1_to_hex(mb);
|
||||
char *mb_hex = oid_to_hex(mb);
|
||||
char *bad_hex = oid_to_hex(current_bad_oid);
|
||||
char *good_hex = join_sha1_array_hex(&good_revs, ' ');
|
||||
|
||||
@ -787,16 +787,16 @@ static void check_merge_bases(int no_checkout)
|
||||
result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1);
|
||||
|
||||
for (; result; result = result->next) {
|
||||
const unsigned char *mb = result->item->object.oid.hash;
|
||||
if (!hashcmp(mb, current_bad_oid->hash)) {
|
||||
const struct object_id *mb = &result->item->object.oid;
|
||||
if (!oidcmp(mb, current_bad_oid)) {
|
||||
handle_bad_merge_base();
|
||||
} else if (0 <= sha1_array_lookup(&good_revs, mb)) {
|
||||
} else if (0 <= sha1_array_lookup(&good_revs, mb->hash)) {
|
||||
continue;
|
||||
} else if (0 <= sha1_array_lookup(&skipped_revs, mb)) {
|
||||
} else if (0 <= sha1_array_lookup(&skipped_revs, mb->hash)) {
|
||||
handle_skipped_merge_base(mb);
|
||||
} else {
|
||||
printf(_("Bisecting: a merge base must be tested\n"));
|
||||
exit(bisect_checkout(mb, no_checkout));
|
||||
exit(bisect_checkout(mb->hash, no_checkout));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user