Fix long running merge base computations
commit0089788fc10578a9204b3e59e8d5df13cadda917
authorShawn O. Pearce <spearce@spearce.org>
Wed, 18 Mar 2009 18:01:48 +0000 (18 11:01 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 20 Mar 2009 06:15:37 +0000 (20 07:15 +0100)
tree58c0914c84a2a5798d7cc2a7b757a5f03d8e7c81
parent9b38d43441a5a274088cbf75100ccb3d458dc541
Fix long running merge base computations

If a part of the project history is reachable by more than one
path through the revision graph, we only need to traverse down
it once through the first detected path when marking parents
as reachable from an input branch.

Previously, JGit recomputed the entire project history for each
path it was reachable through.  On linux-2.6 based histories we
got stuck for hours computing a merge base, as we kept passing
back through the same sections of the revision graph.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/revwalk/MergeBaseGenerator.java