refs: convert update_ref and refs_update_ref to use struct object_id
[git/git.git] / builtin / update-ref.c
index bf0f80e..f491cf1 100644 (file)
@@ -437,7 +437,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
                                  (oldval && !is_null_oid(&oldoid)) ? &oldoid : NULL,
                                  flags);
        else
                                  (oldval && !is_null_oid(&oldoid)) ? &oldoid : NULL,
                                  flags);
        else
-               return update_ref(msg, refname, oid.hash, oldval ? oldoid.hash : NULL,
+               return update_ref(msg, refname, &oid, oldval ? &oldoid : NULL,
                                  flags | create_reflog_flag,
                                  UPDATE_REFS_DIE_ON_ERR);
 }
                                  flags | create_reflog_flag,
                                  UPDATE_REFS_DIE_ON_ERR);
 }