From: Mike Hommey <mh@glandium.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Should notes handle replace commits?
Date: Sat, 9 Jan 2016 06:49:39 +0900 [thread overview]
Message-ID: <20160108214939.GA22801@glandium.org> (raw)
In-Reply-To: <xmqqh9in25py.fsf@gitster.mtv.corp.google.com>
On Fri, Jan 08, 2016 at 12:09:45PM -0800, Junio C Hamano wrote:
> > So the question is, is this the behavior this should have?
>
> The behaviour is a natural consequence of what graft and replace are
> about (i.e. "telling Git what the parents of a commit are" vs
> "telling Git what the contents of a commit are"), so the answer to
> the "should" question is a resounding "yes".
It's not only about contents, except for a very broad definition of
contents that includes ancestry. From my POV, replace is more about
"telling Git that this commit (and its parents) is really that one (and
its parents)".
Anyways, the dummy example is using different commit messages, and notes
everywhere, to make what happens to commits and notes obvious. In the
real world, "first" would be "real third", so the commit messages would
be as expected in all cases. The question is whether users expect the
note of the non-replaced commit to show up. Would they expect no note at
all in the case there is a note on the replacee, but not on the
replaced? Maybe the right thing to do would be for *both* notes to be
concatenated? I don't know.
Mike
next prev parent reply other threads:[~2016-01-08 22:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 1:28 Should notes handle replace commits? Mike Hommey
2016-01-08 20:09 ` Junio C Hamano
2016-01-08 21:49 ` Mike Hommey [this message]
2016-01-08 23:51 ` Junio C Hamano
2016-01-09 0:13 ` Junio C Hamano
2016-01-09 0:32 ` Mike Hommey
2016-01-09 0:25 ` Mike Hommey
2016-01-09 1:04 ` Junio C Hamano
2016-01-09 1:25 ` Mike Hommey
2016-01-11 16:09 ` Junio C Hamano
2016-01-09 17:39 ` Philip Oakley
2016-01-11 16:50 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160108214939.GA22801@glandium.org \
--to=mh@glandium.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).