Merge branch 'js/find-commit-subject-ignore-leading-blanks' into maint
A helper function that takes the contents of a commit object and finds its subject line did not ignore leading blank lines, as is commonly done by other codepaths. Make it ignore leading blank lines to match. * js/find-commit-subject-ignore-leading-blanks: reset --hard: skip blank lines when reporting the commit subject sequencer: use skip_blank_lines() to find the commit subject commit -C: skip blank lines at the beginning of the message commit.c: make find_commit_subject() more robust pretty: make the skip_blank_lines() function public
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user