refs: convert update_ref and refs_update_ref to use struct object_id
[gitweb.git] / builtin / merge.c
index ab5ffe85e8f5d7a359004f2bbb52a5778d0b91b4..99d4b873f00ce8c4311f6b441b35f390e2e08d62 100644 (file)
@@ -405,9 +405,8 @@ static void finish(struct commit *head_commit,
                        printf(_("No merge message -- not updating HEAD\n"));
                else {
                        const char *argv_gc_auto[] = { "gc", "--auto", NULL };
-                       update_ref(reflog_message.buf, "HEAD",
-                               new_head->hash, head->hash, 0,
-                               UPDATE_REFS_DIE_ON_ERR);
+                       update_ref(reflog_message.buf, "HEAD", new_head, head,
+                                  0, UPDATE_REFS_DIE_ON_ERR);
                        /*
                         * We ignore errors in 'gc --auto', since the
                         * user should see them.
@@ -1261,8 +1260,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                        die(_("Can merge only exactly one commit into empty head"));
                remote_head_oid = &remoteheads->item->object.oid;
                read_empty(remote_head_oid->hash, 0);
-               update_ref("initial pull", "HEAD", remote_head_oid->hash,
-                          NULL, 0, UPDATE_REFS_DIE_ON_ERR);
+               update_ref("initial pull", "HEAD", remote_head_oid, NULL, 0,
+                          UPDATE_REFS_DIE_ON_ERR);
                goto done;
        }
 
@@ -1357,8 +1356,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                free(list);
        }
 
-       update_ref("updating ORIG_HEAD", "ORIG_HEAD", head_commit->object.oid.hash,
-                  NULL, 0, UPDATE_REFS_DIE_ON_ERR);
+       update_ref("updating ORIG_HEAD", "ORIG_HEAD",
+                  &head_commit->object.oid, NULL, 0, UPDATE_REFS_DIE_ON_ERR);
 
        if (remoteheads && !common) {
                /* No common ancestors found. */