Re: [BUG PATCH RFC] mailinfo: correctly handle multiline 'Subject:' header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kirill Smelkov <kirr@xxxxxxxxxxxxxxxxxxx> writes:

> 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@xxxxxxxxxxx>
> +From: A
> +      U
> +      Thor
> +      <a.u.thor@xxxxxxxxxxx>
>  Date: Fri, 9 Jun 2006 00:44:16 -0700
>  Subject: [PATCH] a commit.

I think this is a reasonable change.

But doesn't this

>  From nobody Mon Sep 17 00:00:00 2001
> -From: A
> +From: A (zzz)
>        U
>        Thor
> -      <a.u.thor@xxxxxxxxxxx>
> +      <a.u.thor@xxxxxxxxxxx> (Comment)

regress for people who spell their names like this?

	From: john.doe@xxxxxxxx (John Doe)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux