From: Jeff King <peff@peff.net>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: "Daniel P." <danpltile@gmail.com>, git@vger.kernel.org
Subject: Re: Git is removing . from the last part of user.name
Date: Sun, 22 Aug 2021 15:28:56 -0400 [thread overview]
Message-ID: <YSKleNynVrWWyyML@coredump.intra.peff.net> (raw)
In-Reply-To: <YSJuS1OoYsqgpF3j@camp.crustytoothpaste.net>
On Sun, Aug 22, 2021 at 03:33:31PM +0000, brian m. carlson wrote:
> On 2021-08-22 at 14:19:33, Daniel P. wrote:
> > If user.name's value has a . as the last character of the last part
> > of the name, git is removing it from commit operations. But git-config
> > shows the .
> >
> > example:
> >
> > in .gitconfig:
> >
> > [user]
> > name = Daniel P.
> >
> >
> > `git config user.name`:
> >
> > user.name=Daniel P.
> >
> >
> > from `git show`:
> >
> > Author: Daniel P <danpltile@gmail.com>
>
> Yes, it does appear we do that. We consider a period to be "crud" and
> strip off trailing crud. I think we should probably change that, since
> in some places people write their family name first, and so a name like
> “carlson brian m.” might be a thing people might want to write, in
> addition to this particular case.
>
> In any event, it's not very polite to "correct" people's names for them.
> I myself have certainly run into that often enough.
A lot of this name-cleanup code came from an era where we were inferring
names from gecos fields or from hacky email parsing.
I agree that if somebody has given us a definite name via config, we
should mostly leave it intact (the exception being syntactic elements
like <>). But we may still want to keep some of the "crud" cleanup when
we are pulling from those other sources.
OTOH, this crud stuff goes all the way back to 5e5128ed1c (Remove
extraneous ',' ';' and '.' characters from the full name gecos field.,
2005-04-17). We warn in pretty big letters these days about pulling an
ident from gecos, and our rfc822 parsing is more robust than it once
was. So it may be time to just retire most of it. The unfortunate thing
is we won't know how many people complain until it's released.
On a somewhat lesser note, I'm tempted to say that "." probably was
never that useful (compared to say, comma, which is the gecos
separator), and we could probably just drop it from the crud list.
-Peff
next prev parent reply other threads:[~2021-08-22 19:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-22 14:19 Git is removing . from the last part of user.name Daniel P.
2021-08-22 15:33 ` brian m. carlson
2021-08-22 19:28 ` Jeff King [this message]
2021-08-22 19:35 ` Jeff King
2021-08-23 16:25 ` Junio C Hamano
2023-07-30 21:38 ` Thomas J. Faughnan Jr.
2023-07-31 15:56 ` Junio C Hamano
2023-07-31 21:02 ` brian m. carlson
2023-07-31 21:44 ` [PATCH] ident: don't consider trailing dot crud brian m. carlson
2023-07-31 21:49 ` Junio C Hamano
2023-08-02 16:49 ` Junio C Hamano
2023-08-02 21:27 ` brian m. carlson
2023-08-02 21:38 ` Junio C Hamano
2023-07-31 21:56 ` Thomas J. Faughnan Jr.
2023-07-31 22:05 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YSKleNynVrWWyyML@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=danpltile@gmail.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
/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).