Skip to content

Commit 88ef402

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 84e213a commit 88ef402

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sequencer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,8 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
568568
* information followed by "\n\n".
569569
*/
570570
p = strstr(msg.message, "\n\n");
571-
if (p) {
572-
p += 2;
573-
strbuf_addstr(&msgbuf, p);
574-
}
571+
if (p)
572+
strbuf_addstr(&msgbuf, skip_blank_lines(p + 2));
575573

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

0 commit comments

Comments
 (0)