RE: [DISCUSS] validation on git config user.email
- From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
- Date
- Sep 14, 2025, 16:59 UTC
- Message-ID
- <007701dc2599$02b6ca30$08245e90$@nexbridge.com>
- In-Reply-To
- <88e9b975-70a5-4773-bd08-634e56c491c6@app.fastmail.com>
On September 14, 2025 7:18 AM, Kristoffer Haugsbakk wrote:
Show 7 quoted lines
>On Fri, Sep 12, 2025, at 17:00, rsbecker@nexbridge.com wrote: >> On September 12, 2025 12:13 AM, usharerose wrote: >>>I'm a Git user and curious about a specific aspect of Git's design >>>regarding the 'user.email' configuration. >>> >>>Git allows any kind of values without restriction when setting >>>'user.email' via 'git config' (e.g., `git config user.email
"not-a-valid-email-
Show 18 quoted lines
>address"`). >>> >>>I'm interested in understanding the design philosophy or historical >>>reasons behind this 'lack' of validation. >>> >>>I've glanced through the documentations, archived emails, or forum >>>topics, but couldn't find a definitive or official statement. >>> >>>Thanks for your time and insights. >> >> Some customers integrate single sign-on (SSO) via the user.email value. >> In the case >> of one customer I helped, the value is an SSO token used by GitHub for >> their integration. The token value does not conform to any valid email >> address format. >> Adding an email validation will lock them out of using git. > >That sounds unreasonable.
In what way, may I ask? I have personally seen this done. Their core.email value is not a valid user name. It is a token with no @ or . characters. It is an alphanumeric string.