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

Re: git should not use a default user.email config value

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 9, 2013, 23:19 UTC
Message-ID
<20130809231928.GY14690@google.com>
In-Reply-To
<20130809223758.GB7160@sigill.intra.peff.net>
Jeff King wrote:
Show 15 quoted lines
> Yeah, there are basically three levels of ident:
>
>   1. The user told us explicitly (e.g., $EMAIL, user.email). Trust it.
>
>   2. We guessed and it looks reasonable (e.g., hostname is FQDN). Warn
>      but use it.
>
>   3. It looks obviously bogus (e.g., we do not have a domain name).
>      Reject it.
>
> We can move some cases from (2) down to (3), like when we use
> gethostname rather than /etc/mailname.  But we risk breaking people's
> existing setups. I don't think we know how many people rely on the
> implicit hostname selection and would be affected. I don't know if there
> is a good way to find out short of changing it and seeing who screams.

Yes. The result from a reverse DNS lookup is almost never the right mailname.

 * Small installations tend to use a smarthost.
 * Large installations tend to use more than one machine, and only
   one machine's name gets the MX record.
 
So except for cases where someone doesn't actually care about the
recorded author and just has a script making commits (such users
already suffer from the ".(none)" heuristic), I don't think this would
hurt anyone.
> We can put a deprecation warning in the release notes, but people tend
> to ignore those.

Not so much a deprecation warning as an "Here is one of the more noticeable changes in this release" announcement.

I'm pretty sure a deprecation warning would not help here. Either people are affected and we say "WARNING: You were doing something perfectly reasonable, but now we discourage it", or, more likely, people are not affected. Announcing a change too loudly to users not affected by it has a very bad side effect of training them not to pay much attention to release notes.

[...]
> Another option could to add an option to control the strictness.

I suspect a new config item for this is a bad idea, given how simple it is to choose a good default for everyone.

Thanks, Jonathan

Previous: Jeff KingNext: Jeff King
Message 12 of 46 in “Re: git should not use a default user.email config value”
  1. Jonathan NiederAug 9, 2013
  2. Thorsten GlaserAug 9, 2013
  3. Felipe ContrerasAug 9, 2013
  4. Matthieu MoyAug 13, 2013
  5. Jeff KingAug 9, 2013
  6. Junio C HamanoAug 9, 2013
  7. Jeff KingAug 10, 2013
  8. Jonathan NiederAug 10, 2013
  9. Jeff KingAug 10, 2013
  10. Jonathan NiederAug 10, 2013
  11. Jeff KingAug 10, 2013
  12. Jonathan NiederAug 9, 2013
  13. Jeff KingAug 10, 2013
  14. Michael HaggertyAug 10, 2013
  15. Jeff KingAug 10, 2013
  16. Michael HaggertyAug 10, 2013
  17. Thorsten GlaserAug 10, 2013
  18. Andreas SchwabAug 10, 2013
  19. Greg TroxelAug 12, 2013
  20. Junio C HamanoAug 10, 2013
  21. Andrew ArdillAug 12, 2013
  22. Jeff KingAug 12, 2013
  23. Michael HaggertyAug 12, 2013
  24. Jeff KingAug 12, 2013
  25. Andrew ArdillAug 12, 2013
  26. Jeff KingAug 12, 2013
  27. Andrew ArdillAug 13, 2013
  28. Jeff KingAug 13, 2013
  29. Jeff KingAug 13, 2013
  30. Andrew ArdillAug 13, 2013
  31. Jeff KingAug 13, 2013
  32. Junio C HamanoAug 13, 2013
  33. Matthieu MoyAug 14, 2013
  34. Jeff KingAug 14, 2013
  35. Matthieu MoyAug 14, 2013
  36. Junio C HamanoAug 14, 2013
  37. Matthieu MoyAug 14, 2013
  38. conditional config syntaxJeff King, Aug 14, 2013
  39. Junio C HamanoAug 14, 2013
  40. Michael HaggertyAug 14, 2013
  41. Jeff KingAug 14, 2013
  42. Junio C HamanoAug 13, 2013
  43. Matthieu MoyAug 13, 2013
  44. Aaron SchrabAug 11, 2013
  45. Matthieu MoyAug 13, 2013
  46. Thorsten GlaserAug 13, 2013

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.