Re: A note on merging conflicts..
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Jul 1, 2006, 22:24 UTC
- Message-ID
- <Pine.LNX.4.64.0607011754370.9789@iabervon.org>
- In-Reply-To
- <Pine.LNX.4.64.0607011115500.12404@g5.osdl.org>
On Sat, 1 Jul 2006, Linus Torvalds wrote:
> That said, it does have a real downside, and that's simply that it can > take a long time to compute.
I think a...b can be computed by (in pseudocode, obviously):
mark(a, 1);
add(list, a);
mark(b, 2);
add(list, b);
while (interesting(list)) {
if (*list->marks != 3)
output(*list);
for (parent : *list->parents) {
mark(parent, *list->marks);
add(list, parent);
}
}It's basically the original merge-bases code, from way back; the several flaws with it for computing a good merge base don't matter if you're just excluding the merge bases. If you look at the big examples in merge-base.c (pre-libification), it's obvious that what we want for a...b is everything marked 1 or 2, and the trickiness in that code is getting things correctly marked 3 versus 7, which doesn't matter here.
-Daniel *This .sig left intentionally blank*