use of org.locationtech.geogig.api.plumbing.diff.DiffCountConsumer in project GeoGig by boundlessgeo.
the class DiffCount method _call.
@Override
protected DiffObjectCount _call() {
checkState(oldRefSpec != null, "old ref spec not provided");
checkState(newRefSpec != null, "new ref spec not provided");
final RevTree oldTree = getTree(oldRefSpec);
final RevTree newTree = getTree(newRefSpec);
DiffObjectCount diffCount;
StagingDatabase index = stagingDatabase();
PreOrderDiffWalk visitor = new PreOrderDiffWalk(oldTree, newTree, index, index);
DiffCountConsumer counter = new DiffCountConsumer(index);
PreOrderDiffWalk.Consumer filter = counter;
if (!pathFilters.isEmpty()) {
filter = new PathFilteringDiffConsumer(pathFilters, counter);
}
visitor.walk(filter);
diffCount = counter.get();
return diffCount;
}
Aggregations