diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java index e92035359..b3c4cced7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java @@ -1,6 +1,7 @@ /* * Copyright (C) 2007, Robin Rosenberg * Copyright (C) 2008, Shawn O. Pearce + * Copyright (C) 2014, Gustaf Lundh * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -388,7 +389,11 @@ public class RevWalk implements Iterable { treeFilter = TreeFilter.ALL; markStart(tip); markStart(base); - return next() == base; + RevCommit mergeBase; + while ((mergeBase = next()) != null) + if (mergeBase == base) + return true; + return false; } finally { filter = oldRF; treeFilter = oldTF;