summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2011-04-21 15:41:10 -0700
committerShawn O. Pearce <spearce@spearce.org>2011-04-21 15:41:10 -0700
commitb9691b94a3e35d8faf77b61e9ec34848e4aae310 (patch)
treecf39274f061ba91bfe1abc3a0dc6631331bdfd40 /org.eclipse.jgit.test
parent0359184f4ed54eb5b880f66d9d514afa10d9fc4a (diff)
parent33e65ec6911795cf2816af1f64b5699dd898d59f (diff)
downloadjgit-b9691b94a3e35d8faf77b61e9ec34848e4aae310.tar.gz
jgit-b9691b94a3e35d8faf77b61e9ec34848e4aae310.zip
Merge branch 'stable-0.12'
* stable-0.12: Fix sorting of names in RefDirectory Make running static checks configurable in maven build Add constants for gerrit change id configuration
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;