Merge branch 'jn/reproducible-build' of ../git-gui into jn/reproducible-build
[gitweb.git] / builtin / pull.c
index 0413c78a3a30920ec638eae8be18abfe012893eb..f7e2c4f2ecd0ce5c24dce1fceb614d85013810cb 100644 (file)
@@ -548,7 +548,7 @@ static int pull_into_void(const struct object_id *merge_head,
        if (checkout_fast_forward(&empty_tree_oid, merge_head, 0))
                return 1;
 
-       if (update_ref("initial pull", "HEAD", merge_head->hash, curr_head->hash, 0, UPDATE_REFS_DIE_ON_ERR))
+       if (update_ref("initial pull", "HEAD", merge_head, curr_head, 0, UPDATE_REFS_DIE_ON_ERR))
                return 1;
 
        return 0;
@@ -751,12 +751,15 @@ static int get_octopus_merge_base(struct object_id *merge_base,
        if (!is_null_oid(fork_point))
                commit_list_insert(lookup_commit_reference(fork_point), &revs);
 
-       result = reduce_heads(get_octopus_merge_bases(revs));
+       result = get_octopus_merge_bases(revs);
        free_commit_list(revs);
+       reduce_heads_replace(&result);
+
        if (!result)
                return 1;
 
        oidcpy(merge_base, &result->item->object.oid);
+       free_commit_list(result);
        return 0;
 }