git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: names using git config

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 25, 2009, 18:46 UTC
Message-ID
<7vy6rgb18m.fsf@alter.siamese.dyndns.org>
In-Reply-To
<376636be0906250309h6eb99296r4b81cf22985b690a@mail.gmail.com>
Ryan <ryanphilips19@googlemail.com> writes:
Show 18 quoted lines
> On Thu, Jun 25, 2009 at 10:41 AM, Junio C Hamano<gitster@pobox.com> wrote:
>> Ryan <ryanphilips19@googlemail.com> writes:
>>
>>> Hi,
>>>   Thank you for your response.
>>>
>>> 1) git config user.name 'Matthieu M. Moy' Works
>>> 2) git config user.name 'Matthieu M.'  does not
>>>
>>> Name cannot end in a '.' <dot>. in git config user.name
>>
>> That is correct, but I think we are a bit too strict in sanitizing names.
>> The code is ident.c::copy() whose intent was to sanitize useless runs of
>> commas we slurp from GECOS field, but the sanitization is done also for
>> anything specified by the end user.
>
> What are you suggesting me to do? Apply the below patch.
> I may want to submit patches to the linux kernel. Is this okay?

Sorry if I was unclear. I wasn't suggesting anything in particular to you. The only concrete thing addressed to you in my message was the answer "That is correct" and all the remainder of my message, including the patch, was primarily meant as illustration for other git developers to think about.

I do not think this matters that much in practice, as long as you are submitting patches via e-mail, the usual method for leaf-level developers. The maintainers apply your patches under the name your e-mail's From: header carries, not your user.name.

If you apply the patch to your copy of git, your "git log" output will start showing otherwise forbidden names that have leading or trailing dots (and other letters like semicolons) because your modified copy of "git commit" will allow them, and I think "git commit -s" also will pass the trailing dots intact, but that is about the extent of the damage. Without applying the patch, you will perhaps see your "Signed-off-by: Foo M <foo.m@example.com>" line without the trailing dots after the name, but that is something you can easily modify in your MUA when you are sending the e-mail out.

Previous: Ryan
Message 6 of 6 in “names using git config”
  1. RyanJun 24, 2009
  2. Matthieu MoyJun 24, 2009
  3. RyanJun 25, 2009
  4. Junio C HamanoJun 25, 2009
  5. RyanJun 25, 2009
  6. Junio C HamanoJun 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.