Subject: Re: What's cooking in git.git (Jan 2021, #02; Fri, 8)

From: Junio C Hamano <[email-masked]>
Date: Thu, 14 Jan 2021 23:22:34 -0800

Emily Shaffer <[email-masked]> writes:

> Taking the time to redesign commit format (e.g. use user.id instead of
> user.name/user.email) ...

I have seen that "ID", which doesn't have permanent association to
<name, email>, has been raised as a solution from time to time, but
I am not quite sure what problem is being solved.  At some point,
you'd need to translate the "ID" to a way humans use to refer to
each other---you cannot forever be saying "Ah, commits by this
contributor #70763 is consistently good and seems to know the
history traversal quite well.  We wish who it is so that we can ask
to review what we have been working on."

So we must have a mapping from ID to <name, email> or something.
How is that mapping maintained?  Even though Git is a version
tracking system and the mapping will change over time, we'll only
keep the "latest"?  That may not work very well, as a work for hire
contract a company made with one of the project participants would
have been made with a real person with a name, not just an anonymous
contributor #70763---the work done under the contract would not
become invalid merely because mapping from ID to <name, email>
changes, and those who made contract with a person with a certain
name would want to make sure the contributor #70763 who made the
work is actually who they thought they had contract with.

If we do not keep track of the change of the mapping ourselves, the
ecosystem around us will start doing so to fill the gap, so I do not
think use of "ID" would help you dissociate from your past self,
while keeping the credit for your past commits.

And if the mapping is version controlled in such a way that an "ID"
can be used to look up its name at any given time in the past, it
would not be so different from what we already have.

One advantage I could imagine that "ID" based system may have is
that one who wants to completely dissociate from an older name
and/or email can just start using a totally different "ID" with
totally different name, and pretend that s/he has no relationship
with the old person associated with the old "ID", and nobody would
be able to tell.  But again, I suspect that it can also be done
without "ID".  So...

> ... also gives us room to improve other things we
> don't like about the commit format (e.g. limited to single author).

I personally think having "author" is a mistake, iff some people do
not like "limited to a single author".  You can write everybody's
name in the trailer as "Co-Authored-by:" and at that point you do
not need any author in the commit object header.

But that is so miniscule a feature that I do not think it is worth
making a backward incompatible change to change the number of the
commit object header for the author from 1 to either 0 or many.

Anyway, thanks for an opportunity for a (somewhat) fun thought
experiment.

Goodnight.