On 2025-09-12 00:13, usharerose wrote:
I'm interested in understanding the design philosophy or historical
reasons behind this 'lack' of validation.
Hi usharerose,
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.
Regards,
--
Thomas