From: David Brown <git@davidb.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: martin f krafft <madduck@madduck.net>,
git discussion list <git@vger.kernel.org>
Subject: Re: inexplicable failure to merge recursively across cherry-picks
Date: Wed, 10 Oct 2007 08:48:31 -0700 [thread overview]
Message-ID: <20071010154831.GA19226@old.davidb.org> (raw)
In-Reply-To: <alpine.LFD.0.999.0710100808150.3838@woody.linux-foundation.org>
On Wed, Oct 10, 2007 at 08:25:15AM -0700, Linus Torvalds wrote:
>Yes, *some* SCM's have tried to do that. In particular, the ones that are
>"patch-based" tend to think that patches are "identical" regardless of
>where they are, and while re-ordering of them is a special event, it's not
>somethign that changes the fundamental 'ID' of the patch.
>
>For example, I think the darcs "patch algebra" works that way.
>
>It's a really horrible model. Not only doesn't it scale, but it leads to
>various very strange linkages between patches, and it fails the most
>important part: it means that merges get different results just because
>people are doing the same changes two different ways.
Actually, specifically darcs, different merges _always_ result in the same
data. It's a fundamental part of is patch algebra. No matter what order
you apply a given set of patches, even with conflicts and reordering, you
always get the same result, or no result. Conflicts are "resolved" by
inserting conflict markers in the file, ordered by the patch ID. It
doesn't matter which order you apply them in, you get the same markers.
Then there will be a merge patch which fixes the markers that someone could
apply, no matter what order the applied the previous patches.
Darcs breaks down in a few places, though.
- The no result. Sometimes, it just can't figure out how to reorder
patches. Even worse, occasionally, the implementation will fail to
terminate try to figure this out. There isn't much to do at this
point, except manually apply the patch, hence generating a new patch
ID.
- It doesn't scale well.
The strange linkages between patches could be thought of as a feature,
since it is basically constraining the order that the patches can be
applied in.
There is a darcs-git project that tries to do the darcs things on top of
git.
Dave
next prev parent reply other threads:[~2007-10-10 15:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 1:55 inexplicable failure to merge recursively across cherry-picks martin f krafft
2007-10-10 2:54 ` Linus Torvalds
2007-10-10 10:25 ` martin f krafft
2007-10-10 10:33 ` David Kastrup
2007-10-10 15:25 ` Linus Torvalds
2007-10-10 15:48 ` David Brown [this message]
2007-10-10 19:07 ` Miklos Vajna
2007-10-10 19:35 ` Linus Torvalds
2007-10-11 0:08 ` Miklos Vajna
2007-10-11 21:51 ` Sam Vilain
2007-10-11 22:33 ` Linus Torvalds
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=20071010154831.GA19226@old.davidb.org \
--to=git@davidb.org \
--cc=git@vger.kernel.org \
--cc=madduck@madduck.net \
--cc=torvalds@linux-foundation.org \
/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).