Thread (102 messages) flat view 102 messages, 21 authors, 2016-06-15

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

From: Michael Witten <hidden>
Date: 2016-06-15 22:48:27

On Fri, Mar 19, 2010 at 08:08, Jakub Narebski [off-list ref] wrote:
Michael Witten [off-list ref] writes:
quoted
Short Version:
-------------


Rather than use a (name,email) pair to identify people, let's use
a (uuid,name,email) triplet.

The uuid can be any piece of information that a user of git determines
to be reasonably unique across space and time and that is intended to
be used by that user virtually forever (at least within a project's
history).

For instance, the uuid could be an OSF DCE 1.1 UUID or the SHA-1 of
some easily remembered, already reasonably unique information.
... or 'canonical-name canonical-email' pair.
quoted
This could really help keep identifications clean, and it is rather
straightforward and possibly quite efficient.


Long Version:
------------
[...]
quoted
While git's use of (name,email) pairs to identify each person is
extremely practical, it turns out that it's rather `unstable';
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.
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.

There would still be the same problem of variations in uuid for one
person, but the problem would very likely be greatly reduced; if a
person doesn't use the uuid properly or at all, then we're in the
exact same situation we were before. Those who do use it, though, will
be much better off.

Strictness about names and emails is difficult, and keeping something
like the current .mailmap file up-to-date is a centralized process.
The uuid field would distribute the responsibility of maintaining
identity and make that responsibility easy because the user-chosen
string is easy for that user to remember and is typed only very
occasionally and under very specific circumstances.
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.
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.
UUID has the disadvantage of being
required also when (name,email) in From: email header is good user ID.
So UUID wouldn't help there either.
It's not a good user id because it depends on factors other than identity.
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.

On the other hand, something like a uuid field would distribute that
management to the user himself and frees that user from the influences
of legal name changing and email address switching.

Of course, as already stated, some people may bungle their uuid
setting. Then something like .mailmap can be used, but the format
would be simpler, the file would not grow nearly as quickly, and with
some clever encoding some statistics gathering programs could
(possibly) run more efficiently.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help