From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Kacper Kornet <draenog@pld-linux.org>,
"Robin H. Johnson" <robbat2@gentoo.org>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Apostrophe at the end of author name
Date: Fri, 29 Jun 2012 12:04:18 -0700 [thread overview]
Message-ID: <7vd34i3pot.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120629182944.GA20346@sigill.intra.peff.net> (Jeff King's message of "Fri, 29 Jun 2012 14:29:44 -0400")
Jeff King <peff@peff.net> writes:
> I'm tempting by the patch below, which would remove only the
> syntactically significant meta-characters ("\n", "<", and ">"), as well
> as trimming any stray whitespace at the edges. The problem is that we
> don't really have a clue how many people were relying on this trimming
> to clean up their names or emails, so there may be regressions for other
> people.
What do you exactly mean by "syntactically significant"? In other
words, "whose syntax"?
The code with the patch will leave "." out of the crud, so with
spearce:*:1000:1000:Shawn O. Pearce:/home/spearce:/bin/sh
we would get:
From: Shawn O. Pearce <spearce@spearce.org>
without dropping the "." in the name. Your MTA would likely to
reject it.
I think that quoting "syntactically significant meta-characters" in
the context of e-mail headers is a job for the MSA, and the human
readable names in GIT_AUTHOR_NAME should allow any reasonable
character. And I agree that it is a sane definition of "reasonable"
to exclude "\n", "<", and ">" (and nothing else), as they are the
only "syntactically significant" in the context of commit object
header.
The patch goes in the right direction in that sense, but you need to
make sure that git-send-email and git-imap-send (the only two MSA we
ship) do the right thing when fed names with ".", dq, etc. first.
> diff --git a/ident.c b/ident.c
> index 443c075..4552f8d 100644
> --- a/ident.c
> +++ b/ident.c
> @@ -127,15 +127,8 @@ const char *ident_default_date(void)
> static int crud(unsigned char c)
> {
> return c <= 32 ||
> - c == '.' ||
> - c == ',' ||
> - c == ':' ||
> - c == ';' ||
> c == '<' ||
> - c == '>' ||
> - c == '"' ||
> - c == '\\' ||
> - c == '\'';
> + c == '>';
> }
>
> /*
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-06-29 19:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 12:41 Apostrophe at the end of author name Kacper Kornet
2012-06-29 17:05 ` Robin H. Johnson
2012-06-29 17:43 ` Jeff King
2012-06-29 18:17 ` Kacper Kornet
2012-06-29 18:29 ` Jeff King
2012-06-29 19:04 ` Junio C Hamano [this message]
2012-06-29 19:35 ` Jeff King
2012-06-29 19:59 ` Kacper Kornet
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=7vd34i3pot.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=draenog@pld-linux.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=robbat2@gentoo.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.
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).