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

Re: Should notes handle replace commits?

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 11, 2016, 16:09 UTC
Message-ID
<xmqq60z0yu60.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160109012542.GA2445@glandium.org>
Mike Hommey <mh@glandium.org> writes:
Show 8 quoted lines
> On Fri, Jan 08, 2016 at 05:04:03PM -0800, Junio C Hamano wrote:
>> It is not graft vs replace.  It is about what you replace with what
>> other thing: "replace" is a content replacement mechanism, not
>> identity replacement mechanism.
>
> I guess this is where opinions diverge: in what notes are.
> I'd argue notes are content just as much as the tree, except they're not
> stored inside the commit.

There is no room for any divergence in opinion around what "contents" are in the context of Git, though.

Iff the name of the object would change if you change something in it, then that something is "contents" of the object. So the list of parents of a commit is part of the contents of the commit object.

Notes are not.

In fact, that is the primary reason notes exist---the whole point of notes is that with them you can add pieces of information ABOUT an existing object without changing the contents of the object.

Previous: Mike HommeyNext: Philip Oakley
Message 10 of 12 in “Should notes handle replace commits?”
  1. Mike HommeyJan 8, 2016
  2. Junio C HamanoJan 8, 2016
  3. Mike HommeyJan 8, 2016
  4. Junio C HamanoJan 8, 2016
  5. Junio C HamanoJan 9, 2016
  6. Mike HommeyJan 9, 2016
  7. Mike HommeyJan 9, 2016
  8. Junio C HamanoJan 9, 2016
  9. Mike HommeyJan 9, 2016
  10. Junio C HamanoJan 11, 2016
  11. Philip OakleyJan 9, 2016
  12. Junio C HamanoJan 11, 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.