import java.util.List;
import java.util.Set;
+import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheBuilder;
import org.eclipse.jgit.dircache.DirCacheEditor;
private final R db;
+ private final Git git;
+
private final RevWalk pool;
private final ObjectInserter inserter;
*/
public TestRepository(R db, RevWalk rw) throws IOException {
this.db = db;
+ this.git = Git.wrap(db);
this.pool = rw;
this.inserter = db.newObjectInserter();
this.now = 1236977987000L;
return pool;
}
+ /**
+ * @return an API wrapper for the underlying repository. This wrapper does
+ * not allocate any new resources and need not be closed (but closing
+ * it is harmless). */
+ public Git git() {
+ return git;
+ }
+
/** @return current time adjusted by {@link #tick(int)}. */
public Date getClock() {
return new Date(now);