Re: [BUG PATCH RFC] mailinfo: correctly handle multiline 'Subject:' header
Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:
Show 27 quoted lines
> diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
> index f7c8c08..6d72c1b 100644
> --- a/builtin-mailinfo.c
> +++ b/builtin-mailinfo.c
> @@ -860,6 +860,7 @@ static void handle_info(void)
> }
> output_header_lines(fout, "Subject", hdr);
> } else if (!memcmp(header[i], "From", 4)) {
> + cleanup_space(hdr);
> handle_from(hdr);
> fprintf(fout, "Author: %s\n", name.buf);
> fprintf(fout, "Email: %s\n", email.buf);
> diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox
> index 4bf7947..d465685 100644
> --- a/t/t5100/sample.mbox
> +++ b/t/t5100/sample.mbox
> @@ -2,7 +2,10 @@
>
>
> From nobody Mon Sep 17 00:00:00 2001
> -From: A U Thor <a.u.thor@example.com>
> +From: A
> + U
> + Thor
> + <a.u.thor@example.com>
> Date: Fri, 9 Jun 2006 00:44:16 -0700
> Subject: [PATCH] a commit.I think this is a reasonable change.
But doesn't this
Show 7 quoted lines
> From nobody Mon Sep 17 00:00:00 2001
> -From: A
> +From: A (zzz)
> U
> Thor
> - <a.u.thor@example.com>
> + <a.u.thor@example.com> (Comment)
regress for people who spell their names like this?
From: john.doe@email.xz (John Doe)