From: Linus Torvalds Date: Fri, 11 Nov 2005 16:18:21 GMT Subject: Re: merge-base: fully contaminate the well. Message-ID: In-Reply-To: <7viruzu3du.fsf@assigned-by-dhcp.cox.net> On Thu, 10 Nov 2005, Junio C Hamano wrote: > > > Btw, I don't think your contamination logic is necessarily complete. We > > may not even have parsed some of the commits that end up being on that > > strange corner case. > > I haven't tried walking any other test cases, but wouldn't that > be arguing that the our assumption that the current merge-base > is at least complete if not optimum? Oh yes, it's always complete, even though it may not be optimal. And it's going to be optimal in all realistic cases. And even in the unrealistic cases if we end up returning a commit that is actually reachable by another one (through at least two levels of other commits that were in the wrong date-order with the _other_ ways of reaching that commit), the recursive strategy of merging the merge-bases will always end up boiling it doing to the optimal thing. So I think this is absolutely 100% correct. Linus