From: Fredrik Kuivinen Date: Tue, 08 Nov 2005 22:36:09 GMT Subject: Re: Comments on recursive merge.. Message-ID: <20051108223609.GA4805@c165.ib.student.liu.se> In-Reply-To: On Tue, Nov 08, 2005 at 01:52:06PM -0800, Linus Torvalds wrote: > > > On Tue, 8 Nov 2005, Fredrik Kuivinen wrote: > > > > * The code for finding common ancestors is also written in Python and > > is probably a bit slower than git-merge-base. > > Btw, what part of git-merge-bases is it that makes it not be practical? > The problem is in the multiple-common-ancestors case. If we have three common ancestors, A, B and C, we will start with merging A with B. The result is a new 'virtual' commit object (not stored in the object database), lets call it V. We are then going to merge V with C. To do that we need to get the common ancestor(s) of V and C, and as V doesn't exist in the database we can't use git-merge-base. I haven't given it a lot of thought though, it might be possible to use git-merge-base in some way and get the same results as we get now. It would certainly be possible to use git-merge-base in the first iteration and use the python code only when we actually have any 'virtual' commit objects. - Fredrik