Sync with 2.15.3
[gitweb.git] / builtin / fmt-merge-msg.c
index e99b5ddbf9a51be17bc0d976c942c29afe6563cd..8e8a15ea4ad6de2bb73f63d39a0895a263918774 100644 (file)
@@ -377,7 +377,8 @@ static void shortlog(const char *name,
                        string_list_append(&subjects,
                                           oid_to_hex(&commit->object.oid));
                else
-                       string_list_append(&subjects, strbuf_detach(&sb, NULL));
+                       string_list_append_nodup(&subjects,
+                                                strbuf_detach(&sb, NULL));
        }
 
        if (opts->credit_people)
@@ -571,7 +572,7 @@ static void find_merge_parents(struct merge_parents *result,
        head_commit = lookup_commit(head);
        if (head_commit)
                commit_list_insert(head_commit, &parents);
-       parents = reduce_heads(parents);
+       reduce_heads_replace(&parents);
 
        while (parents) {
                struct commit *cmit = pop_commit(&parents);
@@ -603,7 +604,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
 
        /* get current branch */
        current_branch = current_branch_to_free =
-               resolve_refdup("HEAD", RESOLVE_REF_READING, head_oid.hash, NULL);
+               resolve_refdup("HEAD", RESOLVE_REF_READING, &head_oid, NULL);
        if (!current_branch)
                die("No current branch");
        if (starts_with(current_branch, "refs/heads/"))