summaryrefslogtreecommitdiff
path: root/mailinfo.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-20 04:37:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-20 04:37:15 (GMT)
commit74a74beee9676a21c089f569b75d386398a4867b (patch)
treebf55b5ff0285cea7c7c9599ea0507d19c6d3326d /mailinfo.c
parent872e2cf00a570e9d83e40343579a7bb092307d53 (diff)
parentfd1062e52e1a7ed3be443a320708ed849958c1bf (diff)
downloadgit-74a74beee9676a21c089f569b75d386398a4867b.zip
git-74a74beee9676a21c089f569b75d386398a4867b.tar.gz
git-74a74beee9676a21c089f569b75d386398a4867b.tar.bz2
Merge branch 'lt/mailinfo-in-body-header-continuation'
If a patch e-mail had its first paragraph after an in-body header indented (even after a blank line after the in-body header line), the indented line was mistook as a continuation of the in-body header. This has been fixed. * lt/mailinfo-in-body-header-continuation: mailinfo: fix in-body header continuations
Diffstat (limited to 'mailinfo.c')
-rw-r--r--mailinfo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mailinfo.c b/mailinfo.c
index a489d9d..6803775 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -757,8 +757,13 @@ static int handle_commit_msg(struct mailinfo *mi, struct strbuf *line)
assert(!mi->filter_stage);
if (mi->header_stage) {
- if (!line->len || (line->len == 1 && line->buf[0] == '\n'))
+ if (!line->len || (line->len == 1 && line->buf[0] == '\n')) {
+ if (mi->inbody_header_accum.len) {
+ flush_inbody_header_accum(mi);
+ mi->header_stage = 0;
+ }
return 0;
+ }
}
if (mi->use_inbody_headers && mi->header_stage) {