diff options
author | Ralf Thielow <ralf.thielow@gmail.com> | 2013-04-07 17:25:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-07 09:30:39 -0700 |
commit | 89c3bbd808b352a9f4047523b81b72f22eefb868 (patch) | |
tree | 867fb7d509f8a3be4b6902d6983d18c39e0cf5fc | |
parent | fmt-merge-msg: respect core.commentchar in people credits (diff) | |
download | tgif-89c3bbd808b352a9f4047523b81b72f22eefb868.tar.xz |
fmt-merge-msg: use core.commentchar in tag signatures completely
Commit eff80a9 (Allow custom "comment char") introduced a custom
comment character for commit messages but didn't use it completely
in the tag signature part.
This commit fixes that.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/fmt-merge-msg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c index 4bf167ad8a..db76d9f3a8 100644 --- a/builtin/fmt-merge-msg.c +++ b/builtin/fmt-merge-msg.c @@ -503,14 +503,18 @@ static void fmt_merge_msg_sigs(struct strbuf *out) } else { if (tag_number == 2) { struct strbuf tagline = STRBUF_INIT; - strbuf_addf(&tagline, "\n# %s\n", - origins.items[first_tag].string); + strbuf_addch(&tagline, '\n'); + strbuf_add_commented_lines(&tagline, + origins.items[first_tag].string, + strlen(origins.items[first_tag].string)); strbuf_insert(&tagbuf, 0, tagline.buf, tagline.len); strbuf_release(&tagline); } - strbuf_addf(&tagbuf, "\n# %s\n", - origins.items[i].string); + strbuf_addch(&tagbuf, '\n'); + strbuf_add_commented_lines(&tagbuf, + origins.items[i].string, + strlen(origins.items[i].string)); fmt_tag_signature(&tagbuf, &sig, buf, len); } strbuf_release(&sig); |