while (walker.next() != null) {
// Iterate through all of the commits. The BitmapRevFilter does
// the work.
+ //
+ // filter.include returns true for commits that do not have
+ // a bitmap in bitmapIndex and are not reachable from a
+ // bitmap in bitmapIndex encountered earlier in the walk.
+ // Thus the number of commits returned by next() measures how
+ // much history was traversed without being able to make use
+ // of bitmaps.
pm.update(1);
+ countOfBitmapIndexMisses++;
}
RevObject ro;
bitmapResult.add(ro, ro.getType());
pm.update(1);
}
- countOfBitmapIndexMisses += filter.getCountOfLoadedCommits();
}
return bitmapResult;
}
static abstract class BitmapRevFilter extends RevFilter {
- private long countOfLoadedCommits;
-
protected abstract boolean load(RevCommit cmit);
@Override
public final boolean include(RevWalk walker, RevCommit cmit) {
if (load(cmit)) {
- countOfLoadedCommits++;
return true;
}
for (RevCommit p : cmit.getParents())
public final boolean requiresCommitBody() {
return false;
}
-
- long getCountOfLoadedCommits() {
- return countOfLoadedCommits;
- }
}
}