summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java
index a61580dd1f..56e5549b84 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java
@@ -456,6 +456,19 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase {
}
@Test
+ public void testGetRefs_LooseSortedCorrectly() throws IOException {
+ Map<String, Ref> refs;
+
+ writeLooseRef("refs/heads/project1/A", A);
+ writeLooseRef("refs/heads/project1-B", B);
+
+ refs = refdir.getRefs(RefDatabase.ALL);
+ assertEquals(2, refs.size());
+ assertEquals(A, refs.get("refs/heads/project1/A").getObjectId());
+ assertEquals(B, refs.get("refs/heads/project1-B").getObjectId());
+ }
+
+ @Test
public void testGetRefs_TagsOnly_AllPacked() throws IOException {
Map<String, Ref> tags;
Ref a;