diff options
author | Tay Ray Chuan <rctay89@gmail.com> | 2010-05-11 01:17:52 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-10 12:02:20 -0700 |
commit | f0ecac2b70bf6b44b89dfa493abd2f544010b1eb (patch) | |
tree | 2fd6c98705ae583f32b25d9ee36567e5a2554b65 /builtin/fmt-merge-msg.c | |
parent | 8c6bdfdf8ba9a3d7a03d64b7a98305a460921130 (diff) | |
download | git-f0ecac2b70bf6b44b89dfa493abd2f544010b1eb.tar.gz |
merge: --log appends shortlog to message if specified
When the user specifies a message, use fmt_merge_msg_shortlog() to
append the shortlog.
Previously, when a message was specified, we ignored the merge title
("Merge <foo> into <bar>") and shortlog from fmt_merge_msg().
Update the documentation for -m to reflect this too.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fmt-merge-msg.c')
-rw-r--r-- | builtin/fmt-merge-msg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c index 48548cf11b..44204257c7 100644 --- a/builtin/fmt-merge-msg.c +++ b/builtin/fmt-merge-msg.c @@ -298,6 +298,9 @@ static int do_fmt_merge_msg(int merge_title, int merge_summary, rev.ignore_merges = 1; rev.limited = 1; + if (suffixcmp(out->buf, "\n")) + strbuf_addch(out, '\n'); + for (i = 0; i < origins.nr; i++) shortlog(origins.items[i].string, origins.items[i].util, head, &rev, limit, out); |