/** * Pass through to the original {@link StagingArea}. */ @Override public DiffObjectCount countStaged(@Nullable List<String> pathFilters) { return index.countStaged(pathFilters); }
/** * Pass through to the original {@link StagingArea}. */ @Override public DiffObjectCount countStaged(@Nullable List<String> pathFilters) { return index.countStaged(pathFilters); }
public DiffObjectCount countStaged() { return getRepository().index().countStaged(null); }
public DiffObjectCount countStaged() { return getRepository().index().countStaged(null); }
console.println("done."); } else { DiffObjectCount staged = geogig.getRepository().index().countStaged(null); DiffObjectCount unstaged = workTree.countUnstaged(null);
console.println("done."); } else { DiffObjectCount staged = geogig.getRepository().index().countStaged(null); DiffObjectCount unstaged = workTree.countUnstaged(null);
console.println("done."); } else { DiffObjectCount staged = geogig.getRepository().index().countStaged(null); DiffObjectCount unstaged = workTree.countUnstaged(null);
long staged = index().countStaged(null).count(); long unstaged = workingTree().countUnstaged(null).count(); Preconditions.checkState((staged == 0 && unstaged == 0),
@Test public void testAddTreeDeletion() throws Exception { insert(points1); insert(points2); geogig.command(AddOp.class).call(); repo.workingTree().delete(pointsName); geogig.command(AddOp.class).call(); List<DiffEntry> staged = toList(repo.index().getStaged(Lists.newArrayList(pointsName))); assertEquals(0, staged.size()); assertEquals(0, repo.index().countStaged(null).featureCount()); assertEquals(0, repo.index().countStaged(null).treeCount()); }
@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; }
@Test public void testAddTreeDeletion() throws Exception { insert(points1); insert(points2); geogig.command(AddOp.class).call(); repo.workingTree().delete(pointsName); geogig.command(AddOp.class).call(); List<DiffEntry> staged = toList(repo.index().getStaged(Lists.newArrayList(pointsName))); assertEquals(0, staged.size()); assertEquals(0, repo.index().countStaged(null).featureCount()); assertEquals(0, repo.index().countStaged(null).treeCount()); }