mailinfo: handle in-body header continuations
commit6b4b013f1884a3b5e67877d65a9f1da598ab4a6f
authorJonathan Tan <jonathantanmy@google.com>
Tue, 20 Sep 2016 17:17:53 +0000 (20 10:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Sep 2016 17:23:11 +0000 (21 10:23 -0700)
tree3076091dfce8fc0c844c9bbea2825ba25780902b
parent9c5681da88825c4320d3f7142ed320e6984c2377
mailinfo: handle in-body header continuations

Mailinfo currently handles multi-line headers, but it does not handle
multi-line in-body headers. Teach it to handle such headers, for
example, for this input:

  From: author <author@example.com>
  Date: Fri, 9 Jun 2006 00:44:16 -0700
  Subject: a very long
   broken line

  Subject: another very long
   broken line

interpret the in-body subject to be "another very long broken line"
instead of "another very long".

An existing test (t/t5100/msg0015) has an indented line immediately
after an in-body header - it has been modified to reflect the new
functionality.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 files changed:
mailinfo.c
mailinfo.h
t/t4150-am.sh
t/t5100-mailinfo.sh
t/t5100/info0018 [new file with mode: 0644]
t/t5100/info0018--no-inbody-headers [new file with mode: 0644]
t/t5100/msg0015
t/t5100/msg0018 [new file with mode: 0644]
t/t5100/msg0018--no-inbody-headers [new file with mode: 0644]
t/t5100/patch0018 [new file with mode: 0644]
t/t5100/patch0018--no-inbody-headers [new file with mode: 0644]
t/t5100/sample.mbox