throws MissingObjectException, IncorrectObjectTypeException,
IOException {
BitmapBuilder haveBitmap = bitmapWalker.findObjects(have, null, true);
- bitmapWalker.reset();
BitmapBuilder wantBitmap = bitmapWalker.findObjects(want, haveBitmap,
false);
BitmapBuilder needBitmap = wantBitmap.andNot(haveBitmap);
PackWriterBitmapWalker walker = bitmapPreparer.newBitmapWalker();
AnyObjectId last = null;
for (PackWriterBitmapPreparer.BitmapCommit cmit : selectedCommits) {
- if (cmit.isReuseWalker())
- walker.reset();
- else
+ if (!cmit.isReuseWalker()) {
walker = bitmapPreparer.newBitmapWalker();
-
+ }
BitmapBuilder bitmap = walker.findObjects(
Collections.singleton(cmit), null, false);
return countOfBitmapIndexMisses;
}
- BitmapBuilder findObjects(Iterable<? extends ObjectId> start, BitmapBuilder seen, boolean ignoreMissing)
+ BitmapBuilder findObjects(Iterable<? extends ObjectId> start, BitmapBuilder seen,
+ boolean ignoreMissing)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
if (!ignoreMissing) {
return result;
}
- private BitmapBuilder findObjectsWalk(Iterable<? extends ObjectId> start, BitmapBuilder seen, boolean ignoreMissingStart)
+ private BitmapBuilder findObjectsWalk(Iterable<? extends ObjectId> start, BitmapBuilder seen,
+ boolean ignoreMissingStart)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
+ walker.reset();
final BitmapBuilder bitmapResult = bitmapIndex.newBitmapBuilder();
for (ObjectId obj : start) {
return bitmapResult;
}
- void reset() {
- walker.reset();
- }
-
/**
* A RevFilter that adds the visited commits to {@code bitmap} as a side
* effect.