diff options
Diffstat (limited to 'refs')
-rw-r--r-- | refs/packed-backend.c | 6 | ||||
-rw-r--r-- | refs/ref-cache.c | 2 | ||||
-rw-r--r-- | refs/refs-internal.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 4ec9fcacdd..b7652738be 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -880,7 +880,7 @@ static int packed_ref_iterator_peel(struct ref_iterator *ref_iterator, } else if ((iter->base.flags & (REF_ISBROKEN | REF_ISSYMREF))) { return -1; } else { - return !!peel_object(iter->oid.hash, peeled->hash); + return !!peel_object(&iter->oid, peeled); } } @@ -1220,8 +1220,8 @@ static int write_with_updates(struct packed_ref_store *refs, i++; } else { struct object_id peeled; - int peel_error = peel_object(update->new_oid.hash, - peeled.hash); + int peel_error = peel_object(&update->new_oid, + &peeled); if (write_packed_entry(out, update->refname, update->new_oid.hash, diff --git a/refs/ref-cache.c b/refs/ref-cache.c index 4f850e1b5c..043eb83748 100644 --- a/refs/ref-cache.c +++ b/refs/ref-cache.c @@ -493,7 +493,7 @@ static int cache_ref_iterator_advance(struct ref_iterator *ref_iterator) static int cache_ref_iterator_peel(struct ref_iterator *ref_iterator, struct object_id *peeled) { - return peel_object(ref_iterator->oid->hash, peeled->hash); + return peel_object(ref_iterator->oid, peeled); } static int cache_ref_iterator_abort(struct ref_iterator *ref_iterator) diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 3c4781eb87..54059c1daf 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -120,11 +120,11 @@ enum peel_status { /* * Peel the named object; i.e., if the object is a tag, resolve the * tag recursively until a non-tag is found. If successful, store the - * result to sha1 and return PEEL_PEELED. If the object is not a tag + * result to oid and return PEEL_PEELED. If the object is not a tag * or is not valid, return PEEL_NON_TAG or PEEL_INVALID, respectively, * and leave sha1 unchanged. */ -enum peel_status peel_object(const unsigned char *name, unsigned char *sha1); +enum peel_status peel_object(const struct object_id *name, struct object_id *oid); /* * Copy the reflog message msg to buf, which has been allocated sufficiently |