Re: Comments on recursive merge..
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Nov 9, 2005, 00:51 UTC
- Message-ID
- <Pine.LNX.4.64.0511081646160.3247@g5.osdl.org>
- In-Reply-To
- <20051109003236.GA30496@pasky.or.cz>
On Wed, 9 Nov 2005, Petr Baudis wrote:
> > BTW, git-show-branch is also by orders of magnitude faster (not that > this would be any major timesaver). Median 0.006s vs. median 0.124s.
Ouch. That makes me suspicious. One reason git-merge-base is slow is because it's being pretty careful about some pathological examples of dates being just the wrong way around, and it might just be that the reason git-show-branch is faster is because it isn't doing that part right.
So yes, git-merge-base does extra work, but it does so because I think it needs to.
Junio? You even wrote the comment about the case in git-merge-base, I'm wondering whether it's a bug that we use the fast-and-cheap algorithm in git-show-branch..
Of course, arguably you can first try the fast-and-cheap thing, and if that gives a merge parent that is acceptable, why not? So maybe it's the right thing for the "let's see if this is trivial" case, but I think it might _think_ some cases are trivial that really shouldn't, because they actually have two merge parents.
Linus