rebase -p: fix incorrect commit message when calling `git merge`.
[gitweb.git] / builtin / fmt-merge-msg.c
index 10cbb434163f2f6e60e0cc9cb55bab220004a549..27a2361e91dcd94cba4556b04b028286835f8823 100644 (file)
@@ -408,7 +408,8 @@ static void shortlog(const char *name,
 }
 
 static void fmt_merge_msg_title(struct strbuf *out,
-       const char *current_branch) {
+                               const char *current_branch)
+{
        int i = 0;
        char *sep = "";
 
@@ -570,7 +571,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);