Class BitmappedReachabilityChecker
java.lang.Object
org.eclipse.jgit.internal.revwalk.BitmappedReachabilityChecker
- All Implemented Interfaces:
ReachabilityChecker
Checks the reachability using bitmaps.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classThis filter emits commits that were not bitmap-reachable from anything visited before. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionareAllReachable(Collection<RevCommit> targets, Stream<RevCommit> starters) Check all targets are reachable from the starters.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jgit.revwalk.ReachabilityChecker
areAllReachable
-
Field Details
-
walk
-
-
Constructor Details
-
BitmappedReachabilityChecker
- Parameters:
walk- walk on the repository to get or create the bitmaps for the commits. It must have bitmaps.- Throws:
AssertionError- runtime exception if walk is over a repository without bitmapsIOException- if the index or the object reader cannot be opened.
-
-
Method Details
-
areAllReachable
public Optional<RevCommit> areAllReachable(Collection<RevCommit> targets, Stream<RevCommit> starters) throws MissingObjectException, IncorrectObjectTypeException, IOException Check all targets are reachable from the starters.In this implementation, it is recommended to put the most popular starters (e.g. refs/heads tips) at the beginning.
- Specified by:
areAllReachablein interfaceReachabilityChecker- Parameters:
targets- commits to reach.starters- known starting points.- Returns:
- An unreachable target if at least one of the targets is unreachable. An empty optional if all targets are reachable from the starters.
- Throws:
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.IOException- if any of the underlying indexes or readers can not be opened.
-