[PATCH 2/5] sequencer: use skip_blank_lines() to find the commit subject
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 29, 2016, 14:14 UTC
- Message-ID
- <69bc831064331117141c7153dc72e9e658691155.1467209576.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1467209576.git.johannes.schindelin@gmx.de>
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> --- sequencer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sequencer.c b/sequencer.c index 7d7add6..cdfac82 100644 --- a/sequencer.c +++ b/sequencer.c @@ -544,10 +544,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))
-- 2.9.0.270.g810e421