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
@ -31,7 +31,7 @@ static void add_head_info(struct worktree *wt)
|
||||
target = refs_resolve_ref_unsafe(get_worktree_ref_store(wt),
|
||||
"HEAD",
|
||||
0,
|
||||
wt->head_oid.hash, &flags);
|
||||
&wt->head_oid, &flags);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user