refs: convert peel_ref to struct object_id
Convert peel_ref (and its corresponding backend) to struct object_id. This transformation was done with an update to the declaration, definition, comments, and test helper and the following semantic patch: @@ expression E1, E2; @@ - peel_ref(E1, E2.hash) + peel_ref(E1, &E2) @@ expression E1, E2; @@ - peel_ref(E1, E2->hash) + peel_ref(E1, E2) 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
188960b4d6
commit
b420d90980
@ -562,7 +562,7 @@ static int mark_tagged(const char *path, const struct object_id *oid, int flag,
|
||||
|
||||
if (entry)
|
||||
entry->tagged = 1;
|
||||
if (!peel_ref(path, peeled.hash)) {
|
||||
if (!peel_ref(path, &peeled)) {
|
||||
entry = packlist_find(&to_pack, peeled.hash, NULL);
|
||||
if (entry)
|
||||
entry->tagged = 1;
|
||||
@ -2371,7 +2371,7 @@ static int add_ref_tag(const char *path, const struct object_id *oid, int flag,
|
||||
struct object_id peeled;
|
||||
|
||||
if (starts_with(path, "refs/tags/") && /* is a tag? */
|
||||
!peel_ref(path, peeled.hash) && /* peelable? */
|
||||
!peel_ref(path, &peeled) && /* peelable? */
|
||||
packlist_find(&to_pack, peeled.hash, NULL)) /* object packed? */
|
||||
add_tag_chain(oid);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user