const char *colon = strchrnul(name, ':');
int refnamelen = colon - name;
- if (!dwim_ref(name, refnamelen, oid.hash, &ref))
+ if (!dwim_ref(name, refnamelen, &oid, &ref))
die("no such ref: %.*s", refnamelen, name);
free(ref);
}
- if (get_sha1(name, oid.hash))
+ if (get_oid(name, &oid))
die("Not a valid object name");
commit = lookup_commit_reference_gently(&oid, 1);