Subject: Re: Recording the current branch on each commit?

From: Junio C Hamano <[email-masked]>
Date: Mon, 28 Apr 2014 11:15:10 -0700

"Max Kirillov" <[email-masked]> writes:

>> Obviously, the feature would necessarily have to be optional, simply
>> because Git would have to keep understanding the old commit object
>> format for a LONG time (probably indefinitely), and there's nothing
>> you can do to prevent others from creating old-style commit objects.
>
> Doesn't git ignores unknown headers? I has been investigating this issue
> and it looked like it does.
>
> Could the API to add commit headers (which exists in sources) be added
> to cli, so users can create the branches, phases or whatever they feel
> useful?

We had lengthy discussions in early 2010 [*1*].  The whole thread,
at least the whole sub-thread that contains the focused message, is
a required reading to understand where we stand with respect to
"extra headers in commit objects".

"Any additional information about the commit can be added" you
suggest is exactly the kind of thing we want to avoid, which made
Linus say in an even older discussion [*2*]:

    No "this random field could be used this random way" crud,
    please.

[References]

*1* http://thread.gmane.org/gmane.comp.version-control.git/138848/focus=138892
*2* http://thread.gmane.org/gmane.comp.version-control.git/19126/focus=19149