git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Recording the current branch on each commit?

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 28, 2014, 18:15 UTC
Message-ID
<xmqq1twhs4lt.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140427233635.96eec638b311907e2368f42b42021fd8.fa0e4193ea.wbe@email02.secureserver.net>
"Max Kirillov" <max@max630.net> writes:
Show 11 quoted lines
>> 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

Previous: Max KirillovNext: Max Kirillov
Message 2 of 3 in “RE: Recording the current branch on each commit?”
  1. Max KirillovApr 28, 2014
  2. Junio C HamanoApr 28, 2014
  3. Max KirillovApr 30, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.