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

Re: How to add custom metadata to Git commit object

From
Junio C Hamano <gitster@pobox.com>
Date
May 30, 2016, 18:52 UTC
Message-ID
<xmqqtwhf8jl7.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160530183016.GB17253@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> On Mon, May 30, 2016 at 08:58:08PM +0300, Kirill Likhodedov wrote:
> ...
>> There are git-notes, which could be used for the purpose, but they are
>> visible to the user via standard Git command, and could be used by the
>> user for other purposes, so they are not very suitable for the task.
>
> Notes would work for this, too, but their main advantage is that they
> can be created _after_ a commit has already been made (whereas anything
> in the commit object itself will influence its sha1 id).

I would have said the same but with s/but/and/. If the "rename hint" or whatever other "custom metadata" Kirill gives to a commit is found to be wrong, it can be corrected later.

And "the user can use notes for other purposes" is not a good reason to reject them. The whole point of allowing custom notes ref is so that Kirill is not restricted to use the usual notes/commits ref to store this custom notes in its dedicated notes/kirills-metadata ref.

Previous: Jeff KingNext: Kirill Likhodedov
Message 4 of 6 in “How to add custom metadata to Git commit object”
  1. Kirill LikhodedovMay 30, 2016
  2. Konstantin KhomoutovMay 30, 2016
  3. Jeff KingMay 30, 2016
  4. Junio C HamanoMay 30, 2016
  5. Kirill LikhodedovMay 31, 2016
  6. Junio C HamanoMay 31, 2016

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.