From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Alejandro R. Sedeño" <asedeno@mit.edu>,
git@vger.kernel.org,
"Michael J Gruber" <git@drmicha.warpmail.net>,
"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH] git-svn: Add a svn-remote.<name>.pushurl config key
Date: Fri, 8 Apr 2011 16:54:37 -0400 [thread overview]
Message-ID: <20110408205437.GB16540@sigill.intra.peff.net> (raw)
In-Reply-To: <7vmxk033ic.fsf@alter.siamese.dyndns.org>
On Fri, Apr 08, 2011 at 01:13:47PM -0700, Junio C Hamano wrote:
> A Tangent.
>
> >> X-Mailer: git-send-email 1.7.4.2.1.gd6f1f
> >> In-Reply-To: <1302102336-8800-1-git-send-email-asedeno@mit.edu>
>
> This is not about this particular patch, but the From: address
> git-send-email generates for you does not seem to quote the human readable
> part, even though the name has a "." in it.
>
> Your mails seem to reach the recipients fine, but I saw my reply to you
> bounce, because "To:" or "Cc:" in my reply end up having the "R." part not
> quoted, like this:
>
> (wrong) To: Alejandro R. Sedeño <asedeno@mit.edu>
> (correct) To: "Alejandro R. Sedeño" <asedeno@mit.edu>
Hmm. His case has an extra level of confusion, though, because the
non-ascii characters all need rfc2047 encoding. So two emails I've seen
from him have:
From: =?UTF-8?B?IkFsZWphbmRybyBSLiBTZWRlw7FvIg==?= <asedeno@MIT.EDU>
From: =?UTF-8?q?Alejandro=20R=2E=20Sede=C3=B1o?= <asedeno@mit.edu>
where the first is from Icedove (i.e., Thunderbird) and the second is
from git-send-email.
The first one contains double-quotes embedded in the encoded portion.
The second one (send-email) does not.
But I'm not clear on if that is necessary. I thought that rfc2047 could
only encode a "word" in the "phrase" portion in an address header,
meaning the parsing should be unambiguous.
That being said, I think we are not quoting in the non-rfc2047 case,
anyway, and that is a bug. rfc5322 says this (section 4.1, Miscellaneous
obsolete tokens):
Note: The "period" (or "full stop") character (".") in obs-phrase is
not a form that was allowed in earlier versions of this or any other
specification. Period (nor any other character from specials) was not
allowed in phrase because it introduced a parsing difficulty
distinguishing between phrases and portions of an addr-spec (see
section 4.4). It appears here because the period character is
currently used in many messages in the display-name portion of
addresses, especially for initials in names, and therefore must be
interpreted properly.
which recognizes this situation. But being in the obsolete section, I
think it is saying "you still need to interpret these, but don't
generate them". IOW, we should still be generating quotes now.
I think format-patch is totally lacking in this type of quoting. If I
do:
$ git init
$ git config user.name '<bogus> with "quotes"'
$ echo contents >foo && git add . && git commit -m foo
$ git format-patch --stdout --root
...
From: bogus with "quotes <peff@peff.net>
So some of my magic characters are just stripped, and some of them get
included, making the output bogus (the stripping of <> actually happens
within git, so the commit itself is missing them).
Not that I think a name like that is sane, but probably we should be
double-quoting properly anyway, and then the "." case would just fall
out.
-Peff
next prev parent reply other threads:[~2011-04-08 20:54 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 19:09 [PATCHv2 0/2] a couple of git-svn patches Alejandro R. Sedeño
2011-04-04 19:09 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
2011-04-04 21:52 ` Eric Wong
2011-04-04 22:16 ` James Y Knight
2011-04-04 22:54 ` Eric Wong
2011-04-05 15:11 ` "Alejandro R. Sedeño"
2011-04-05 20:15 ` [PATCH] git-svn: Add a svn-remote.<name>.pushurl config key Alejandro R. Sedeño
2011-04-05 20:25 ` "Alejandro R. Sedeño"
2011-04-05 21:09 ` Eric Wong
2011-04-06 12:53 ` Michael J Gruber
2011-04-06 13:04 ` "Alejandro R. Sedeño"
2011-04-06 13:12 ` Michael J Gruber
2011-04-06 15:05 ` Alejandro R. Sedeño
2011-04-06 15:22 ` Michael J Gruber
2011-04-06 15:34 ` "Alejandro R. Sedeño"
2011-04-06 15:38 ` Michael J Gruber
2011-04-08 14:57 ` Alejandro R. Sedeño
2011-04-08 20:13 ` Junio C Hamano
2011-04-08 20:25 ` Michael J Gruber
2011-04-08 20:54 ` Jeff King [this message]
[not found] ` <7v4o6830cc.fsf@alter.siamese.dyndns.org>
2011-04-08 21:32 ` Jeff King
2011-04-08 22:25 ` Junio C Hamano
2011-04-08 22:40 ` Jeff King
2011-04-08 22:43 ` Jeff King
2011-04-22 19:11 ` "Alejandro R. Sedeño"
2011-04-22 19:36 ` Jeff King
2011-04-22 19:40 ` "Alejandro R. Sedeño"
2011-04-09 22:47 ` Eric Wong
2011-04-06 12:44 ` Michael J Gruber
2011-04-06 12:56 ` "Alejandro R. Sedeño"
2011-04-04 19:09 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
2011-04-04 21:53 ` Eric Wong
[not found] ` <7voc4l5hm5.fsf@alter.siamese.dyndns.org>
2011-04-05 8:15 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110408205437.GB16540@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=asedeno@mit.edu \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).