git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 12, 2009, 23:27 UTC
Message-ID
<7v63kkgl5b.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090112223447.GA5948@roro3.zxlink>
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)
Previous: Kirill SmelkovNext: Kirill Smelkov
Message 10 of 12 in “mailinfo: correctly handle multiline 'Subject:' header”
  1. mailinfo: correctly handle multiline 'Subject:' headerKirill Smelkov, Dec 26, 2008
  2. Kirill SmelkovJan 7, 2009
  3. Junio C HamanoJan 8, 2009
  4. Junio C HamanoJan 8, 2009
  5. Alexander PotashevJan 8, 2009
  6. Kirill SmelkovJan 8, 2009
  7. Kirill SmelkovJan 10, 2009
  8. Junio C HamanoJan 11, 2009
  9. Kirill SmelkovJan 12, 2009
  10. Junio C HamanoJan 12, 2009
  11. Kirill SmelkovJan 13, 2009
  12. Kirill SmelkovJan 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.