@Test public void resetToRevisionWhenThereIsNoLocalChange_branchHeadShouldBecomeTheSpecifiedRevision() throws IOException { writeSomethingToCache(); ObjectId expected = commit(); GfsReset.Result result = Gfs.reset(gfs).revision(expected.getName()).execute(); assertTrue(result.isSuccessful()); assertFalse(status.isDirty()); assertEquals(expected, status.commit()); assertEquals(expected, BranchUtils.getHeadCommit(status.branch(), repo)); }
@Nonnull public GfsReset revision(String revision) { this.revision = revision; return this; }
GfsReset extends GfsCommand<GfsReset.Result> { @Nonnull public GfsReset revision(String revision) { this.revision = revision; return this; } }
GfsReset extends GfsCommand<GfsReset.Result> { @Nonnull public GfsReset revision(String revision) { this.revision = revision; return this; } GfsReset(GitFileSystem gfs); }
GfsReset extends GfsCommand<GfsReset.Result> { @Nonnull public GfsReset revision(String revision) { this.revision = revision; return this; } GfsReset(GitFileSystem gfs); @Nonnull GfsReset soft(boolean soft); @Nonnull GfsReset hard(boolean hard); @Nonnull GfsReset revision(String revision); }
GfsReset extends GfsCommand<GfsReset.Result> { @Nonnull public GfsReset revision(String revision) { this.revision = revision; return this; } GfsReset(GitFileSystem gfs); @Nonnull GfsReset soft(boolean soft); @Nonnull GfsReset hard(boolean hard); @Nonnull GfsReset revision(String revision);  }