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: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: John (zzz) Doe <john.doe@xz> (Comment)
Date: Sun, 18 Jan 2009 10:50:12 -0800	[thread overview]
Message-ID: <7vmydoxxcr.fsf_-_@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090118145429.GA27522@roro3.zxlink> (Kirill Smelkov's message of "Sun, 18 Jan 2009 17:54:29 +0300")

Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:

> On Fri, Jan 16, 2009 at 12:54:28PM +0100, Johannes Schindelin wrote:
> ...
>> > 	From: A U Thor (MonikeR) <a.u@thor.xz>
>> 
>> It is Philippe Bruhat (BooK), who sometimes forgets the closing 
>> parenthesis, and who is listed in .mailmap without the moniker.

It was not "forgets", but is an artifact that older mailinfo removed
parenthesis incorrectly (see below).

> So now I don't understand what to do.
>
> From one hand RFC822 says '(...)' is a comment, and from the other hand,
> we have a use case where one guy wants this to stay.
> ...
> commit 49bebfbe18dac296e5e246884bd98c1f90be9676
> Author: Kirill Smelkov <kirr@landau.phys.spbu.ru>
> Date:   Tue Jan 13 01:21:04 2009 +0300
>
>     mailinfo: more smarter removal of rfc822 comments from 'From'
>     
>     As described in RFC822 (3.4.3 COMMENTS, and  A.1.4.), comments, as e.g.
>     
>         John (zzz) Doe <john.doe@xz> (Comment)
>     
>     should "NOT [be] included in the destination mailbox"

The above quote from the RFC is irrelevant.  Note that it is only about
how you extract the e-mail address, discarding everything else.

What mailinfo wants to do is to separate the human-readable name and the
e-mail address, and we want to use _both_ results from it.

We separate a few example From: lines like this:

	Kirill Smelkov <kirr@smelkov.xz>
==>	AUTHOR_EMAIL="kirr@smelkov.xz" AUTHOR_NAME="Kirill Smelkov"

	kirr@smelkov.xz (Kirill Smelkov)
==>	AUTHOR_EMAIL="kirr@smelkov.xz" AUTHOR_NAME="Kirill Smelkov"

Traditionally, the way people spelled their name on From: line has been
either one of the above form.  Typically comment form (i.e. the second
one) adds the name at the end, while "Name <addr>" form has the name at
the front.  But I do not think RFC requires that, primarily because it is
all about discarding non-address part to find the e-mail address aka
"destination mailbox".  It does not specify how humans should interpret
the human readable name and the comment.

Now, why is the name not AUTHOR_NAME="(Kirill Smelkov)" in the latter
form?

It is just common sense transformation.  Otherwise it looks simply ugly,
and it is obvious that the parentheses is not part of the name of the
person who used "kirr@smelkov.xz (Kirill Smelkov)" on his From: line.

So we can separate "John (zzz) Doe <john.doe@xz> (Comment)" into:

	AUTHOR_EMAIL=john.doe@xz
        AUTHOR_NAME="John (zzz) Doe (Comment)"

and leave it like so, I think.

  reply	other threads:[~2009-01-18 18:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 11:32 What's cooking in git.git (Jan 2009, #03; Wed, 14) Junio C Hamano
2009-01-15 19:49 ` Kirill Smelkov
2009-01-15 20:39   ` Junio C Hamano
2009-01-16  8:08     ` Kirill Smelkov
2009-01-16  8:21       ` Junio C Hamano
2009-01-16 11:54         ` Johannes Schindelin
2009-01-18 14:54           ` Kirill Smelkov
2009-01-18 18:50             ` Junio C Hamano [this message]
2009-01-20 19:14               ` John (zzz) Doe <john.doe@xz> (Comment) Kirill Smelkov
2009-01-21  3:12                 ` Junio C Hamano
2009-01-21 20:30                   ` Kirill Smelkov

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=7vmydoxxcr.fsf_-_@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --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).