Re: What's in a name? Let's use a (uuid,name,email) triplet
From: Reece Dunn <hidden>
Date: 2016-06-15 22:48:27
On 18 March 2010 19:50, Linus Torvalds [off-list ref] wrote:
On Thu, 18 Mar 2010, Linus Torvalds wrote:quoted
(*) I'll give you one answer in the next email. But before you read that email, try to think about it, and see if you can guess at patterns.Lookie here: [torvalds@i5 linux]$ git log --pretty=full | grep '^Commit: ' | sort | uniq -c | sort -n | grep localdomain 1 Commit: Jeff Garzik [off-list ref] 2 Commit: Dave Airlie [off-list ref] 3 Commit: James Bottomley [off-list ref] 3 Commit: James Morris [off-list ref] 3 Commit: James Morris [off-list ref] 4 Commit: James Bottomley [off-list ref] 32 Commit: Thomas Graf [off-list ref] 410 Commit: James Bottomley [off-list ref] [torvalds@i5 linux]$ git log --pretty=full | grep '^Author: ' | sort | uniq -c | sort -n | grep localdomain 1 Author: Alex Deucher [off-list ref] 1 Author: Dave Airlie [off-list ref] 1 Author: Eduardo Habkost [off-list ref] 1 Author: Grzegorz Nosek [off-list ref] 1 Author: Izik Eidus [off-list ref] 1 Author: Jeff Garzik [off-list ref] 2 Author: Esti Kummer [off-list ref] 2 Author: James Bottomley [off-list ref] 3 Author: Dave Airlie [off-list ref] 3 Author: James Bottomley [off-list ref] 3 Author: James Bottomley [off-list ref] 4 Author: Cindy H Kao [off-list ref] 4 Author: Kristian Høgsberg [off-list ref] See? Mistakes happen. But look at what happens to the committer information? Think about it. Really _think_ about it. There is absolutely zero _technical_ difference between the two fields. The only difference is that "git log" by default shows one, and not the other. So as a human, which one do you think people care about and fix more quickly? And look at the numbers once more.
So... going back to the original problem, we have: 1/ people making mistakes in the commit logs for whatever reason (e.g. re-installation or a new computer); 2/ people changing name (e.g. getting married) or changing email (e.g. gmail.com to googlemail.com). The problem is that it may be beneficial to see all the changes Cindy H Kao made for example, including the ones made @localhost.localdomain. Having (user, email, uuid) will not solve the problem (even if the uuid is from a memorable string) -- consider case 1. If you forget to setup git, uuid will be blank or some random data, so this will be worse than the (user, email) identity. As noted, there is also the issue that git is used in a lot of places and not all git clone instances are running the same version (e.g. pushing to an older git client that does not support this new data). What would be better is having a concept of identity aliases. That is, a user can say that (for this git project), (user1,email1) is the same person as (user2,email2). This would allow someone who has mis-configured their git instance to say what the (user,email) pair should have been. It also allows people to say that they used to be called someone and they are now called somebody. This information should ideally be in some form of (user,email) -> (user,email) map that is versioned and tracked by git (in a way that is also backward compatible, which could be tricky). It also needs to be changeable and version tracked (i.e. with history) to allow people to undo this; for example, this system would allow me to say that Linus' (user,email) id is actually an alias for my (user,email) which is bad. I don't know of a decent way to prevent this (or someone using the uuid of someone else in the original proposal), but this approach would at least allow it to be corrected. There will need to be the related plumbing and porcelain to access and manipulate this data/meta-data. Would this be a better approach? Or is there a fatal flaw I am missing (like people being able to alias themselves as other people, for example)? - Reece