class BitmapCalculator
extends java.lang.Object
This bitmap refers only to commits. For a bitmap with ALL objects reachable
from certain object, see BitmapWalker
.
Modifier and Type | Field and Description |
---|---|
private BitmapIndex |
bitmapIndex |
private RevWalk |
walk |
Constructor and Description |
---|
BitmapCalculator(RevWalk walk) |
Modifier and Type | Method and Description |
---|---|
private BitmapIndex.BitmapBuilder |
asBitmapBuilder(BitmapIndex.Bitmap bitmap) |
(package private) BitmapIndex.BitmapBuilder |
getBitmap(RevCommit start,
ProgressMonitor pm)
Get the reachability bitmap from certain commit to other commits.
|
private final RevWalk walk
private final BitmapIndex bitmapIndex
BitmapCalculator(RevWalk walk) throws java.io.IOException
java.io.IOException
BitmapIndex.BitmapBuilder getBitmap(RevCommit start, ProgressMonitor pm) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
This will return a precalculated bitmap if available or walk building one until finding a precalculated bitmap (and returning the union).
Beware that the returned bitmap it is guaranteed to include ONLY the
commits reachable from the initial commit. It COULD include other objects
(because precalculated bitmaps have them) but caller shouldn't count on
that. See BitmapWalker
for a full reachability bitmap.
start
- the commit. Use walk.parseCommit(objectId)
to get this
object from the id.pm
- progress monitor. Updated by one per commit browsed in the
graphMissingObjectException
- the supplied id doesn't existIncorrectObjectTypeException
- the supplied id doesn't refer to a commit or a tagjava.io.IOException
- if the walk cannot open a packfile or loose objectprivate BitmapIndex.BitmapBuilder asBitmapBuilder(BitmapIndex.Bitmap bitmap)