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

Re: [DISCUSS] validation on git config user.email

From
Uusharerose <ushareroses@gmail.com>
Date
Sep 12, 2025, 18:02 UTC
Message-ID
<CAJKmQvfJVBrmWofs12CAY99HCENASkr1Utjg98TnP7KQ155WNg@mail.gmail.com>
In-Reply-To
<45640ca0-b3c5-4627-b41a-0b58ff559d2b@gmail.com>
On Fri, Sep 12, 2025 at 11:39 PM Thomas Guyot <tguyot@gmail.com> wrote:
Show 14 quoted lines
> To add to the other valid responses, email is something that can be
> validated by hooks server-side to enforce not only proper formatting but
> also valid users are being used, ex. validating against an LDAP directory.
>
> This is much better that validating it at the command level (although
> IIRC git-comit does warn about possibly unset/invalid email addresses).
> In addition, unless git starts enforcing stricter rules on the commit
> message format (which would be a breaking change), nothing else can
> prevent someone from constructing commits with invalid emails, so checks
> by git-commit alone can't be strictly enforceable.
>
> Furthermore, imported commits from other SCMs may have odd user
> name/email and it may be desirable to keep then in their original
> formats rather than turning them into fake email addresses.

Thanks for your detailed reply, Thomas. I've understood the scenarios you mentioned.

My intention behind the original question was not to suggest adding the feature of validation for email legitimacy, but rather to inquire about and understand the rationale behind the initial design decision to forgo strict validation when the user identity feature (user.email) was implemented.

So, are the use cases above mentioned more of a case of "exploiting a perceived backdoor that later became justified" or "a thoughtfully made design decision from the beginning"?

Previous: Thomas GuyotNext: Kristoffer Haugsbakk
Message 12 of 14 in “[DISCUSS] validation on git config user.email”
  1. ushareroseSep 12, 2025
  2. rsbecker@nexbridge.comSep 12, 2025
  3. Junio C HamanoSep 12, 2025
  4. ushareroseSep 12, 2025
  5. ushareroseSep 12, 2025
  6. rsbecker@nexbridge.comSep 12, 2025
  7. ushareroseSep 12, 2025
  8. Kristoffer HaugsbakkSep 14, 2025
  9. rsbecker@nexbridge.comSep 14, 2025
  10. Konstantin RyabitsevSep 12, 2025
  11. Thomas GuyotSep 12, 2025
  12. ushareroseSep 12, 2025
  13. Kristoffer HaugsbakkSep 14, 2025
  14. ushareroseSep 15, 2025

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.