@Test public void buildWithRevision() throws IOException { writeSomethingToCache(); AnyObjectId commit = commitToMaster(); GitFileSystem gfs = Gfs.newFileSystem(commit, repo); assertEquals(commit, gfs.getStatusProvider().commit()); }
@Nonnull public GfsConfiguration commit(RevCommit commit) { if(branch != null || this.commit != null) throw new HeadAlreadyDefinedException(); this.commit = commit; return this; }
GfsConfiguration { @Nonnull public GfsConfiguration commit(RevCommit commit) { if(branch != null || this.commit != null) throw new HeadAlreadyDefinedException(); this.commit = commit; return this; } }
GfsConfiguration { @Nonnull public GfsConfiguration commit(RevCommit commit) { if(branch != null || this.commit != null) throw new HeadAlreadyDefinedException(); this.commit = commit; return this; } GfsConfiguration(Repository repo); }
GfsConfiguration { @Nonnull public GfsConfiguration commit(RevCommit commit) { if(branch != null || this.commit != null) throw new HeadAlreadyDefinedException(); this.commit = commit; return this; } GfsConfiguration(Repository repo); @Nonnull static GfsConfiguration repo(Repository repo); @Nonnull static GfsConfiguration inMemoryRepo(); @Nonnull static GfsConfiguration fileRepo(File repoDir); @Nonnull static GfsConfiguration fileRepo(String repoDir); @Nonnull static GfsConfiguration fileRepo(Path repoDir); @Nonnull static GfsConfiguration fromPath(Path repoDir, Map<String, ?> props); @Nonnull static GfsConfiguration fromUri(URI uri, Map<String, ?> props); @Nonnull Repository repository(); @Nonnull GfsConfiguration branch(String name); @Nonnull GfsConfiguration branch(Ref ref); @Nullable String branch(); @Nonnull GfsConfiguration commit(RevCommit commit); @Nonnull GfsConfiguration commit(AnyObjectId id); @Nonnull GfsConfiguration commit(String id); @Nullable RevCommit commit(); }
GfsConfiguration { @Nonnull public GfsConfiguration commit(RevCommit commit) { if(branch != null || this.commit != null) throw new HeadAlreadyDefinedException(); this.commit = commit; return this; } GfsConfiguration(Repository repo); @Nonnull static GfsConfiguration repo(Repository repo); @Nonnull static GfsConfiguration inMemoryRepo(); @Nonnull static GfsConfiguration fileRepo(File repoDir); @Nonnull static GfsConfiguration fileRepo(String repoDir); @Nonnull static GfsConfiguration fileRepo(Path repoDir); @Nonnull static GfsConfiguration fromPath(Path repoDir, Map<String, ?> props); @Nonnull static GfsConfiguration fromUri(URI uri, Map<String, ?> props); @Nonnull Repository repository(); @Nonnull GfsConfiguration branch(String name); @Nonnull GfsConfiguration branch(Ref ref); @Nullable String branch(); @Nonnull GfsConfiguration commit(RevCommit commit); @Nonnull GfsConfiguration commit(AnyObjectId id); @Nonnull GfsConfiguration commit(String id); @Nullable RevCommit commit();  }