diff options
Diffstat (limited to 'org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index 64556acc1c..5622108dcd 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -25,6 +25,7 @@ import java.io.InputStreamReader; import java.io.Reader; import java.nio.file.Path; import java.time.Instant; +import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -39,6 +40,7 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.FileMode; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectInserter; +import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; @@ -386,6 +388,16 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { } /** + * Get all Refs + * + * @return list of refs + * @throws IOException + */ + public List<Ref> getRefs() throws IOException { + return db.getRefDatabase().getRefs(); + } + + /** * Checkout a branch * * @param branchName |