/** * @param pathFilter if specified, only changes that match the filter will be returned * @return an iterator for all of the differences between STAGE_HEAD and HEAD based on the path * filter. */ @Override public AutoCloseableIterator<DiffEntry> getStaged(final @Nullable List<String> pathFilters) { AutoCloseableIterator<DiffEntry> unstaged = context.command(DiffIndex.class) .setFilter(pathFilters).setReportTrees(true).call(); return unstaged; }
/** * @param pathFilter if specified, only changes that match the filter will be returned * @return an iterator for all of the differences between STAGE_HEAD and HEAD based on the path * filter. */ @Override public AutoCloseableIterator<DiffEntry> getStaged(final @Nullable List<String> pathFilters) { AutoCloseableIterator<DiffEntry> unstaged = context.command(DiffIndex.class) .setFilter(pathFilters).setReportTrees(true).call(); return unstaged; }
.setReportTrees(reportTrees).setPreserveIterationOrder(preserveIterationOrder); if (oldRefSpec != null) { diffIndex.setOldVersion(oldRefSpec);
.setReportTrees(reportTrees).setPreserveIterationOrder(preserveIterationOrder); if (oldRefSpec != null) { diffIndex.setOldVersion(oldRefSpec);
@Override protected StatusSummary _call() { WorkingTree workTree = workingTree(); StagingArea index = stagingArea(); StatusSummary summary = new StatusSummary(); summary.countStaged = index.countStaged(null).count(); summary.countUnstaged = workTree.countUnstaged(null).count(); summary.countConflicted = index.countConflicted(null); final Long limit = this.limit == null ? null : this.limit; if (limit == null || limit.longValue() > 0) { if (summary.countStaged > 0) { summary.staged = command(DiffIndex.class).setMaxDiffs(limit).setReportTrees(true); } if (summary.countUnstaged > 0) { summary.unstaged = command(DiffWorkTree.class).setMaxDiffs(limit) .setReportTrees(true); } if (summary.countConflicted > 0) { summary.conflicts = command(ConflictsQueryOp.class); } } return summary; }
@Override protected StatusSummary _call() { WorkingTree workTree = workingTree(); StagingArea index = stagingArea(); StatusSummary summary = new StatusSummary(); summary.countStaged = index.countStaged(null).count(); summary.countUnstaged = workTree.countUnstaged(null).count(); summary.countConflicted = index.countConflicted(null); final Long limit = this.limit == null ? null : this.limit; if (limit == null || limit.longValue() > 0) { if (summary.countStaged > 0) { summary.staged = command(DiffIndex.class).setMaxDiffs(limit).setReportTrees(true); } if (summary.countUnstaged > 0) { summary.unstaged = command(DiffWorkTree.class).setMaxDiffs(limit) .setReportTrees(true); } if (summary.countConflicted > 0) { summary.conflicts = command(ConflictsQueryOp.class); } } return summary; }