diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2020-12-02 15:49:35 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2020-12-02 15:49:59 +0100 |
commit | 485e4f9cf1f94c7de47c9df620e4965e600f7549 (patch) | |
tree | 46ce1ce84c35e4f1380ffdab17f068bfdf4af4ca | |
parent | d4fe93f55bcdf3115a53ac69c1594dd7799e2453 (diff) | |
parent | 205ee010f6a790eb45bcfc75676d62530338dec7 (diff) | |
download | jgit-485e4f9cf1f94c7de47c9df620e4965e600f7549.tar.gz jgit-485e4f9cf1f94c7de47c9df620e4965e600f7549.zip |
Merge branch 'master' into stable-5.10
* master:
Prepare 5.3.10-SNAPSHOT builds
JGit v5.3.9.202012012026-r
Prepare 5.1.16-SNAPSHOT builds
JGit v5.1.15.202012011955-r
Fix PackInvalidException when fetch and repack run concurrently
Upgrade maven-pmd-plugin to 3.14.0
Update Orbit to R20201130205003 for 2020-12
Use new protocol version constants
PacketLineInTest: test for END and DELIM being distinguishable
Add constants for parsing git wire protocol version
Ignore missing javadoc tags in test bundles
Bazel: Allow to build and run the tests with JDK 15
[releng] japicmp: update last release version
Add support for reading symrefs from pack capabilities
Change-Id: I5afbbb912f502991f0cf9c2501b024f5f00144ba
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
53 files changed, 625 insertions, 114 deletions
diff --git a/.bazelversion b/.bazelversion index 1545d96657..8faff82c7b 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -3.5.0 +4.0.0rc2 @@ -27,6 +27,34 @@ load( "maven_jar", ) +http_archive( + name = "openjdk15_linux_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "0a38f1138c15a4f243b75eb82f8ef40855afcc402e3c2a6de97ce8235011b1ad", + strip_prefix = "zulu15.27.17-ca-jdk15.0.0-linux_x64", + urls = [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz", + ], +) + +http_archive( + name = "openjdk15_darwin_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "f80b2e0512d9d8a92be24497334c974bfecc8c898fc215ce0e76594f00437482", + strip_prefix = "zulu15.27.17-ca-jdk15.0.0-macosx_x64", + urls = [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz", + ], +) + JMH_VERS = "1.21" maven_jar( diff --git a/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs index 822846c4d0..cba893f04e 100644 --- a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java index 96657761cf..26a453be14 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java @@ -38,6 +38,7 @@ import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.junit.http.AccessEvent; import org.eclipse.jgit.junit.http.AppServer; +import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.RefUpdate; @@ -49,6 +50,7 @@ import org.eclipse.jgit.transport.HttpTransport; import org.eclipse.jgit.transport.PacketLineIn; import org.eclipse.jgit.transport.PacketLineOut; import org.eclipse.jgit.transport.Transport; +import org.eclipse.jgit.transport.TransferConfig; import org.eclipse.jgit.transport.URIish; import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; import org.eclipse.jgit.transport.http.HttpConnection; @@ -342,8 +344,10 @@ public class HttpClientTests extends AllFactoriesHttpTestCase { @Test public void testV2HttpFirstResponse() throws Exception { - remoteRepository.getRepository().getConfig().setInt( - "protocol", null, "version", 2); + remoteRepository.getRepository().getConfig().setString( + ConfigConstants.CONFIG_PROTOCOL_SECTION, null, + ConfigConstants.CONFIG_KEY_VERSION, + TransferConfig.ProtocolVersion.V2.version()); String url = smartAuthNoneURI.toString() + "/info/refs?service=git-upload-pack"; HttpConnection c = HttpTransport.getConnectionFactory() @@ -364,8 +368,10 @@ public class HttpClientTests extends AllFactoriesHttpTestCase { @Test public void testV2HttpSubsequentResponse() throws Exception { - remoteRepository.getRepository().getConfig().setInt( - "protocol", null, "version", 2); + remoteRepository.getRepository().getConfig().setString( + ConfigConstants.CONFIG_PROTOCOL_SECTION, null, + ConfigConstants.CONFIG_KEY_VERSION, + TransferConfig.ProtocolVersion.V2.version()); String url = smartAuthNoneURI.toString() + "/git-upload-pack"; HttpConnection c = HttpTransport.getConnectionFactory() diff --git a/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index 931e196cf6..d7e158503f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.10" sequenceNumber="1605866255"> +<target name="jgit-4.10" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index b87917b8ab..d84f801877 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index 8090999601..42ef49c62c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.11" sequenceNumber="1605866333"> +<target name="jgit-4.11" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index 844a1d791f..df221e6571 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 69eb639726..17634cf129 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.12" sequenceNumber="1605866333"> +<target name="jgit-4.12" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index afbf79d531..56fd714e74 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index fdbed2d2a4..04b536e6dc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.13" sequenceNumber="1605866333"> +<target name="jgit-4.13" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index d83e338460..46069c326e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index c2ef9d24a1..c1722ffedc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.14" sequenceNumber="1605866331"> +<target name="jgit-4.14" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index f357ccd24c..f517ab254c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 4034d2a362..7f5f5a17d7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.15" sequenceNumber="1605866331"> +<target name="jgit-4.15" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd index 881fe37e73..1e4a0eed54 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -1,7 +1,7 @@ target "jgit-4.15" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2020-03/202003181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index 34d872cdd5..bba090a136 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.16" sequenceNumber="1605866333"> +<target name="jgit-4.16" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd index 9a07597119..2435c48b50 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd @@ -1,7 +1,7 @@ target "jgit-4.16" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2020-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index 3384c23563..d7c1728ba3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.17" sequenceNumber="1605866541"> +<target name="jgit-4.17" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd index ce79cf45e8..432741575b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -1,7 +1,7 @@ target "jgit-4.17" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2020-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.target index 5eeab9534a..913009d8a5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.18-staging" sequenceNumber="1605866541"> +<target name="jgit-4.18-staging" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.tpd index 0669490bb0..d8e3445690 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.tpd @@ -1,7 +1,7 @@ target "jgit-4.18-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/staging/2020-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index a66fcc0821..061dcf29da 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.6" sequenceNumber="1605866347"> +<target name="jgit-4.6" sequenceNumber="1606854620"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index aa58b68577..c7fbf02ae5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 4b5410a3d7..b96c54dfd0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.7" sequenceNumber="1605866338"> +<target name="jgit-4.7" sequenceNumber="1606854608"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index e2264e0038..585e04b3c1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index d776427455..3ddc0bc6fa 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.8" sequenceNumber="1605866333"> +<target name="jgit-4.8" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index c92ce53963..694fc675d7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 56002b78a8..f119fc10d4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.9" sequenceNumber="1605866333"> +<target name="jgit-4.9" sequenceNumber="1606854603"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index 06ccecbd5d..ae5390cec1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20201118210000.tpd" +include "orbit/R20201130205003-2020-12.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20201118210000.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20201130205003-2020-12.tpd index a00a5e7c87..08a0846de7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20201118210000.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20201130205003-2020-12.tpd @@ -1,7 +1,7 @@ -target "S20201118210000" with source configurePhase +target "R20201130205003-2020-12" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository" { com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110] com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] diff --git a/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java index 4ecaeb604a..46eec7436e 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java @@ -33,7 +33,7 @@ public class LsRemoteTest extends CLIRepositoryTestCase { git.add().addFilepattern("Test.txt").call(); git.commit().setMessage("Initial commit").call(); - // create a master branch and switch to it + // create a test branch and switch to it git.branchCreate().setName("test").call(); RefUpdate rup = db.updateRef(Constants.HEAD); rup.link("refs/heads/test"); @@ -104,4 +104,22 @@ public class LsRemoteTest extends CLIRepositoryTestCase { "" }, result.toArray()); } + @Test + public void testLsRemoteSymRefs() throws Exception { + final List<String> result = CLIGitCommand.execute( + "git ls-remote --symref " + shellQuote(db.getDirectory()), db); + assertArrayEquals(new String[] { + "ref: refs/heads/test HEAD", + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c HEAD", + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/master", + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/test", + "efc02078d83a5226986ae917323acec7e1e8b7cb refs/tags/tag1", + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag1^{}", + "4e4b837e0fd4ba83c003678b03592dc1509a4115 refs/tags/tag2", + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag2^{}", + "489384bf8ace47522fe32093d2ceb85b65a6cbb1 refs/tags/tag3", + "d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag3^{}", + "" }, result.toArray()); + } + } diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index c116437c64..6112a272e4 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -256,6 +256,7 @@ usage_LsFiles=Show information about files in the index and the working tree usage_LsRemote=List references in a remote repository usage_lsRemoteHeads=Show only refs starting with refs/heads usage_lsRemoteTags=Show only refs starting with refs/tags +usage_lsRemoteSymref=In addition to the object pointed at, show the underlying ref pointed at when showing a symbolic ref. usage_LsTree=List the contents of a tree object usage_MakeCacheTree=Show the current cache tree structure usage_Match=Only consider tags matching the given glob(7) pattern or patterns, excluding the "refs/tags/" prefix. diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java index 36812c03a4..055b48a157 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java @@ -34,6 +34,9 @@ class LsRemote extends TextBuiltin { @Option(name = "--timeout", metaVar = "metaVar_service", usage = "usage_abortConnectionIfNoActivity") int timeout = -1; + @Option(name = "--symref", usage = "usage_lsRemoteSymref") + private boolean symref; + @Argument(index = 0, metaVar = "metaVar_uriish", required = true) private String remote; @@ -47,6 +50,9 @@ class LsRemote extends TextBuiltin { try { refs.addAll(command.call()); for (Ref r : refs) { + if (symref && r.isSymbolic()) { + show(r.getTarget(), r.getName()); + } show(r.getObjectId(), r.getName()); if (r.getPeeledObjectId() != null) { show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$ @@ -70,4 +76,13 @@ class LsRemote extends TextBuiltin { outw.print(name); outw.println(); } + + private void show(Ref ref, String name) + throws IOException { + outw.print("ref: "); + outw.print(ref.getName()); + outw.print('\t'); + outw.print(name); + outw.println(); + } } diff --git a/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs index 822846c4d0..cba893f04e 100644 --- a/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs index 2bc2cf30de..c16c986285 100644 --- a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs @@ -52,8 +52,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java index b737bbec0e..de25870bd0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java @@ -92,7 +92,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); ObjectId id = git2.getRepository().resolve("tag-for-blob"); assertNotNull(id); assertEquals(git2.getRepository().getFullBranch(), "refs/heads/test"); @@ -277,8 +276,7 @@ public class CloneCommandTest extends RepositoryTestCase { Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals( "refs/heads/master, refs/remotes/origin/master, refs/remotes/origin/test", allRefNames(git2.branchList().setListMode(ListMode.ALL).call())); @@ -293,7 +291,6 @@ public class CloneCommandTest extends RepositoryTestCase { git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); assertEquals("refs/remotes/origin/master, refs/remotes/origin/test", allRefNames(git2.branchList().setListMode(ListMode.ALL).call())); @@ -308,8 +305,7 @@ public class CloneCommandTest extends RepositoryTestCase { git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/heads/master, refs/heads/test", allRefNames(git2 .branchList().setListMode(ListMode.ALL).call())); } @@ -324,7 +320,6 @@ public class CloneCommandTest extends RepositoryTestCase { Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals("refs/heads/test", git2.getRepository().getFullBranch()); } @@ -338,7 +333,6 @@ public class CloneCommandTest extends RepositoryTestCase { Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); ObjectId taggedCommit = db.resolve("tag-initial^{commit}"); assertEquals(taggedCommit.name(), git2 .getRepository().getFullBranch()); @@ -355,10 +349,9 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("tag-for-blob")); assertNotNull(git2.getRepository().resolve("tag-initial")); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/remotes/origin/master", allRefNames(git2 .branchList().setListMode(ListMode.REMOTE).call())); RemoteConfig cfg = new RemoteConfig(git2.getRepository().getConfig(), @@ -383,10 +376,9 @@ public class CloneCommandTest extends RepositoryTestCase { command.setBare(true); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("tag-for-blob")); assertNotNull(git2.getRepository().resolve("tag-initial")); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/heads/master", allRefNames(git2.branchList() .setListMode(ListMode.ALL).call())); RemoteConfig cfg = new RemoteConfig(git2.getRepository().getConfig(), @@ -409,11 +401,10 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertTrue(git2.getRepository().isBare()); assertNotNull(git2.getRepository().resolve("tag-for-blob")); assertNotNull(git2.getRepository().resolve("tag-initial")); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/heads/master, refs/heads/test", allRefNames( git2.branchList().setListMode(ListMode.ALL).call())); assertNotNull(git2.getRepository().exactRef("refs/meta/foo/bar")); @@ -436,7 +427,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("tag-for-blob")); assertNull(git2.getRepository().resolve("refs/heads/master")); assertNotNull(git2.getRepository().resolve("tag-initial")); @@ -464,8 +454,7 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/test"); + assertEquals("refs/heads/test", git2.getRepository().getFullBranch()); // Expect both remote branches to exist; setCloneAllBranches(true) // should override any setBranchesToClone(). assertNotNull( @@ -492,8 +481,7 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/test"); + assertEquals("refs/heads/test", git2.getRepository().getFullBranch()); // Expect only the test branch; allBranches was re-set to false assertNull(git2.getRepository().resolve("refs/remotes/origin/master")); assertNotNull(git2.getRepository().resolve("refs/remotes/origin/test")); @@ -525,7 +513,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); // clone again command = Git.cloneRepository(); command.setDirectory(directory); @@ -551,7 +538,6 @@ public class CloneCommandTest extends RepositoryTestCase { clone.setURI(fileUri()); Git git2 = clone.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(Constants.MASTER, git2.getRepository().getBranch()); } @@ -595,7 +581,6 @@ public class CloneCommandTest extends RepositoryTestCase { clone.setURI(fileUri()); Git git2 = clone.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(Constants.MASTER, git2.getRepository().getBranch()); assertTrue(new File(git2.getRepository().getWorkTree(), path @@ -683,7 +668,6 @@ public class CloneCommandTest extends RepositoryTestCase { clone.setURI(git.getRepository().getDirectory().toURI().toString()); Git git2 = clone.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(Constants.MASTER, git2.getRepository().getBranch()); assertTrue(new File(git2.getRepository().getWorkTree(), path @@ -813,7 +797,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setNoTags(); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNotNull(git2.getRepository().resolve("refs/heads/test")); assertNull(git2.getRepository().resolve("tag-initial")); assertNull(git2.getRepository().resolve("tag-for-blob")); @@ -833,13 +816,41 @@ public class CloneCommandTest extends RepositoryTestCase { command.setTagOption(TagOpt.FETCH_TAGS); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("refs/heads/test")); assertNotNull(git2.getRepository().resolve("tag-initial")); assertNotNull(git2.getRepository().resolve("tag-for-blob")); assertTagOption(git2.getRepository(), TagOpt.FETCH_TAGS); } + @Test + public void testCloneWithHeadSymRefIsMasterCopy() throws IOException, GitAPIException { + // create a branch with the same head as master and switch to it + git.checkout().setStartPoint("master").setCreateBranch(true).setName("master-copy").call(); + + // when we clone the HEAD symref->master-copy means we start on master-copy and not master + File directory = createTempDirectory("testCloneRepositorySymRef_master-copy"); + CloneCommand command = Git.cloneRepository(); + command.setDirectory(directory); + command.setURI(fileUri()); + Git git2 = command.call(); + addRepoToClose(git2.getRepository()); + assertEquals("refs/heads/master-copy", git2.getRepository().getFullBranch()); + } + + @Test + public void testCloneWithHeadSymRefIsNonMasterCopy() throws IOException, GitAPIException { + // create a branch with the same head as test and switch to it + git.checkout().setStartPoint("test").setCreateBranch(true).setName("test-copy").call(); + + File directory = createTempDirectory("testCloneRepositorySymRef_test-copy"); + CloneCommand command = Git.cloneRepository(); + command.setDirectory(directory); + command.setURI(fileUri()); + Git git2 = command.call(); + addRepoToClose(git2.getRepository()); + assertEquals("refs/heads/test-copy", git2.getRepository().getFullBranch()); + } + private void assertTagOption(Repository repo, TagOpt expectedTagOption) throws URISyntaxException { RemoteConfig remoteConfig = new RemoteConfig( diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java index 00f84e9aea..12ec2aae57 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java @@ -11,9 +11,11 @@ package org.eclipse.jgit.api; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import java.io.File; import java.util.Collection; +import java.util.Optional; import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.lib.Constants; @@ -34,7 +36,7 @@ public class LsRemoteCommandTest extends RepositoryTestCase { git.add().addFilepattern("Test.txt").call(); git.commit().setMessage("Initial commit").call(); - // create a master branch and switch to it + // create a test branch and switch to it git.branchCreate().setName("test").call(); RefUpdate rup = db.updateRef(Constants.HEAD); rup.link("refs/heads/test"); @@ -104,6 +106,28 @@ public class LsRemoteCommandTest extends RepositoryTestCase { assertEquals(2, refs.size()); } + @Test + public void testLsRemoteWithSymRefs() throws Exception { + File directory = createTempDirectory("testRepository"); + CloneCommand command = Git.cloneRepository(); + command.setDirectory(directory); + command.setURI(fileUri()); + command.setCloneAllBranches(true); + Git git2 = command.call(); + addRepoToClose(git2.getRepository()); + + + LsRemoteCommand lsRemoteCommand = git2.lsRemote(); + Collection<Ref> refs = lsRemoteCommand.call(); + assertNotNull(refs); + assertEquals(6, refs.size()); + + Optional<Ref> headRef = refs.stream().filter(ref -> ref.getName().equals(Constants.HEAD)).findFirst(); + assertTrue("expected a HEAD Ref", headRef.isPresent()); + assertTrue("expected HEAD Ref to be a Symbolic", headRef.get().isSymbolic()); + assertEquals("refs/heads/test", headRef.get().getTarget().getName()); + } + private String fileUri() { return "file://" + git.getRepository().getWorkTree().getAbsolutePath(); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BasePackConnectionTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BasePackConnectionTest.java new file mode 100644 index 0000000000..64b16f659a --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BasePackConnectionTest.java @@ -0,0 +1,233 @@ +/* + * Copyright (C) 2020, Lee Worrall and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.transport; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasKey; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertSame; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.lib.ObjectIdRef; +import org.eclipse.jgit.lib.Ref; +import org.eclipse.jgit.lib.SymbolicRef; +import org.junit.Test; + +public class BasePackConnectionTest { + + @Test + public void testExtractSymRefsFromCapabilities() { + final Map<String, String> symRefs = BasePackConnection + .extractSymRefsFromCapabilities( + Arrays.asList("symref=HEAD:refs/heads/main", + "symref=refs/heads/sym:refs/heads/other")); + + assertEquals(2, symRefs.size()); + assertEquals("refs/heads/main", symRefs.get("HEAD")); + assertEquals("refs/heads/other", symRefs.get("refs/heads/sym")); + } + + @Test + public void testUpdateWithSymRefsAdds() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new HashMap<>(); + symRefs.put("HEAD", "refs/heads/main"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("HEAD")); + final Ref headRef = refMap.get("HEAD"); + assertThat(headRef, instanceOf(SymbolicRef.class)); + final SymbolicRef headSymRef = (SymbolicRef) headRef; + assertEquals("HEAD", headSymRef.getName()); + assertSame(mainRef, headSymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsReplaces() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("HEAD", new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "HEAD", + mainRef.getObjectId())); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new HashMap<>(); + symRefs.put("HEAD", "refs/heads/main"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("HEAD")); + final Ref headRef = refMap.get("HEAD"); + assertThat(headRef, instanceOf(SymbolicRef.class)); + final SymbolicRef headSymRef = (SymbolicRef) headRef; + assertEquals("HEAD", headSymRef.getName()); + assertSame(mainRef, headSymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsWithIndirectsAdds() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); // Ordered + symRefs.put("refs/heads/sym3", "refs/heads/sym2"); // Forward reference + symRefs.put("refs/heads/sym1", "refs/heads/main"); + symRefs.put("refs/heads/sym2", "refs/heads/sym1"); // Backward reference + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("refs/heads/sym1")); + final Ref sym1Ref = refMap.get("refs/heads/sym1"); + assertThat(sym1Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym1SymRef = (SymbolicRef) sym1Ref; + assertEquals("refs/heads/sym1", sym1SymRef.getName()); + assertSame(mainRef, sym1SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym2")); + final Ref sym2Ref = refMap.get("refs/heads/sym2"); + assertThat(sym2Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym2SymRef = (SymbolicRef) sym2Ref; + assertEquals("refs/heads/sym2", sym2SymRef.getName()); + assertSame(sym1SymRef, sym2SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym3")); + final Ref sym3Ref = refMap.get("refs/heads/sym3"); + assertThat(sym3Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym3SymRef = (SymbolicRef) sym3Ref; + assertEquals("refs/heads/sym3", sym3SymRef.getName()); + assertSame(sym2SymRef, sym3SymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsWithIndirectsReplaces() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/sym1", new ObjectIdRef.Unpeeled( + Ref.Storage.LOOSE, "refs/heads/sym1", mainRef.getObjectId())); + refMap.put("refs/heads/sym2", new ObjectIdRef.Unpeeled( + Ref.Storage.LOOSE, "refs/heads/sym2", mainRef.getObjectId())); + refMap.put("refs/heads/sym3", new ObjectIdRef.Unpeeled( + Ref.Storage.LOOSE, "refs/heads/sym3", mainRef.getObjectId())); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); // Ordered + symRefs.put("refs/heads/sym3", "refs/heads/sym2"); // Forward reference + symRefs.put("refs/heads/sym1", "refs/heads/main"); + symRefs.put("refs/heads/sym2", "refs/heads/sym1"); // Backward reference + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("refs/heads/sym1")); + final Ref sym1Ref = refMap.get("refs/heads/sym1"); + assertThat(sym1Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym1SymRef = (SymbolicRef) sym1Ref; + assertEquals("refs/heads/sym1", sym1SymRef.getName()); + assertSame(mainRef, sym1SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym2")); + final Ref sym2Ref = refMap.get("refs/heads/sym2"); + assertThat(sym2Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym2SymRef = (SymbolicRef) sym2Ref; + assertEquals("refs/heads/sym2", sym2SymRef.getName()); + assertSame(sym1SymRef, sym2SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym3")); + final Ref sym3Ref = refMap.get("refs/heads/sym3"); + assertThat(sym3Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym3SymRef = (SymbolicRef) sym3Ref; + assertEquals("refs/heads/sym3", sym3SymRef.getName()); + assertSame(sym2SymRef, sym3SymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsIgnoresSelfReference() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); + symRefs.put("refs/heads/sym1", "refs/heads/sym1"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertEquals(2, refMap.size()); + assertThat(refMap, not(hasKey("refs/heads/sym1"))); + } + + @Test + public void testUpdateWithSymRefsIgnoreCircularReference() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); + symRefs.put("refs/heads/sym2", "refs/heads/sym1"); + symRefs.put("refs/heads/sym1", "refs/heads/sym2"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertEquals(2, refMap.size()); + assertThat(refMap, not(hasKey("refs/heads/sym1"))); + assertThat(refMap, not(hasKey("refs/heads/sym2"))); + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java index 5d7f881ab9..7f03357e9c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java @@ -12,8 +12,8 @@ package org.eclipse.jgit.transport; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; @@ -111,20 +111,25 @@ public class PacketLineInTest { final String act = in.readString(); assertEquals("", act); assertFalse(PacketLineIn.isEnd(act)); + assertFalse(PacketLineIn.isDelimiter(act)); assertEOF(); } @Test public void testReadString_End() throws IOException { init("0000"); - assertTrue(PacketLineIn.isEnd(in.readString())); + String act = in.readString(); + assertTrue(PacketLineIn.isEnd(act)); + assertFalse(PacketLineIn.isDelimiter(act)); assertEOF(); } @Test public void testReadString_Delim() throws IOException { init("0001"); - assertTrue(PacketLineIn.isDelimiter(in.readString())); + String act = in.readString(); + assertTrue(PacketLineIn.isDelimiter(act)); + assertFalse(PacketLineIn.isEnd(act)); assertEOF(); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java index ce546e357e..5045e9464e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java @@ -38,6 +38,7 @@ import org.eclipse.jgit.internal.storage.file.PackLock; import org.eclipse.jgit.internal.storage.pack.CachedPack; import org.eclipse.jgit.internal.storage.pack.CachedPackUriProvider; import org.eclipse.jgit.junit.TestRepository; +import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.NullProgressMonitor; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectInserter; @@ -370,7 +371,8 @@ public class UploadPackTest { ByteArrayInputStream send = linesAsInputStream(inputLines); - server.getConfig().setString("protocol", null, "version", version); + server.getConfig().setString(ConfigConstants.CONFIG_PROTOCOL_SECTION, + null, ConfigConstants.CONFIG_KEY_VERSION, version); UploadPack up = new UploadPack(server); if (postConstructionSetup != null) { postConstructionSetup.accept(up); @@ -435,8 +437,9 @@ public class UploadPackTest { Consumer<UploadPack> postConstructionSetup, String... inputLines) throws Exception { - ByteArrayInputStream recvStream = - uploadPackSetup("2", postConstructionSetup, inputLines); + ByteArrayInputStream recvStream = uploadPackSetup( + TransferConfig.ProtocolVersion.V2.version(), + postConstructionSetup, inputLines); PacketLineIn pckIn = new PacketLineIn(recvStream); // drain capabilities @@ -476,9 +479,11 @@ public class UploadPackTest { @Test public void testV2Capabilities() throws Exception { TestV2Hook hook = new TestV2Hook(); - ByteArrayInputStream recvStream = uploadPackSetup( "2", - (UploadPack up) -> {up.setProtocolV2Hook(hook);}, - PacketLineIn.end()); + ByteArrayInputStream recvStream = uploadPackSetup( + TransferConfig.ProtocolVersion.V2.version(), + (UploadPack up) -> { + up.setProtocolV2Hook(hook); + }, PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(hook.capabilitiesRequest, notNullValue()); assertThat(pckIn.readString(), is("version 2")); @@ -498,8 +503,9 @@ public class UploadPackTest { private void checkAdvertisedIfAllowed(String configSection, String configName, String fetchCapability) throws Exception { server.getConfig().setBoolean(configSection, null, configName, true); - ByteArrayInputStream recvStream = - uploadPackSetup("2", null, PacketLineIn.end()); + ByteArrayInputStream recvStream = uploadPackSetup( + TransferConfig.ProtocolVersion.V2.version(), null, + PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is("version 2")); @@ -522,8 +528,9 @@ public class UploadPackTest { private void checkUnadvertisedIfUnallowed(String configSection, String configName, String fetchCapability) throws Exception { server.getConfig().setBoolean(configSection, null, configName, false); - ByteArrayInputStream recvStream = - uploadPackSetup("2", null, PacketLineIn.end()); + ByteArrayInputStream recvStream = uploadPackSetup( + TransferConfig.ProtocolVersion.V2.version(), null, + PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is("version 2")); @@ -574,8 +581,9 @@ public class UploadPackTest { public void testV2CapabilitiesRefInWantNotAdvertisedIfAdvertisingForbidden() throws Exception { server.getConfig().setBoolean("uploadpack", null, "allowrefinwant", true); server.getConfig().setBoolean("uploadpack", null, "advertiserefinwant", false); - ByteArrayInputStream recvStream = - uploadPackSetup("2", null, PacketLineIn.end()); + ByteArrayInputStream recvStream = uploadPackSetup( + TransferConfig.ProtocolVersion.V2.version(), null, + PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is("version 2")); @@ -739,7 +747,10 @@ public class UploadPackTest { PacketLineIn.end() }; TestV2Hook testHook = new TestV2Hook(); - uploadPackSetup("2", (UploadPack up) -> {up.setProtocolV2Hook(testHook);}, lines); + uploadPackSetup(TransferConfig.ProtocolVersion.V2.version(), + (UploadPack up) -> { + up.setProtocolV2Hook(testHook); + }, lines); LsRefsV2Request req = testHook.lsRefsRequest; assertEquals(2, req.getServerOptions().size()); @@ -1559,7 +1570,10 @@ public class UploadPackTest { PacketLineIn.end() }; TestV2Hook testHook = new TestV2Hook(); - uploadPackSetup("2", (UploadPack up) -> {up.setProtocolV2Hook(testHook);}, lines); + uploadPackSetup(TransferConfig.ProtocolVersion.V2.version(), + (UploadPack up) -> { + up.setProtocolV2Hook(testHook); + }, lines); FetchV2Request req = testHook.fetchRequest; assertNotNull(req); @@ -2253,7 +2267,9 @@ public class UploadPackTest { @Test public void testGetPeerAgentProtocolV2() throws Exception { - server.getConfig().setString("protocol", null, "version", "2"); + server.getConfig().setString(ConfigConstants.CONFIG_PROTOCOL_SECTION, + null, ConfigConstants.CONFIG_KEY_VERSION, + TransferConfig.ProtocolVersion.V2.version()); RevCommit one = remote.commit().message("1").create(); remote.update("one", one); diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index 538c6f7bfb..035ed37c10 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -1,5 +1,14 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <component id="org.eclipse.jgit" version="2"> + <resource path="src/org/eclipse/jgit/lib/ConfigConstants.java" type="org.eclipse.jgit.lib.ConfigConstants"> + <filter id="1141899266"> + <message_arguments> + <message_argument value="5.9"/> + <message_argument value="5.10"/> + <message_argument value="CONFIG_PROTOCOL_SECTION"/> + </message_arguments> + </filter> + </resource> <resource path="src/org/eclipse/jgit/lib/TypedConfigGetter.java" type="org.eclipse.jgit.lib.TypedConfigGetter"> <filter id="404000815"> <message_arguments> @@ -36,4 +45,13 @@ </message_arguments> </filter> </resource> + <resource path="src/org/eclipse/jgit/transport/TransferConfig.java" type="org.eclipse.jgit.transport.TransferConfig$ProtocolVersion"> + <filter id="1175453698"> + <message_arguments> + <message_argument value="5.9"/> + <message_argument value="5.10"/> + <message_argument value="org.eclipse.jgit.transport.TransferConfig.ProtocolVersion"/> + </message_arguments> + </filter> + </resource> </component> diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java index 30d7f9adc4..aba86fc361 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java @@ -413,6 +413,10 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> { return null; } + if (idHEAD != null && idHEAD.isSymbolic()) { + return idHEAD.getTarget(); + } + Ref master = result.getAdvertisedRef(Constants.R_HEADS + Constants.MASTER); ObjectId objectId = master != null ? master.getObjectId() : null; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java index 254c020237..e112fe7444 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java @@ -650,6 +650,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> { private void doOpen() throws IOException { if (invalid) { + openFail(true, invalidatingCause); throw new PackInvalidException(packFile, invalidatingCause); } try { 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 4fcf8e2dcd..834fff5dd9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java @@ -93,6 +93,12 @@ public final class ConfigConstants { public static final String CONFIG_GPG_SECTION = "gpg"; /** + * The "protocol" section + * @since 5.9 + */ + public static final String CONFIG_PROTOCOL_SECTION = "protocol"; + + /** * The "format" key * @since 5.2 */ @@ -685,7 +691,7 @@ public final class ConfigConstants { public static final String CONFIG_INDEX_SECTION = "index"; /** - * The "index.version" key + * The "version" key * * @since 5.9 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java index 1417faee80..3a36398629 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java @@ -21,8 +21,11 @@ import java.io.InputStream; import java.io.OutputStream; import java.text.MessageFormat; import java.util.Arrays; +import java.util.Collection; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.Map; import java.util.Set; import org.eclipse.jgit.errors.InvalidObjectIdException; @@ -35,6 +38,7 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectIdRef; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.lib.SymbolicRef; import org.eclipse.jgit.util.io.InterruptTimer; import org.eclipse.jgit.util.io.TimeoutInputStream; import org.eclipse.jgit.util.io.TimeoutOutputStream; @@ -49,6 +53,8 @@ import org.eclipse.jgit.util.io.TimeoutOutputStream; */ abstract class BasePackConnection extends BaseConnection { + protected static final String CAPABILITY_SYMREF_PREFIX = "symref="; //$NON-NLS-1$ + /** The repository this transport fetches into, or pushes out of. */ protected final Repository local; @@ -228,10 +234,109 @@ abstract class BasePackConnection extends BaseConnection { throw duplicateAdvertisement(name); } } + updateWithSymRefs(avail, extractSymRefsFromCapabilities(remoteCapablities)); available(avail); } /** + * Finds values in the given capabilities of the form: + * + * <pre> + * symref=<em>source</em>:<em>target</em> + * </pre> + * + * And returns a Map of source->target entries. + * + * @param capabilities + * the capabilities lines + * @return a Map of the symref entries from capabilities + * @throws NullPointerException + * if capabilities, or any entry in it, is null + */ + static Map<String, String> extractSymRefsFromCapabilities(Collection<String> capabilities) { + final Map<String, String> symRefs = new LinkedHashMap<>(); + for (String option : capabilities) { + if (option.startsWith(CAPABILITY_SYMREF_PREFIX)) { + String[] symRef = option + .substring(CAPABILITY_SYMREF_PREFIX.length()) + .split(":", 2); //$NON-NLS-1$ + if (symRef.length == 2) { + symRefs.put(symRef[0], symRef[1]); + } + } + } + return symRefs; + } + + /** + * Updates the given refMap with {@link SymbolicRef}s defined by the given + * symRefs. + * <p> + * For each entry, symRef, in symRefs, whose value is a key in refMap, adds + * a new entry to refMap with that same key and value of a new + * {@link SymbolicRef} with source=symRef.key and + * target=refMap.get(symRef.value), then removes that entry from symRefs. + * <p> + * If refMap already contains an entry for symRef.key, it is replaced. + * </p> + * </p> + * <p> + * For example, given: + * </p> + * + * <pre> + * refMap.put("refs/heads/main", ref); + * symRefs.put("HEAD", "refs/heads/main"); + * </pre> + * + * then: + * + * <pre> + * updateWithSymRefs(refMap, symRefs); + * </pre> + * + * has the <em>effect</em> of: + * + * <pre> + * refMap.put("HEAD", + * new SymbolicRef("HEAD", refMap.get(symRefs.remove("HEAD")))) + * </pre> + * <p> + * Any entry in symRefs whose value is not a key in refMap is ignored. Any + * circular symRefs are ignored. + * </p> + * <p> + * Upon completion, symRefs will contain only any unresolvable entries. + * </p> + * + * @param refMap + * a non-null, modifiable, Map to update, and the provider of + * symref targets. + * @param symRefs + * a non-null, modifiable, Map of symrefs. + * @throws NullPointerException + * if refMap or symRefs is null + */ + static void updateWithSymRefs(Map<String, Ref> refMap, Map<String, String> symRefs) { + boolean haveNewRefMapEntries = !refMap.isEmpty(); + while (!symRefs.isEmpty() && haveNewRefMapEntries) { + haveNewRefMapEntries = false; + final Iterator<Map.Entry<String, String>> iterator = symRefs.entrySet().iterator(); + while (iterator.hasNext()) { + final Map.Entry<String, String> symRef = iterator.next(); + if (!symRefs.containsKey(symRef.getValue())) { // defer forward reference + final Ref r = refMap.get(symRef.getValue()); + if (r != null) { + refMap.put(symRef.getKey(), new SymbolicRef(symRef.getKey(), r)); + haveNewRefMapEntries = true; + iterator.remove(); + } + } + } + } + } + + /** * Create an exception to indicate problems finding a remote repository. The * caller is expected to throw the returned exception. * diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java index cc577fa11e..0b38159c09 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java @@ -21,6 +21,7 @@ import java.util.Map; import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.internal.storage.file.LazyObjectIdSetFile; import org.eclipse.jgit.lib.Config; +import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Config.SectionParser; import org.eclipse.jgit.lib.ObjectChecker; import org.eclipse.jgit.lib.ObjectIdSet; @@ -60,11 +61,19 @@ public class TransferConfig { } /** - * A git configuration variable for which versions of the Git protocol to prefer. - * Used in protocol.version. + * A git configuration variable for which versions of the Git protocol to + * prefer. Used in protocol.version. + * + * @since 5.9 */ - enum ProtocolVersion { + public enum ProtocolVersion { + /** + * Git wire protocol version 0 (the default). + */ V0("0"), //$NON-NLS-1$ + /** + * Git wire protocol version 2. + */ V2("2"); //$NON-NLS-1$ final String name; @@ -73,6 +82,15 @@ public class TransferConfig { this.name = name; } + /** + * Returns version number + * + * @return string version + */ + public String version() { + return name; + } + @Nullable static ProtocolVersion parse(@Nullable String name) { if (name == null) { @@ -177,7 +195,9 @@ public class TransferConfig { "uploadpack", "allowreachablesha1inwant", false); allowFilter = rc.getBoolean( "uploadpack", "allowfilter", false); - protocolVersion = ProtocolVersion.parse(rc.getString("protocol", null, "version")); + protocolVersion = ProtocolVersion.parse(rc + .getString(ConfigConstants.CONFIG_PROTOCOL_SECTION, null, + ConfigConstants.CONFIG_KEY_VERSION)); hideRefs = rc.getStringList("uploadpack", null, "hiderefs"); allowSidebandAll = rc.getBoolean( "uploadpack", "allowsidebandall", false); @@ -151,7 +151,7 @@ <maven.compiler.target>1.8</maven.compiler.target> <bundle-manifest>${project.build.directory}/META-INF/MANIFEST.MF</bundle-manifest> - <jgit-last-release-version>5.8.0.202006091008-r</jgit-last-release-version> + <jgit-last-release-version>5.9.0.202009080501-r</jgit-last-release-version> <apache-sshd-version>2.4.0</apache-sshd-version> <jsch-version>0.1.55</jsch-version> <jzlib-version>1.1.1</jzlib-version> @@ -299,7 +299,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> - <version>3.13.0</version> + <version>3.14.0</version> <configuration> <sourceEncoding>utf-8</sourceEncoding> <minimumTokens>100</minimumTokens> |