# RE: Recording the current branch on each commit?

3 messages from 2014-04-28 to 2014-04-30. Participants: Max Kirillov, Junio C Hamano.
Thread: https://gitlist.dev/t/36514

## Max Kirillov, 2014-04-28 06:36

Subject: RE: Recording the current branch on each commit?
Message-ID: <20140427233635.96eec638b311907e2368f42b42021fd8.fa0e4193ea.wbe@email02.secureserver.net>
URL: https://gitlist.dev/e/20140427233635.96eec638b311907e2368f42b42021fd8.fa0e4193ea.wbe%40email02.secureserver.net

```
Hi.

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

-- 
Max

```

## Junio C Hamano, 2014-04-28 18:15

Subject: Re: Recording the current branch on each commit?
Message-ID: <xmqq1twhs4lt.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq1twhs4lt.fsf%40gitster.dls.corp.google.com
In-Reply-To: <20140427233635.96eec638b311907e2368f42b42021fd8.fa0e4193ea.wbe@email02.secureserver.net>

```
"Max Kirillov" <max@max630.net> 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

```

## Max Kirillov, 2014-04-30 04:04

Subject: Re: Recording the current branch on each commit?
Message-ID: <20140430040437.GA5817@wheezy.local>
URL: https://gitlist.dev/e/20140430040437.GA5817%40wheezy.local
In-Reply-To: <xmqq1twhs4lt.fsf@gitster.dls.corp.google.com>

```
On Mon, Apr 28, 2014 at 11:15:10AM -0700, Junio C Hamano wrote:
> "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.

I see, thanks for explanation.

-- 
Max

```
