Browse Source

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>
maint
Johannes Schindelin 9 years ago committed by Junio C Hamano
parent
commit
88ef402f9c
  1. 6
      sequencer.c

6
sequencer.c

@ -568,10 +568,8 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
* information followed by "\n\n". * information followed by "\n\n".
*/ */
p = strstr(msg.message, "\n\n"); p = strstr(msg.message, "\n\n");
if (p) { if (p)
p += 2; strbuf_addstr(&msgbuf, skip_blank_lines(p + 2));
strbuf_addstr(&msgbuf, p);
}


if (opts->record_origin) { if (opts->record_origin) {
if (!has_conforming_footer(&msgbuf, NULL, 0)) if (!has_conforming_footer(&msgbuf, NULL, 0))

Loading…
Cancel
Save