Re: A note on merging conflicts..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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*
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]