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

Re: What's in a name? Let's use a (uuid,name,email) triplet

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 20, 2010, 00:21 UTC
Message-ID
<201003200121.02560.jnareb@gmail.com>
In-Reply-To
<b4087cc51003190740h680b5dech4edd7a5000f180ee@mail.gmail.com>
On Fri, 19 Mar 2010, Michael Witten wrote:
> On Fri, Mar 19, 2010 at 08:08, Jakub Narebski <jnareb@gmail.com> wrote:
Show 12 quoted lines
>> This is non-solution to non-problem.
>>
>> First, the user.name and user.email does not need to be name and email
>> from some email account.  It might be some "canonical name" and
>> "canonical email".
> 
> The vast majority of patches come in through email; the git tools
> expect the user.name and user.email to reflect physical email account
> information.
> 
> You would be correct if it were not for the fact that git currently
> conflates identity and current email system.

It is not true. From the git-config(1) manpage, the description (meaning) of user.name and user.email is:

  user.email::
        Your email address to be recorded in any newly created commits.
        Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and
        'EMAIL' environment variables.  See linkgit:git-commit-tree[1].
  user.name::
        Your full name to be recorded in any newly created commits.
        Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME'
        environment variables.  See linkgit:git-commit-tree[1].
 
As you can see there is nothing about email, and physicsl email account.

It is true that git-send-email asks about the "From" email address to send email from with user.name + user.email as default value... unless either sendemail.from or --from option is used. [See also below].

Show 15 quoted lines
>> Second, there are (I think) two main sources of 'unstability' in
>> (name,email) pairs, namely A) misconfigured git (when fetching/pushing
>> using git itself), B) wrong name in email etc. (when sending patches
>> via email, 80% of patches in Linux kernel case).
>>
>> In the case of misconfigured git (case A) using UUID wouldn't help,
>> and only make it worse (you would have to configure the same UUID on
>> each machine).  What would help here is for git to be more strict and
>> perhaps forbid (some of) autogenerated names and emails.
> 
> The uuid string would be typed pretty much only during configuration;
> from there, it's basically just handled by the git tools. Hence, the
> uuid can indeed suffer from typos, but the name/email pair can suffer
> from not only typos but also real life name changing and email account
> switching.

You do not need (in theory at least) to change user.name nor user.email with real life name changing (like marriage or adoption) and email account switching.

[...]
Show 11 quoted lines
>> In the case of sending patches via email, you can use in-body 'From:'
>> to provide (name,email) part that is different than account used to
>> send email.
> 
> That's a good solution that I've considered, except for 2 reasons:
> 
>     * It involves much more opportunities for typos and/or the
>       configuration of a non-git tool for a git-specific purpose.
> 
>     * Many if not most email services will refuse to send messages
>       with forged/spoofed email addresses.

Actually git-send-email would automatically add in-body "From:" header if it is different from the "From:" address for email, and git-am would automatically prefer in-body "From:" over sender (in-header "From:") for authorship information.

Sender can be different from author of the patch, there is no problem with that.

What git can improve here (and perhaps already does it) is handling of non-ASCII characters in name (e.g. when commit message does not contain non US-ASCII letters, but user.name does). Perhaps it got corrected (improved) already.

P.S. Backward compatibility (older git-am) would probably require UUID in the form of canonical name+email, and use of in-body "From:" header to pass this UUID when sending patches.

Show 11 quoted lines
>> In the case of UUID you would need the same: some way to
>> provide UUID in patch (in email).
> 
> Yes, but that's automated by tools like git's format-patch. Not using
> something like format-patch or some other git interface is an
> 'out-of-band' communication and that author has essentially chosen not
> to care about his identity.
> 
> The use of the uuid field and allowing git tools to handle it is just
> a way to give a person who does care about his identity to keep it
> consistent.
git-send-email *already* automatically deals with sender != author.
[...]
Show 8 quoted lines
>> What could help in both cases is .mailmap being used (perhaps on
>> demand) in more git commands.  See Documentation/mailmap.txt
>> or e.g. git-shortlog(1) manpage.  It is quite advanced tool for
>> correcting mistakes (it can correct *both* user name, which is
>> most common usage, but also email address).
> 
> The disadvantage here is that it centralizes identity management and
> it is more demanding because the name/email pair is quite unstable.

How in-tree .mailmap file (in-tree like .gitignore and .gitattributes) is *centralized identity management*? It is as distributed as git repositories are.

On the other hand user.uuid is not distributed; for security reasons config is not transferred.

[...]
> [...], and with
> some clever encoding some statistics gathering programs could
> (possibly) run more efficiently.

Well, I guess it is statistics that dominates, not id part. Such tools shoud simply take .mailmap into account (unless they rely on git for that.).

-- 
Jakub Narebski
Poland
Previous: Reece Dunn
Message 104 of 104 in “What's in a name? Let's use a (uuid,name,email) triplet”
  1. Michael WittenMar 18, 2010
  2. Jon SmirlMar 18, 2010
  3. Michael WittenMar 18, 2010
  4. Linus TorvaldsMar 18, 2010
  5. Michael WittenMar 18, 2010
  6. Matthieu MoyMar 18, 2010
  7. Michael WittenMar 18, 2010
  8. Nicolas PitreMar 18, 2010
  9. tytso@mit.eduMar 18, 2010
  10. Michael WittenMar 18, 2010
  11. Martin LanghoffMar 18, 2010
  12. Michael WittenMar 18, 2010
  13. Martin LanghoffMar 18, 2010
  14. Michael WittenMar 18, 2010
  15. Martin LanghoffMar 18, 2010
  16. Michael WittenMar 18, 2010
  17. Nicolas PitreMar 18, 2010
  18. Michael WittenMar 18, 2010
  19. Nicolas PitreMar 19, 2010
  20. Michael WittenMar 19, 2010
  21. Nicolas PitreMar 19, 2010
  22. Reece DunnMar 18, 2010
  23. Michael WittenMar 18, 2010
  24. Paolo BonziniMar 19, 2010
  25. Michael WittenMar 19, 2010
  26. Paolo BonziniMar 19, 2010
  27. Michael WittenMar 19, 2010
  28. Paolo BonziniMar 19, 2010
  29. Michael WittenMar 19, 2010
  30. Wincent ColaiutaMar 19, 2010
  31. Michael WittenMar 19, 2010
  32. Martin LanghoffMar 19, 2010
  33. Linus TorvaldsMar 18, 2010
  34. Michael WittenMar 18, 2010
  35. Jon SmirlMar 18, 2010
  36. Jon SmirlMar 18, 2010
  37. Linus TorvaldsMar 18, 2010
  38. Jon SmirlMar 18, 2010
  39. Linus TorvaldsMar 18, 2010
  40. Jon SmirlMar 18, 2010
  41. Linus TorvaldsMar 18, 2010
  42. Linus TorvaldsMar 18, 2010
  43. Linus TorvaldsMar 18, 2010
  44. Junio C HamanoMar 19, 2010
  45. Reece DunnMar 18, 2010
  46. Linus TorvaldsMar 18, 2010
  47. Michael WittenMar 18, 2010
  48. Linus TorvaldsMar 18, 2010
  49. Michael WittenMar 18, 2010
  50. Linus TorvaldsMar 18, 2010
  51. Michael WittenMar 18, 2010
  52. Wincent ColaiutaMar 18, 2010
  53. Wincent ColaiutaMar 18, 2010
  54. Martin LanghoffMar 18, 2010
  55. Martin LanghoffMar 18, 2010
  56. Nicolas PitreMar 18, 2010
  57. Jon SmirlMar 18, 2010
  58. Nicolas PitreMar 18, 2010
  59. Jon SmirlMar 18, 2010
  60. Nicolas PitreMar 18, 2010
  61. Jon SmirlMar 19, 2010
  62. Linus TorvaldsMar 19, 2010
  63. Jon SmirlMar 19, 2010
  64. Linus TorvaldsMar 19, 2010
  65. Jon SmirlMar 19, 2010
  66. Nicolas PitreMar 19, 2010
  67. Jon SmirlMar 19, 2010
  68. Michael WittenMar 18, 2010
  69. A Large Angry SCMMar 18, 2010
  70. Sitaram ChamartyMar 19, 2010
  71. Nazri RamliyMar 19, 2010
  72. Michael HaggertyMar 19, 2010
  73. Michael WittenMar 19, 2010
  74. david@lang.hmMar 19, 2010
  75. Mike HommeyMar 19, 2010
  76. Reece DunnMar 19, 2010
  77. Michael WittenMar 19, 2010
  78. Michael WittenMar 19, 2010
  79. Reece DunnMar 19, 2010
  80. Michael J GruberMar 19, 2010
  81. david@lang.hmMar 19, 2010
  82. Michael WittenMar 19, 2010
  83. Jon SmirlMar 19, 2010
  84. Reece DunnMar 19, 2010
  85. Michael WittenMar 19, 2010
  86. Mark BrownMar 22, 2010
  87. Michael WittenMar 22, 2010
  88. Erik Faye-LundMar 24, 2010
  89. Michael WittenMar 24, 2010
  90. Michael WittenMar 19, 2010
  91. Michael HaggertyMar 19, 2010
  92. david@lang.hmMar 19, 2010
  93. Michael WittenMar 19, 2010
  94. Avi KivityMar 24, 2010
  95. Jakub NarebskiMar 19, 2010
  96. Jon SmirlMar 19, 2010
  97. Michael J GruberMar 19, 2010
  98. Michael WittenMar 19, 2010
  99. Erik Faye-LundMar 19, 2010
  100. Michael WittenMar 19, 2010
  101. Michael WittenMar 19, 2010
  102. Erik Faye-LundMar 19, 2010
  103. Reece DunnMar 19, 2010
  104. Jakub NarebskiMar 20, 2010

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.