@@ -252,12 +252,12 @@ static int filter_refs(const char *refname, const struct object_id *oid,
252252 return filter -> fn (refname , oid , flags , filter -> cb_data );
253253}
254254
255- enum peel_status peel_object (const unsigned char * name , unsigned char * sha1 )
255+ enum peel_status peel_object (const struct object_id * name , struct object_id * oid )
256256{
257- struct object * o = lookup_unknown_object (name );
257+ struct object * o = lookup_unknown_object (name -> hash );
258258
259259 if (o -> type == OBJ_NONE ) {
260- int type = sha1_object_info (name , NULL );
260+ int type = sha1_object_info (name -> hash , NULL );
261261 if (type < 0 || !object_as_type (o , type , 0 ))
262262 return PEEL_INVALID ;
263263 }
@@ -269,7 +269,7 @@ enum peel_status peel_object(const unsigned char *name, unsigned char *sha1)
269269 if (!o )
270270 return PEEL_INVALID ;
271271
272- hashcpy ( sha1 , o -> oid . hash );
272+ oidcpy ( oid , & o -> oid );
273273 return PEEL_PEELED ;
274274}
275275
@@ -1714,7 +1714,7 @@ int refs_peel_ref(struct ref_store *refs, const char *refname,
17141714 RESOLVE_REF_READING , & base , & flag ))
17151715 return -1 ;
17161716
1717- return peel_object (base . hash , oid -> hash );
1717+ return peel_object (& base , oid );
17181718}
17191719
17201720int peel_ref (const char * refname , struct object_id * oid )
0 commit comments