class BitmappedReachabilityChecker extends java.lang.Object implements ReachabilityChecker
Modifier and Type | Class and Description |
---|---|
private static class |
BitmappedReachabilityChecker.ReachedFilter
This filter emits commits that were not bitmap-reachable from anything
visited before.
|
Constructor and Description |
---|
BitmappedReachabilityChecker(RevWalk walk) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<RevCommit> |
areAllReachable(java.util.Collection<RevCommit> targets,
java.util.stream.Stream<RevCommit> starters)
Check all targets are reachable from the starters.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
areAllReachable
private final RevWalk walk
public BitmappedReachabilityChecker(RevWalk walk) throws java.io.IOException
walk
- walk on the repository to get or create the bitmaps for the
commits. It must have bitmaps.java.lang.AssertionError
- runtime exception if walk is over a repository without
bitmapsjava.io.IOException
- if the index or the object reader cannot be opened.public java.util.Optional<RevCommit> areAllReachable(java.util.Collection<RevCommit> targets, java.util.stream.Stream<RevCommit> starters) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
In this implementation, it is recommended to put the most popular starters (e.g. refs/heads tips) at the beginning.
areAllReachable
in interface ReachabilityChecker
targets
- commits to reach.starters
- known starting points.MissingObjectException
- if any of the incoming objects doesn't exist in the
repository.IncorrectObjectTypeException
- if any of the incoming objects is not a commit or a tag.java.io.IOException
- if any of the underlying indexes or readers can not be
opened.