git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen R. van den Berg" <srb@cuci.nl>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC] cherry-pick using multiple parents to implement -x
Date: Sun, 7 Sep 2008 22:22:02 +0200	[thread overview]
Message-ID: <20080907202202.GC8765@cuci.nl> (raw)
In-Reply-To: <20080907200441.GA26705@coredump.intra.peff.net>

Jeff King wrote:
>On Sun, Sep 07, 2008 at 09:56:26PM +0200, Stephen R. van den Berg wrote:
>> That implication is not a technical one, but merely a convention in the
>> mind of the git-user.  Relevant, of course, but maybe we can accomodate
>> both uses.

>I'm not sure I agree. I believe that property is part of the definition
>of the commit DAG as originally conceived (but somebody like Linus could
>say more). Obviously there is no formal definition, but I already
>pointed out one thing that will break in that instance. I don't know if
>there are others.

Yes, of course.  But even then, it's merely a formal definition, the
thing I'm after now is if there is any code that actually relies on that
formal definition.  That would be the code to review and perhaps adapt
in order to make it support the sideport-parents without hurting the old
definition.

>> What if the merge-base determination code is modified to behave as
>> if --first-parent is specified while searching for the merge-base?
>> In that case it *will* find A as the merge-base, even in the presence of
>> "sideportlinks".

>But then it will fail to find legitimate merge bases. So yes, you _can_

Will it?  Can you give me one example where it would find the wrong one?

>come up with a merge algorithm that handles this situation. But is it
>then up to the user to say "Oh, this parent link means something else.
>Use this other algorithm"?

That, of course, is unacceptable.  It either is seemless and supports
both uses transparently, or it has to be done (if at all) using a separate
link (not one of the normal parents) indeed.

> In that case, it really seems we are abusing
>the "parent" link and it would be more appropriate to have some _other_
>type of link.

Quite.

>Though I think if you look through the archives, people have argued
>against having any git-level link to cherry-picked commits. The history
>leading up to that cherry-pick is not necessarily of interest (though I
>think you are proposing that it be optional to create such a link via
>-x).

Optional, indeed, and sometimes quite useful.

>> Does that resolve all technical issues?

>I really don't know. I think you are proposing changing a core
>assumption of the data structure, so I wouldn't be too surprised if
>there is other code that relies on it.

>You can use the script I posted in my last email as a basis for a
>cherry-pick that does what you want (cherry-pick -n, write-tree,
>commit-tree, update-ref). You might try a few experiments with that.

I will, thanks.
-- 
Sincerely,
           Stephen R. van den Berg.

"The future is here, it's just not widely distributed yet." -- William Gibson

  reply	other threads:[~2008-09-07 20:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-07 10:34 [RFC] cherry-pick using multiple parents to implement -x Stephen R. van den Berg
2008-09-07 17:28 ` Jeff King
2008-09-07 19:56   ` Stephen R. van den Berg
2008-09-07 20:04     ` Jeff King
2008-09-07 20:22       ` Stephen R. van den Berg [this message]
2008-09-08  1:49         ` Jeff King
2008-09-08  6:57           ` Stephen R. van den Berg
2008-09-07 17:28 ` Junio C Hamano
2008-09-07 20:10   ` Stephen R. van den Berg
2008-09-07 21:16     ` Thomas Rast
2008-09-07 22:22       ` Junio C Hamano
2008-09-07 22:00     ` Junio C Hamano
2008-09-08  7:37   ` Paolo Bonzini
2008-09-08  7:55     ` Junio C Hamano
2008-09-07 23:53 ` Junio C Hamano
2008-09-08 11:51   ` Stephen R. van den Berg
2008-09-08 13:04     ` Paolo Bonzini
2008-09-08 13:42       ` Stephen R. van den Berg
2008-09-08 14:37         ` Jakub Narebski
2008-09-08 14:57           ` Paolo Bonzini
2008-09-08 14:38     ` Shawn O. Pearce
2008-09-08 14:58       ` Stephen R. van den Berg
2008-09-08 15:00         ` Shawn O. Pearce
2008-09-09  8:51           ` Stephen R. van den Berg
2008-09-08 15:04       ` Paolo Bonzini

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=20080907202202.GC8765@cuci.nl \
    --to=srb@cuci.nl \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).