refs: convert resolve_ref_unsafe to struct object_id
Convert resolve_ref_unsafe to take a pointer to struct object_id by converting one remaining caller to use struct object_id, removing the temporary NULL pointer check in expand_ref, converting the declaration and definition, and applying the following semantic patch: @@ expression E1, E2, E3, E4; @@ - resolve_ref_unsafe(E1, E2, E3.hash, E4) + resolve_ref_unsafe(E1, E2, &E3, E4) @@ expression E1, E2, E3, E4; @@ - resolve_ref_unsafe(E1, E2, E3->hash, E4) + resolve_ref_unsafe(E1, E2, E3, E4) 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
0f05154c70
commit
49e61479be
@ -555,7 +555,7 @@ static int fsck_head_link(void)
|
||||
if (verbose)
|
||||
fprintf(stderr, "Checking HEAD link\n");
|
||||
|
||||
head_points_at = resolve_ref_unsafe("HEAD", 0, head_oid.hash, NULL);
|
||||
head_points_at = resolve_ref_unsafe("HEAD", 0, &head_oid, NULL);
|
||||
if (!head_points_at) {
|
||||
errors_found |= ERROR_REFS;
|
||||
return error("Invalid HEAD");
|
||||
|
Reference in New Issue
Block a user