diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-25 11:36:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-25 11:36:25 -0700 |
commit | 4f64464023d0bf7ce065f1dccaf267ca38b3521f (patch) | |
tree | 0a4e42e08c200ab448c9879528e7662e1b8c52ce /builtin/fmt-merge-msg.c | |
parent | Sync with maint (diff) | |
parent | Git 1.7.10.3 (diff) | |
download | tgif-4f64464023d0bf7ce065f1dccaf267ca38b3521f.tar.xz |
Sync with 1.7.10.3
Diffstat (limited to 'builtin/fmt-merge-msg.c')
-rw-r--r-- | builtin/fmt-merge-msg.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c index a517f1794a..d42015d867 100644 --- a/builtin/fmt-merge-msg.c +++ b/builtin/fmt-merge-msg.c @@ -462,7 +462,10 @@ static void fmt_tag_signature(struct strbuf *tagbuf, strbuf_add(tagbuf, tag_body, buf + len - tag_body); } strbuf_complete_line(tagbuf); - strbuf_add_lines(tagbuf, "# ", sig->buf, sig->len); + if (sig->len) { + strbuf_addch(tagbuf, '\n'); + strbuf_add_lines(tagbuf, "# ", sig->buf, sig->len); + } } static void fmt_merge_msg_sigs(struct strbuf *out) @@ -627,8 +630,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out, rev.ignore_merges = 1; rev.limited = 1; - if (suffixcmp(out->buf, "\n")) - strbuf_addch(out, '\n'); + strbuf_complete_line(out); for (i = 0; i < origins.nr; i++) shortlog(origins.items[i].string, |