summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-06-29 14:14:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-29 22:03:06 (GMT)
commit88ef402f9c18dafee5c8b222200f8f984b17a73e (patch)
treea4e7f3cab4e7fe561eee0789c1f615e44d7e8e6c /sequencer.c
parent84e213a30a1d4a3835e23b2f3d6217eb74ea55f7 (diff)
downloadgit-88ef402f9c18dafee5c8b222200f8f984b17a73e.zip
git-88ef402f9c18dafee5c8b222200f8f984b17a73e.tar.gz
git-88ef402f9c18dafee5c8b222200f8f984b17a73e.tar.bz2
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>
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 c4f4b7d..e286a6e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -568,10 +568,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))