git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Cc: Alexander Potashev <aspotashev@gmail.com>, git@vger.kernel.org
Subject: Re: [BUG PATCH RFC] mailinfo: correctly handle multiline 'Subject:' header
Date: Mon, 12 Jan 2009 15:27:44 -0800	[thread overview]
Message-ID: <7v63kkgl5b.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090112223447.GA5948@roro3.zxlink> (Kirill Smelkov's message of "Tue, 13 Jan 2009 01:34:47 +0300")

Kirill Smelkov <kirr@landau.phys.spbu.ru> 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@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

>  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)

  reply	other threads:[~2009-01-12 23:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 18:38 [PATCH RFC] mailinfo: correctly handle multiline 'Subject:' header Kirill Smelkov
2009-01-07 22:43 ` [BUG PATCH " Kirill Smelkov
2009-01-08  8:13   ` Junio C Hamano
2009-01-08  8:35     ` Junio C Hamano
2009-01-08 23:11       ` Kirill Smelkov
2009-01-10 10:12         ` Kirill Smelkov
2009-01-11  1:54         ` Junio C Hamano
2009-01-12 22:34           ` Kirill Smelkov
2009-01-12 23:27             ` Junio C Hamano [this message]
2009-01-13  9:39               ` Kirill Smelkov
2009-01-14  8:19                 ` Kirill Smelkov
2009-01-08 10:08 ` [PATCH " Alexander Potashev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v63kkgl5b.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=aspotashev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kirr@landau.phys.spbu.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).