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

From: Jakub Narebski <[email-masked]>
Date: Fri, 19 Mar 2010 07:08:55 -0700 (PDT)

Michael Witten <[email-masked]> writes:

> 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.

> 
> This could really help keep identifications clean, and it is rather
> straightforward and possibly quite efficient.
> 
> 
> Long Version:
> ------------
[...]

> 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".

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.

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.  In the case of UUID you would need the same: some way to
provide UUID in patch (in email).  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.

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).

-- 
Jakub Narebski
Poland
ShadeHawk on #git