Merge branch 'sc/fmt-merge-msg-doc-markup-fix'
[gitweb.git] / builtin / merge.c
index 0ae099f746680e5c2fcc55dff56624da1619f2f1..b65eeaa87d303b027230bf2479f78c15a02ca08a 100644 (file)
@@ -940,7 +940,7 @@ static void write_merge_state(struct commit_list *remoteheads)
 
        strbuf_reset(&buf);
        if (fast_forward == FF_NO)
-               strbuf_addf(&buf, "no-ff");
+               strbuf_addstr(&buf, "no-ff");
        write_file_buf(git_path_merge_mode(), buf.buf, buf.len);
 }
 
@@ -1374,12 +1374,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                struct commit *commit;
 
                if (verbosity >= 0) {
-                       char from[GIT_SHA1_HEXSZ + 1], to[GIT_SHA1_HEXSZ + 1];
-                       find_unique_abbrev_r(from, head_commit->object.oid.hash,
-                                             DEFAULT_ABBREV);
-                       find_unique_abbrev_r(to, remoteheads->item->object.oid.hash,
-                                             DEFAULT_ABBREV);
-                       printf(_("Updating %s..%s\n"), from, to);
+                       printf(_("Updating %s..%s\n"),
+                              find_unique_abbrev(head_commit->object.oid.hash,
+                                                 DEFAULT_ABBREV),
+                              find_unique_abbrev(remoteheads->item->object.oid.hash,
+                                                 DEFAULT_ABBREV));
                }
                strbuf_addstr(&msg, "Fast-forward");
                if (have_message)