refs/files-backend: convert many internals to struct object_id
[gitweb.git] / builtin / checkout.c
index bfa5419f335dc1db98059869de24f152cffb9aa6..afa99fb8a02ef9118cb99df0233393ab5721bfe4 100644 (file)
@@ -393,7 +393,7 @@ static int checkout_paths(const struct checkout_opts *opts,
                die(_("unable to write new index file"));
 
        read_ref_full("HEAD", 0, rev.hash, NULL);
-       head = lookup_commit_reference_gently(rev.hash, 1);
+       head = lookup_commit_reference_gently(&rev, 1);
 
        errs |= post_checkout_hook(head, head, 0);
        return errs;
@@ -833,7 +833,7 @@ static int switch_branches(const struct checkout_opts *opts,
        int flag, writeout_error = 0;
        memset(&old, 0, sizeof(old));
        old.path = path_to_free = resolve_refdup("HEAD", 0, rev.hash, &flag);
-       old.commit = lookup_commit_reference_gently(rev.hash, 1);
+       old.commit = lookup_commit_reference_gently(&rev, 1);
        if (!(flag & REF_ISSYMREF))
                old.path = NULL;
 
@@ -1047,7 +1047,7 @@ static int parse_branchname_arg(int argc, const char **argv,
        else
                new->path = NULL; /* not an existing branch */
 
-       new->commit = lookup_commit_reference_gently(rev->hash, 1);
+       new->commit = lookup_commit_reference_gently(rev, 1);
        if (!new->commit) {
                /* not a commit */
                *source_tree = parse_tree_indirect(rev->hash);