diff --git a/org.eclipse.jgit.console/pom.xml b/org.eclipse.jgit.console/pom.xml index 1fbb024f9..83303c896 100644 --- a/org.eclipse.jgit.console/pom.xml +++ b/org.eclipse.jgit.console/pom.xml @@ -107,39 +107,6 @@ UTF-8 - - org.codehaus.mojo - findbugs-maven-plugin - - true - false - - - - - check - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - utf-8 - 100 - 1.5 - xml - false - - - - - cpd-check - - - - - + diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index 5117f0f7a..dbbe1774b 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -124,39 +124,6 @@ - - org.codehaus.mojo - findbugs-maven-plugin - - true - false - - - - - check - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - utf-8 - 100 - 1.5 - xml - false - - - - - cpd-check - - - - 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 a61580dd1..56e5549b8 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 @@ -455,6 +455,19 @@ public void testGetRefs_TagsOnly_AllLoose() throws IOException { assertEquals(v1_0, a.getObjectId()); } + @Test + public void testGetRefs_LooseSortedCorrectly() throws IOException { + Map 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 tags; diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml index 7460b17f5..daed46d97 100644 --- a/org.eclipse.jgit.ui/pom.xml +++ b/org.eclipse.jgit.ui/pom.xml @@ -98,39 +98,6 @@ - - org.codehaus.mojo - findbugs-maven-plugin - - true - false - - - - - check - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - utf-8 - 100 - 1.5 - xml - false - - - - - cpd-check - - - - diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index ea05ed0e2..ae9e77a4a 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -141,42 +141,17 @@ - - - org.codehaus.mojo - findbugs-maven-plugin - - true - false - findBugs/FindBugsExcludeFilter.xml - - - - - check - - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - utf-8 - 100 - 1.5 - xml - false - - - - - cpd-check - - - - + + + + org.codehaus.mojo + findbugs-maven-plugin + + findBugs/FindBugsExcludeFilter.xml + + + + diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java index 7e4cb3bee..411782ffc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java @@ -63,6 +63,9 @@ public class ConfigConstants { /** The "user" section */ public static final String CONFIG_USER_SECTION = "user"; + /** The "gerrit" section */ + public static final String CONFIG_GERRIT_SECTION = "gerrit"; + /** The "algorithm" key */ public static final String CONFIG_KEY_ALGORITHM = "algorithm"; @@ -127,4 +130,7 @@ public class ConfigConstants { /** The "local" key (used to configure {@link #CONFIG_KEY_AUTOSETUPREBASE} */ public static final String CONFIG_KEY_LOCAL = "local"; + + /** The "createchangeid" key */ + public static final String CONFIG_KEY_CREATECHANGEID = "createchangeid"; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java index bba634a6b..cd199dcf9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java @@ -288,6 +288,7 @@ public Map getRefs(String prefix) throws IOException { RefList loose; if (scan.newLoose != null) { + scan.newLoose.sort(); loose = scan.newLoose.toRefList(); if (looseRefs.compareAndSet(oldLoose, loose)) modCnt.incrementAndGet(); @@ -312,6 +313,7 @@ public Map getRefs(String prefix) throws IOException { loose = loose.remove(toRemove); } } + symbolic.sort(); return new RefMap(prefix, packed, upcast(loose), symbolic.toRefList()); } diff --git a/pom.xml b/pom.xml index d77cd9b21..2431fbfef 100644 --- a/pom.xml +++ b/pom.xml @@ -226,12 +226,37 @@ org.codehaus.mojo findbugs-maven-plugin 2.3.2-SNAPSHOT + + true + false + + + + + check + + + org.apache.maven.plugins maven-pmd-plugin 2.5 + + utf-8 + 100 + 1.5 + xml + false + + + + + cpd-check + + + @@ -361,6 +386,21 @@ org.eclipse.jgit.console + + static-checks + + + + org.codehaus.mojo + findbugs-maven-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + + + +