refs: convert resolve_refdup and refs_resolve_refdup to struct object_id
All of the callers already pass the hash member of struct object_id, so update them to pass a pointer to the struct directly, This transformation was done with an update to declaration and definition and the following semantic patch: @@ expression E1, E2, E3, E4; @@ - resolve_refdup(E1, E2, E3.hash, E4) + resolve_refdup(E1, E2, &E3, E4) @@ expression E1, E2, E3, E4; @@ - resolve_refdup(E1, E2, E3->hash, E4) + resolve_refdup(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
6ccac9eed5
commit
0f2dc722dd
@ -603,7 +603,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
|
||||
|
||||
/* get current branch */
|
||||
current_branch = current_branch_to_free =
|
||||
resolve_refdup("HEAD", RESOLVE_REF_READING, head_oid.hash, NULL);
|
||||
resolve_refdup("HEAD", RESOLVE_REF_READING, &head_oid, NULL);
|
||||
if (!current_branch)
|
||||
die("No current branch");
|
||||
if (starts_with(current_branch, "refs/heads/"))
|
||||
|
Reference in New Issue
Block a user