]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/update-index.c
refs: convert read_ref and read_ref_full to object_id
[thirdparty/git.git] / builtin / update-index.c
index bf7420b808fd1e0314d981bf65073df62f7578a4..24f4b28951e4ec4b78406e09efe26c2706016aa0 100644 (file)
@@ -679,9 +679,9 @@ static int unresolve_one(const char *path)
 
 static void read_head_pointers(void)
 {
-       if (read_ref("HEAD", head_oid.hash))
+       if (read_ref("HEAD", &head_oid))
                die("No HEAD -- no initial commit yet?");
-       if (read_ref("MERGE_HEAD", merge_head_oid.hash)) {
+       if (read_ref("MERGE_HEAD", &merge_head_oid)) {
                fprintf(stderr, "Not in the middle of a merge.\n");
                exit(0);
        }
@@ -721,7 +721,7 @@ static int do_reupdate(int ac, const char **av,
                       PATHSPEC_PREFER_CWD,
                       prefix, av + 1);
 
-       if (read_ref("HEAD", head_oid.hash))
+       if (read_ref("HEAD", &head_oid))
                /* If there is no HEAD, that means it is an initial
                 * commit.  Update everything in the index.
                 */