static struct tree *empty_tree(void)
{
- return lookup_tree(EMPTY_TREE_SHA1_BIN);
+ return lookup_tree(&empty_tree_oid);
}
static int error_dirty_index(struct replay_opts *opts)
if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_oid.hash, NULL))
return error(_("could not resolve HEAD commit\n"));
- head_commit = lookup_commit(head_oid.hash);
+ head_commit = lookup_commit(&head_oid);
/*
* If head_commit is NULL, check_commit, called from
if (get_oid("HEAD", &head))
return error(_("need a HEAD to fixup"));
- if (!(head_commit = lookup_commit_reference(head.hash)))
+ if (!(head_commit = lookup_commit_reference(&head)))
return error(_("could not read HEAD"));
if (!(head_message = get_commit_buffer(head_commit, NULL)))
return error(_("could not read HEAD's commit message"));
if (status < 0)
return -1;
- item->commit = lookup_commit_reference(commit_oid.hash);
+ item->commit = lookup_commit_reference(&commit_oid);
return !item->commit;
}
continue;
if (!get_oid(name, &oid)) {
- if (!lookup_commit_reference_gently(oid.hash, 1)) {
+ if (!lookup_commit_reference_gently(&oid, 1)) {
enum object_type type = sha1_object_info(oid.hash, NULL);
return error(_("%s: can't cherry-pick a %s"),
name, typename(type));