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.