[error prone] fix ReferenceEquality warning in RevWalk#isMergedInto
Change-Id: Ibef75e2bc76e90f6e29c4cb3ba1c1f6e67009b10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
722deaa671
commit
70258a9cb2
|
@ -72,6 +72,7 @@
|
|||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.filter.RevFilter;
|
||||
import org.eclipse.jgit.treewalk.filter.TreeFilter;
|
||||
import org.eclipse.jgit.util.References;
|
||||
|
||||
/**
|
||||
* Walks a commit graph and produces the matching commits in order.
|
||||
|
@ -433,9 +434,11 @@ public boolean isMergedInto(RevCommit base, RevCommit tip)
|
|||
markStart(tip);
|
||||
markStart(base);
|
||||
RevCommit mergeBase;
|
||||
while ((mergeBase = next()) != null)
|
||||
if (mergeBase == base)
|
||||
while ((mergeBase = next()) != null) {
|
||||
if (References.isSameObject(mergeBase, base)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} finally {
|
||||
filter = oldRF;
|
||||
|
|
Loading…
Reference in New Issue