DiffIndex diffIndex = command(DiffIndex.class).addFilter(this.pathFilter)
.setReportTrees(reportTrees);
if (oldRefSpec != null) {
diffIndex.setOldVersion(oldRefSpec);
}
iterator = diffIndex.call();
} else if (newRefSpec == null) {
DiffWorkTree workTreeIndexDiff = command(DiffWorkTree.class).setFilter(pathFilter)
.setReportTrees(reportTrees);
if (oldRefSpec != null) {