}
struct ref_entry *create_ref_entry(const char *refname,
- const unsigned char *sha1, int flag,
+ const struct object_id *oid, int flag,
int check_name)
{
struct ref_entry *ref;
check_refname_format(refname, REFNAME_ALLOW_ONELEVEL))
die("Reference has invalid format: '%s'", refname);
FLEX_ALLOC_STR(ref, name, refname);
- hashcpy(ref->u.value.oid.hash, sha1);
+ oidcpy(&ref->u.value.oid, oid);
oidclr(&ref->u.value.peeled);
ref->flag = flag;
return ref;