PatchListLoader: Use equals instead of == for comparison
In this case there is not actually a bug, because it's comparing two RevCommit objects from the same RevWalk, which by design uses the same instance every time a particular SHA-1 is referenced. However, this is not obvious to reason about. Change-Id: I19df77c04a661e5fcb2b0e021ceccfeac2d43673
This commit is contained in:
@@ -151,7 +151,7 @@ public class PatchListLoader implements Callable<PatchList> {
|
||||
}
|
||||
|
||||
final boolean againstParent =
|
||||
b.getParentCount() > 0 && b.getParent(0) == a;
|
||||
b.getParentCount() > 0 && b.getParent(0).equals(a);
|
||||
|
||||
RevCommit aCommit = a instanceof RevCommit ? (RevCommit) a : null;
|
||||
RevTree aTree = rw.parseTree(a);
|
||||
|
Reference in New Issue
Block a user