git notes merge: List conflicting notes in notes merge commit message
[gitweb.git] / builtin / notes.c
index b5385238eada5b05351c3587483f92824f7ca68d..ee1df7030caceb9ffe2f0500698e7fa95dd196f3 100644 (file)
@@ -902,7 +902,7 @@ static int merge(int argc, const char **argv, const char *prefix)
 
        strbuf_addf(&msg, "notes: Merged notes from %s into %s",
                    remote_ref.buf, default_notes_ref());
-       o.commit_msg = msg.buf + 7; // skip "notes: " prefix
+       strbuf_add(&(o.commit_msg), msg.buf + 7, msg.len - 7); /* skip "notes: " */
 
        result = notes_merge(&o, t, result_sha1);