Re: Comments on recursive merge..
- From
Fredrik Kuivinen <freku045@student.liu.se>
- Date
- Nov 8, 2005, 22:36 UTC
- Message-ID
- <20051108223609.GA4805@c165.ib.student.liu.se>
- In-Reply-To
- <Pine.LNX.4.64.0511081351020.3247@g5.osdl.org>
On Tue, Nov 08, 2005 at 01:52:06PM -0800, Linus Torvalds wrote:
Show 9 quoted lines
> > > 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