summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-28 18:25:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-28 18:25:50 (GMT)
commit4966b58f3e1f295e3fb22560006b1db717b56f37 (patch)
treeaf3813c17a7bc43822bd9d7b0b6ca008eeff8789 /sequencer.c
parent053e2fb5798374d1628b8cd4d797a64e48c944b6 (diff)
parent054a5aee6f3e8e90d96f7b3f76f5f55752561c59 (diff)
downloadgit-4966b58f3e1f295e3fb22560006b1db717b56f37.zip
git-4966b58f3e1f295e3fb22560006b1db717b56f37.tar.gz
git-4966b58f3e1f295e3fb22560006b1db717b56f37.tar.bz2
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
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sequencer.c b/sequencer.c
index c6362d6..a33c39b 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))