summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2016-06-29 16:14:46 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-29 15:03:06 -0700
commit88ef402f9c18dafee5c8b222200f8f984b17a73e (patch)
treea4e7f3cab4e7fe561eee0789c1f615e44d7e8e6c
parentcommit -C: skip blank lines at the beginning of the message (diff)
downloadtgif-88ef402f9c18dafee5c8b222200f8f984b17a73e.tar.xz
sequencer: use skip_blank_lines() to find the commit subject
Just like we already taught the find_commit_subject() function (to make it consistent with the code in pretty.c), we now simply skip leading blank lines of the commit message. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--sequencer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sequencer.c b/sequencer.c
index c4f4b7d571..e286a6ec13 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -568,10 +568,8 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
* information followed by "\n\n".
*/
p = strstr(msg.message, "\n\n");
- if (p) {
- p += 2;
- strbuf_addstr(&msgbuf, p);
- }
+ if (p)
+ strbuf_addstr(&msgbuf, skip_blank_lines(p + 2));
if (opts->record_origin) {
if (!has_conforming_footer(&msgbuf, NULL, 0))