Convert the verify_pack callback to struct object_id
[gitweb.git] / builtin / pull.c
index d8aa26d8abe4e436f95f4476133967cf17f29988..2ffb6569a9b81dfc55088762447a7493bfc38463 100644 (file)
@@ -332,7 +332,7 @@ static int git_pull_config(const char *var, const char *value, void *cb)
  */
 static void get_merge_heads(struct oid_array *merge_heads)
 {
-       const char *filename = git_path("FETCH_HEAD");
+       const char *filename = git_path_fetch_head();
        FILE *fp;
        struct strbuf sb = STRBUF_INIT;
        struct object_id oid;
@@ -698,10 +698,10 @@ static int get_octopus_merge_base(struct object_id *merge_base,
 {
        struct commit_list *revs = NULL, *result;
 
-       commit_list_insert(lookup_commit_reference(curr_head->hash), &revs);
-       commit_list_insert(lookup_commit_reference(merge_head->hash), &revs);
+       commit_list_insert(lookup_commit_reference(curr_head), &revs);
+       commit_list_insert(lookup_commit_reference(merge_head), &revs);
        if (!is_null_oid(fork_point))
-               commit_list_insert(lookup_commit_reference(fork_point->hash), &revs);
+               commit_list_insert(lookup_commit_reference(fork_point), &revs);
 
        result = reduce_heads(get_octopus_merge_bases(revs));
        free_commit_list(revs);
@@ -791,7 +791,7 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
        if (read_cache_unmerged())
                die_resolve_conflict("pull");
 
-       if (file_exists(git_path("MERGE_HEAD")))
+       if (file_exists(git_path_merge_head()))
                die_conclude_merge();
 
        if (get_oid("HEAD", &orig_head))
@@ -865,9 +865,9 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
                struct commit_list *list = NULL;
                struct commit *merge_head, *head;
 
-               head = lookup_commit_reference(orig_head.hash);
+               head = lookup_commit_reference(&orig_head);
                commit_list_insert(head, &list);
-               merge_head = lookup_commit_reference(merge_heads.oid[0].hash);
+               merge_head = lookup_commit_reference(&merge_heads.oid[0]);
                if (is_descendant_of(merge_head, list)) {
                        /* we can fast-forward this without invoking rebase */
                        opt_ff = "--ff-only";