summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2021-11-24 17:49:02 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2021-11-24 17:49:02 +0100
commit751e3ad5d1f67018421d53e3ae03444ff6f5d840 (patch)
treedea7ca864cd25434de1370cad1ec5bfe30ee7291
parent6807661d39a43909c946e4dc1359db13dcf9d24a (diff)
parentfc60efff0d92b25c21be5fdbe84c17670ccb0288 (diff)
downloadjgit-751e3ad5d1f67018421d53e3ae03444ff6f5d840.tar.gz
jgit-751e3ad5d1f67018421d53e3ae03444ff6f5d840.zip
Merge branch 'master' into stable-6.0
* master: Add 4.22 target platform for 2021-12 Update Orbit to R20211122181901 for 2021-12 AppServer: fix keystore used to setup test SSL context factory [6.0 API cleanup] Public interface for PackLock [6.0 API cleanup] StoredObjectRepresentationNotAvailableException RepoCommand: Do not wrap GitApiExceptions in GitApiExceptions Set JSch global config values only if not set already Better git system config finding [6.0 API cleanup] CancelledException vs. CanceledException Javadoc fixes Better git system config finding HttpClientConnectionTest: organize imports Update Jetty to 10.0.6 Fix missing @since 6.0 tag Support commit.template config property DFS block cache: harden against race over ref locks. Change-Id: Id9814d92eb40b2ba63c5e753a86a4809826e7c81
-rw-r--r--WORKSPACE30
-rw-r--r--org.eclipse.jgit.ant.test/pom.xml4
-rw-r--r--org.eclipse.jgit.http.server/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.http.test/META-INF/MANIFEST.MF30
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java14
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF25
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java49
-rw-r--r--org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF30
-rw-r--r--org.eclipse.jgit.lfs.server.test/pom.xml4
-rw-r--r--org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF6
-rw-r--r--org.eclipse.jgit.lfs.test/pom.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml46
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target42
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target42
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target42
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target42
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target42
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target99
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20211122181901-2021-12.tpd (renamed from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20211108222137.tpd)6
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd20
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd22
-rw-r--r--org.eclipse.jgit.pgm.test/pom.xml4
-rw-r--r--org.eclipse.jgit.pgm/META-INF/MANIFEST.MF12
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java6
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java2
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java6
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java181
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java51
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java44
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java19
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLockImpl.java (renamed from org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLock.java)12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PackLock.java31
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java71
-rw-r--r--pom.xml2
63 files changed, 796 insertions, 404 deletions
diff --git a/WORKSPACE b/WORKSPACE
index ccd7315d4d..f78a159fb2 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -243,55 +243,55 @@ maven_jar(
sha1 = "431fc3cbc0ff81abdbfde070062741089c3ba874",
)
-JETTY_VER = "9.4.44.v20210927"
+JETTY_VER = "10.0.6"
maven_jar(
name = "jetty-servlet",
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
- sha1 = "1cb43a0d74b7395c7207dbf3dc2ca97eac89f5fd",
- src_sha1 = "2bbc54fc1835c963744a4e82ba2541e94fcbcf9b",
+ sha1 = "482165726bf54dd10ee7e2aeb4ae9481eee0c878",
+ src_sha1 = "8a8173a0bc6c0d215fc9fb9ba5fd50bae1690f9c",
)
maven_jar(
name = "jetty-security",
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
- sha1 = "ecb80b8e008daa46e95e5691b2611d4007922497",
- src_sha1 = "d67d4705a08d9b76592b3e177e2bb1aac968d832",
+ sha1 = "513f44ed9636ca5e0adefa0c0b81511065dfddd2",
+ src_sha1 = "2e7eb2edbf1592e15b338096651e379fea860859",
)
maven_jar(
name = "jetty-server",
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
- sha1 = "0bf2de0d31925a8ca71ad80f721236850b636e0d",
- src_sha1 = "3582cbf081cf3652f6507093585c2a0f3b8738bb",
+ sha1 = "125ee07e4d8182a6afca00d543f6a4dcc84f2678",
+ src_sha1 = "5c0789872ec6743ae893131ae81262aaefc87fe6",
)
maven_jar(
name = "jetty-http",
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
- sha1 = "37f0e30cdc02128e40d095ad63cb18e10ecb7726",
- src_sha1 = "7f1a6e3ab54e541f33b8ed100d553d4034d2e3a9",
+ sha1 = "4c8eed25d577002a6c0f9f3ef340eb581390f696",
+ src_sha1 = "ac7214d6202ee0cbc4bdbcf90c7906ca716e84e5",
)
maven_jar(
name = "jetty-io",
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
- sha1 = "a2ec01e2b5552b777a3d7085163f80756ef8c1ce",
- src_sha1 = "6262966b3cd10ff6b98f0bed428640bbbe4f7e79",
+ sha1 = "1ab82ae5dfdbb07f0ffa07f28274fdf30e3e96ee",
+ src_sha1 = "c59082f3a09c024fafc281f432b67432d398b8c0",
)
maven_jar(
name = "jetty-util",
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
- sha1 = "3c7151c5a04a93119988b48a1577a972d90f8990",
- src_sha1 = "f7f0420221772bc63ebae21571bb9925ca971a82",
+ sha1 = "4e2935749ea1c9fcabba61a857f8283c7f5f9885",
+ src_sha1 = "6baba651899c044e14ba37d43934950670d2aa4e",
)
maven_jar(
name = "jetty-util-ajax",
artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER,
- sha1 = "ed2f30e8eef939ab2825e607d83f82f85167e2c0",
- src_sha1 = "1a48ae7a45683d20afb90784d1db314be2c73c92",
+ sha1 = "a801d4b5f5e906f134713ae82fd1ea10a15902c6",
+ src_sha1 = "f35f5525a5d30dc1237b85457d758d578e3ce8d0",
)
BOUNCYCASTLE_VER = "1.69"
diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml
index effb8d4945..3e0b32bf45 100644
--- a/org.eclipse.jgit.ant.test/pom.xml
+++ b/org.eclipse.jgit.ant.test/pom.xml
@@ -27,6 +27,10 @@
JUnit tests for the various ant tasks.
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
index c7812e4fe8..f4a25ee8f4 100644
--- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
@@ -16,8 +16,8 @@ Export-Package: org.eclipse.jgit.http.server;version="6.0.0",
javax.servlet.http"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
- javax.servlet.http;version="[2.5.0,3.2.0)",
+Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
+ javax.servlet.http;version="[2.5.0,5.0.0)",
org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
org.eclipse.jgit.internal.storage.dfs;version="[6.0.0,6.1.0)",
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
index 70a846de20..662f37c35e 100644
--- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
@@ -7,27 +7,25 @@ Bundle-Version: 6.0.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
- javax.servlet.http;version="[2.5.0,3.2.0)",
+Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
+ javax.servlet.http;version="[2.5.0,5.0.0)",
org.apache.commons.codec;version="[1.6.0,2.0.0)",
org.apache.commons.codec.binary;version="[1.6.0,2.0.0)",
org.apache.http;version="[4.3.0,5.0.0)",
org.apache.http.client;version="[4.4.0,5.0.0)",
org.apache.http.message;version="[4.3.0,5.0.0)",
- org.eclipse.jetty.continuation;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.io;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
+ org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.io;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java
index 006a01e748..d38f7f3dda 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java
@@ -9,6 +9,13 @@
*/
package org.eclipse.jgit.transport.http.apache;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.net.MalformedURLException;
+import java.util.List;
+import java.util.Locale;
+
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolVersion;
@@ -16,13 +23,6 @@ import org.apache.http.StatusLine;
import org.apache.http.message.AbstractHttpMessage;
import org.junit.Test;
-import java.net.MalformedURLException;
-import java.util.List;
-import java.util.Locale;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
public class HttpClientConnectionTest {
@Test
public void testGetHeaderFieldsAllowMultipleValues()
diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
index e3e3222620..6be5cdd09e 100644
--- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
@@ -8,20 +8,19 @@ Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
- javax.servlet.http;version="[2.5.0,3.2.0)",
+Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
+ javax.servlet.http;version="[2.5.0,5.0.0)",
org.apache.commons.logging;version="[1.1.1,2.0.0)",
- org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.ssl;version="[9.4.5,10.0.0)",
+ org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.ssl;version="[10.0.0,11.0.0)",
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
index 0f052987e3..36f2f2bc7f 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
@@ -21,20 +21,23 @@ import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.security.AbstractLoginService;
import org.eclipse.jetty.security.Authenticator;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
+import org.eclipse.jetty.security.RolePrincipal;
+import org.eclipse.jetty.security.UserPrincipal;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
@@ -143,13 +146,15 @@ public class AppServer {
}
if (sslPort >= 0) {
- SslContextFactory sslContextFactory = createTestSslContextFactory(
- hostName);
+ SslContextFactory.Server sslContextFactory = createTestSslContextFactory(
+ hostName, ip);
secureConfig = new HttpConfiguration(config);
- secureConnector = new ServerConnector(server,
- new SslConnectionFactory(sslContextFactory,
- HttpVersion.HTTP_1_1.asString()),
- new HttpConnectionFactory(secureConfig));
+ secureConfig.addCustomizer(new SecureRequestCustomizer());
+ HttpConnectionFactory http11 = new HttpConnectionFactory(
+ secureConfig);
+ SslConnectionFactory tls = new SslConnectionFactory(
+ sslContextFactory, http11.getProtocol());
+ secureConnector = new ServerConnector(server, tls, http11);
secureConnector.setPort(sslPort);
secureConnector.setHost(ip);
} else {
@@ -171,10 +176,11 @@ public class AppServer {
server.setHandler(log);
}
- private SslContextFactory createTestSslContextFactory(String hostName) {
- SslContextFactory.Client factory = new SslContextFactory.Client(true);
+ private SslContextFactory.Server createTestSslContextFactory(
+ String hostName, String ip) {
+ SslContextFactory.Server factory = new SslContextFactory.Server();
- String dName = "CN=,OU=,O=,ST=,L=,C=";
+ String dName = "CN=localhost,OU=JGit,O=Eclipse,ST=Ontario,L=Toronto,C=CA";
try {
File tmpDir = Files.createTempDirectory("jks").toFile();
@@ -190,6 +196,11 @@ public class AppServer {
"-keystore", keyStore.getAbsolutePath(), //
"-storepass", keyPassword,
"-alias", hostName, //
+ "-ext", "bc=ca:true", //
+ "-ext",
+ String.format(
+ "san=ip:%s,ip:127.0.0.1,ip:[::1],DNS:%s",
+ ip, hostName), //
"-genkeypair", //
"-keyalg", "RSA", //
"-keypass", keyPassword, //
@@ -260,12 +271,12 @@ public class AppServer {
}
static class TestMappedLoginService extends AbstractLoginService {
- private String role;
+ private RolePrincipal role;
protected final Map<String, UserPrincipal> users = new ConcurrentHashMap<>();
TestMappedLoginService(String role) {
- this.role = role;
+ this.role = new RolePrincipal(role);
}
@Override
@@ -277,16 +288,16 @@ public class AppServer {
}
@Override
- protected String[] loadRoleInfo(UserPrincipal user) {
- if (users.get(user.getName()) == null) {
- return null;
- }
- return new String[] { role };
+ protected UserPrincipal loadUserInfo(String user) {
+ return users.get(user);
}
@Override
- protected UserPrincipal loadUserInfo(String user) {
- return users.get(user);
+ protected List<RolePrincipal> loadRoleInfo(UserPrincipal user) {
+ if (users.get(user.getName()) == null) {
+ return null;
+ }
+ return Collections.singletonList(role);
}
}
diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
index 95ac89b0b0..7a5227022c 100644
--- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
@@ -7,27 +7,25 @@ Bundle-Version: 6.0.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
- javax.servlet.http;version="[3.1.0,4.0.0)",
+Import-Package: javax.servlet;version="[3.1.0,5.0.0)",
+ javax.servlet.http;version="[3.1.0,5.0.0)",
org.apache.http;version="[4.4.0,5.0.0)",
org.apache.http.client;version="[4.4.0,5.0.0)",
org.apache.http.client.methods;version="[4.4.0,5.0.0)",
org.apache.http.entity;version="[4.4.0,5.0.0)",
org.apache.http.impl.client;version="[4.4.0,5.0.0)",
- org.eclipse.jetty.continuation;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.io;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
+ org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.io;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
diff --git a/org.eclipse.jgit.lfs.server.test/pom.xml b/org.eclipse.jgit.lfs.server.test/pom.xml
index 2c1b13429d..fea9da52f9 100644
--- a/org.eclipse.jgit.lfs.server.test/pom.xml
+++ b/org.eclipse.jgit.lfs.server.test/pom.xml
@@ -27,6 +27,10 @@
Tests for the LFS server.
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
index c5d8444260..e1f026acfa 100644
--- a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
@@ -20,9 +20,9 @@ Export-Package: org.eclipse.jgit.lfs.server;version="6.0.0";
org.eclipse.jgit.lfs.lib"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: com.google.gson;version="[2.8.0,3.0.0)",
- javax.servlet;version="[3.1.0,4.0.0)",
- javax.servlet.annotation;version="[3.1.0,4.0.0)",
- javax.servlet.http;version="[3.1.0,4.0.0)",
+ javax.servlet;version="[3.1.0,5.0.0)",
+ javax.servlet.annotation;version="[3.1.0,5.0.0)",
+ javax.servlet.http;version="[3.1.0,5.0.0)",
org.apache.http;version="[4.3.0,5.0.0)",
org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
org.eclipse.jgit.internal;version="[6.0.0,6.1.0)",
diff --git a/org.eclipse.jgit.lfs.test/pom.xml b/org.eclipse.jgit.lfs.test/pom.xml
index 262258c2dc..7c1ab5846d 100644
--- a/org.eclipse.jgit.lfs.test/pom.xml
+++ b/org.eclipse.jgit.lfs.test/pom.xml
@@ -27,6 +27,10 @@
Tests for the Large File Extension (LFS).
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
index a15d0fd76e..af9523fd4f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
@@ -75,10 +75,52 @@
<bundle id="javaewah.source">
<category name="JGit-dependency-bundles"/>
</bundle>
- <bundle id="javax.servlet">
+ <bundle id="jakarta.servlet-api">
<category name="JGit-dependency-bundles"/>
</bundle>
- <bundle id="javax.servlet.source">
+ <bundle id="jakarta.servlet-api.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.http">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.http.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.io">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.io.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.security">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.security.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.server">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.server.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.servlet">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.servlet.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.util">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.util.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.util.ajax">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.util.ajax.source">
<category name="JGit-dependency-bundles"/>
</bundle>
<bundle id="net.i2p.crypto.eddsa">
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 06090e6742..737cadaf90 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,28 +1,26 @@
<?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="1636551936">
+<target name="jgit-4.17" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
@@ -37,8 +35,6 @@
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
@@ -93,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/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 16527013b7..cd364d3563 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/S20211108222137.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-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.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
index 1d67922291..55cadffa88 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
@@ -1,28 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.18" sequenceNumber="1636551936">
+<target name="jgit-4.18" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
@@ -37,8 +35,6 @@
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
@@ -93,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/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.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
index e732ad6d17..27f3471c1a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
@@ -1,7 +1,7 @@
target "jgit-4.18" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/S20211108222137.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/releases/2020-12/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
index 8b96f5269d..43fe4c8417 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
@@ -1,28 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.19-staging" sequenceNumber="1636551936">
+<target name="jgit-4.19-staging" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
@@ -37,8 +35,6 @@
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
@@ -93,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/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.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
index 0e77c8872a..419999652d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
@@ -1,7 +1,7 @@
target "jgit-4.19-staging" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/S20211108222137.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/staging/2021-03/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
index a3aca8d794..aefa34122b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
@@ -1,28 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.20" sequenceNumber="1636551936">
+<target name="jgit-4.20" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
@@ -37,8 +35,6 @@
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
@@ -93,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/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.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
index 081864849d..37123e5fa5 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
@@ -1,7 +1,7 @@
target "jgit-4.20" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/S20211108222137.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/releases/2021-06/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
index 5f44987235..1b6cf26a5e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
@@ -1,28 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.21" sequenceNumber="1636551936">
+<target name="jgit-4.21" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
@@ -37,8 +35,6 @@
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
@@ -93,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/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.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
index 53848b2699..2949e50a2d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
@@ -1,7 +1,7 @@
target "jgit-4.21" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/S20211108222137.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/releases/2021-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
new file mode 100644
index 0000000000..7fd003277a
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
+<target name="jgit-4.22" sequenceNumber="1637746993">
+ <locations>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
+ </location>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
+ <unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
+ <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
+ <unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
+ <unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
+ <unit id="javaewah" version="1.1.13.v20211029-0839"/>
+ <unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
+ <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
+ <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
+ <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
+ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
+ <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
+ <unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
+ <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
+ <unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
+ <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.13.v20210128-2225"/>
+ <unit id="org.apache.httpcomponents.httpcore" version="4.4.14.v20210128-2225"/>
+ <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.14.v20210128-2225"/>
+ <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
+ <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
+ <unit id="org.apache.sshd.osgi" version="2.7.0.v20210623-0618"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.7.0.v20210623-0618"/>
+ <unit id="org.apache.sshd.sftp" version="2.7.0.v20210623-0618"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.7.0.v20210623-0618"/>
+ <unit id="org.assertj" version="3.20.2.v20210706-1104"/>
+ <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
+ <unit id="org.bouncycastle.bcpg" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
+ <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/>
+ <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
+ <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
+ <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
+ <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
+ <unit id="org.junit" version="4.13.2.v20211018-1956"/>
+ <unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
+ <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
+ <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
+ <unit id="org.mockito" version="2.23.0.v20200310-1642"/>
+ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/>
+ <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
+ <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
+ <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/>
+ <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/>
+ <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/>
+ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
+ <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
+ <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
+ </location>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="org.eclipse.osgi" version="0.0.0"/>
+ <repository location="https://download.eclipse.org/releases/2021-12/"/>
+ </location>
+ </locations>
+</target>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd
new file mode 100644
index 0000000000..db3db28773
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.22" with source configurePhase
+
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
+
+location "https://download.eclipse.org/releases/2021-12/" {
+ org.eclipse.osgi lazy
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20211108222137.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20211122181901-2021-12.tpd
index 0f0701099e..cd1d1c08fa 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20211108222137.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20211122181901-2021-12.tpd
@@ -1,7 +1,7 @@
-target "S20211108222137" with source configurePhase
+target "R20211122181901-2021-12" with source configurePhase
// see https://download.eclipse.org/tools/orbit/downloads/
-location "https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository" {
+location "https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository" {
com.google.gson [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
com.google.gson.source [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
@@ -14,8 +14,6 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/S202111082221
com.sun.jna.platform.source [5.8.0.v20210406-1004,5.8.0.v20210406-1004]
javaewah [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
javaewah.source [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
- javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800]
- javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800]
net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd
new file mode 100644
index 0000000000..6c3ee18332
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd
@@ -0,0 +1,20 @@
+target "jetty-10.0.x" with source configurePhase
+
+location jetty-10.0.x "https://download.eclipse.org/eclipse/jetty/10.0.6/" {
+ jakarta.servlet-api [4.0.0, 5.0.0)
+ jakarta.servlet-api.source [4.0.0, 5.0.0)
+ org.eclipse.jetty.http [10.0.6,10.0.6]
+ org.eclipse.jetty.http.source [10.0.6,10.0.6]
+ org.eclipse.jetty.io [10.0.6,10.0.6]
+ org.eclipse.jetty.io.source [10.0.6,10.0.6]
+ org.eclipse.jetty.security [10.0.6,10.0.6]
+ org.eclipse.jetty.security.source [10.0.6,10.0.6]
+ org.eclipse.jetty.server [10.0.6,10.0.6]
+ org.eclipse.jetty.server.source [10.0.6,10.0.6]
+ org.eclipse.jetty.servlet [10.0.6,10.0.6]
+ org.eclipse.jetty.servlet.source [10.0.6,10.0.6]
+ org.eclipse.jetty.util [10.0.6,10.0.6]
+ org.eclipse.jetty.util.source [10.0.6,10.0.6]
+ org.eclipse.jetty.util.ajax [10.0.6,10.0.6]
+ org.eclipse.jetty.util.ajax.source [10.0.6,10.0.6]
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd
deleted file mode 100644
index 8a143ce24e..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd
+++ /dev/null
@@ -1,22 +0,0 @@
-target "jetty-9.4.x" with source configurePhase
-
-location jetty-9.4.x "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/" {
- org.eclipse.jetty.client [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.client.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.continuation [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.continuation.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.http [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.http.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.io [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.io.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.security [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.security.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.server [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.server.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.servlet [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.servlet.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.util [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.util.source [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.util.ajax [9.4.44.v20210927,9.4.44.v20210927]
- org.eclipse.jetty.util.ajax.source [9.4.44.v20210927,9.4.44.v20210927]
-}
diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml
index 85f96c597f..83d5369363 100644
--- a/org.eclipse.jgit.pgm.test/pom.xml
+++ b/org.eclipse.jgit.pgm.test/pom.xml
@@ -27,6 +27,10 @@
Tests for command line client tools built on top of JGit.
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index 89ad6d1f3c..f46a3fae6a 100644
--- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
@@ -7,13 +7,13 @@ Bundle-Version: 6.0.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
+Import-Package: javax.servlet;version="[3.1.0,5.0.0)",
org.apache.commons.logging;version="[1.2,2.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
org.eclipse.jgit.archive;version="[6.0.0,6.1.0)",
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java
index f7b37d7816..e2dbb4c466 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java
@@ -71,9 +71,9 @@ public class JGitClientSession extends ClientSessionImpl {
/**
* Default setting for the maximum number of bytes to read in the initial
- * protocol version exchange. 64kb is what OpenSSH < 8.0 read; OpenSSH 8.0
- * changed it to 8Mb, but that seems excessive for the purpose stated in RFC
- * 4253. The Apache MINA sshd default in
+ * protocol version exchange. 64kb is what OpenSSH &lt; 8.0 read; OpenSSH
+ * 8.0 changed it to 8Mb, but that seems excessive for the purpose stated in
+ * RFC 4253. The Apache MINA sshd default in
* {@link org.apache.sshd.core.CoreModuleProperties#MAX_IDENTIFICATION_SIZE}
* is 16kb.
*/
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
index ae2b2b6acc..a8e33af35e 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
@@ -105,7 +105,7 @@ public abstract class AbstractClientProxyConnector
/**
* Obtains the timeout for the whole rest of the proxy connection protocol.
*
- * @return the timeout in milliseconds, always > 0L
+ * @return the timeout in milliseconds, always &gt; 0L
*/
protected long getTimeout() {
long last = lastProxyOperationTime;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java
index acc11cefb1..ed9fe37d5c 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java
@@ -31,7 +31,7 @@ public interface KeyPasswordProvider {
* identifying the key resource that is being attempted to be
* loaded
* @param attempt
- * the number of previous attempts to get a passphrase; >= 0
+ * the number of previous attempts to get a passphrase; &gt;= 0
* @return the passphrase
* @throws IOException
* if no password can be obtained
@@ -44,7 +44,7 @@ public interface KeyPasswordProvider {
*
* @param maxNumberOfAttempts
* number of times to ask for a passphrase;
- * {@link IllegalArgumentException} may be thrown if <= 0
+ * {@link IllegalArgumentException} may be thrown if &lt;= 0
*/
void setAttempts(int maxNumberOfAttempts);
@@ -53,7 +53,7 @@ public interface KeyPasswordProvider {
* attempted for one identity resource through this provider. The default
* return 1.
*
- * @return the number of times to ask for a passphrase; should be >= 1.
+ * @return the number of times to ask for a passphrase; should be &gt;= 1.
*/
default int getAttempts() {
return 1;
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
index 549e1f4696..4f1314057f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
@@ -10,6 +10,7 @@
package org.eclipse.jgit.internal.storage.dfs;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -20,11 +21,10 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.LongStream;
-
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
+
import org.eclipse.jgit.internal.storage.pack.PackExt;
import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.junit.TestRng;
@@ -42,10 +42,12 @@ public class DfsBlockCacheTest {
public TestName testName = new TestName();
private TestRng rng;
private DfsBlockCache cache;
+ private ExecutorService pool;
@Before
public void setUp() {
rng = new TestRng(testName.getMethodName());
+ pool = Executors.newFixedThreadPool(10);
resetCache();
}
@@ -152,49 +154,169 @@ public class DfsBlockCacheTest {
@SuppressWarnings("resource")
@Test
- public void noConcurrencySerializedReads() throws Exception {
- DfsRepositoryDescription repo = new DfsRepositoryDescription("test");
- InMemoryRepository r1 = new InMemoryRepository(repo);
- TestRepository<InMemoryRepository> repository = new TestRepository<>(
- r1);
- RevCommit commit = repository.branch("/refs/ref1").commit()
- .add("blob1", "blob1").create();
- repository.branch("/refs/ref2").commit().add("blob2", "blob2")
- .parent(commit).create();
-
- new DfsGarbageCollector(r1).pack(null);
+ public void noConcurrencySerializedReads_oneRepo() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test");
// Reset cache with concurrency Level at 1 i.e. no concurrency.
- DfsBlockCache.reconfigure(new DfsBlockCacheConfig().setBlockSize(512)
- .setBlockLimit(1 << 20).setConcurrencyLevel(1));
- cache = DfsBlockCache.getInstance();
+ resetCache(1);
DfsReader reader = (DfsReader) r1.newObjectReader();
- ExecutorService pool = Executors.newFixedThreadPool(10);
for (DfsPackFile pack : r1.getObjectDatabase().getPacks()) {
// Only load non-garbage pack with bitmap.
if (pack.isGarbage()) {
continue;
}
- asyncRun(pool, () -> pack.getBitmapIndex(reader));
- asyncRun(pool, () -> pack.getPackIndex(reader));
- asyncRun(pool, () -> pack.getBitmapIndex(reader));
+ asyncRun(() -> pack.getBitmapIndex(reader));
+ asyncRun(() -> pack.getPackIndex(reader));
+ asyncRun(() -> pack.getBitmapIndex(reader));
}
+ waitForExecutorPoolTermination();
+
+ assertEquals(1, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ assertEquals(1, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ // Reverse index has no pack extension, it defaults to 0.
+ assertEquals(1, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void noConcurrencySerializedReads_twoRepos() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test1");
+ InMemoryRepository r2 = createRepoWithBitmap("test2");
+ resetCache(1);
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
+ DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
+ // Safety check that both repos have the same number of packs.
+ assertEquals(r1Packs.length, r2Packs.length);
+
+ for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
+ DfsPackFile pack1 = r1Packs[i];
+ DfsPackFile pack2 = r2Packs[i];
+ if (pack1.isGarbage() || pack2.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack1.getBitmapIndex(reader));
+ asyncRun(() -> pack2.getBitmapIndex(reader));
+ }
+
+ waitForExecutorPoolTermination();
+ assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void lowConcurrencyParallelReads_twoRepos() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test1");
+ InMemoryRepository r2 = createRepoWithBitmap("test2");
+ resetCache(2);
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
+ DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
+ // Safety check that both repos have the same number of packs.
+ assertEquals(r1Packs.length, r2Packs.length);
+
+ for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
+ DfsPackFile pack1 = r1Packs[i];
+ DfsPackFile pack2 = r2Packs[i];
+ if (pack1.isGarbage() || pack2.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack1.getBitmapIndex(reader));
+ asyncRun(() -> pack2.getBitmapIndex(reader));
+ }
+
+ waitForExecutorPoolTermination();
+ assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void lowConcurrencyParallelReads_twoReposAndIndex()
+ throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test1");
+ InMemoryRepository r2 = createRepoWithBitmap("test2");
+ resetCache(2);
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
+ DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
+ // Safety check that both repos have the same number of packs.
+ assertEquals(r1Packs.length, r2Packs.length);
+
+ for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
+ DfsPackFile pack1 = r1Packs[i];
+ DfsPackFile pack2 = r2Packs[i];
+ if (pack1.isGarbage() || pack2.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack1.getBitmapIndex(reader));
+ asyncRun(() -> pack1.getPackIndex(reader));
+ asyncRun(() -> pack2.getBitmapIndex(reader));
+ }
+ waitForExecutorPoolTermination();
+
+ assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ // Index is loaded once for each repo.
+ assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void highConcurrencyParallelReads_oneRepo() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test");
+ resetCache();
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ for (DfsPackFile pack : r1.getObjectDatabase().getPacks()) {
+ // Only load non-garbage pack with bitmap.
+ if (pack.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack.getBitmapIndex(reader));
+ asyncRun(() -> pack.getPackIndex(reader));
+ asyncRun(() -> pack.getBitmapIndex(reader));
+ }
+ waitForExecutorPoolTermination();
- pool.shutdown();
- pool.awaitTermination(500, TimeUnit.MILLISECONDS);
- assertTrue("Threads did not complete, likely due to a deadlock.",
- pool.isTerminated());
assertEquals(1, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
assertEquals(1, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(1, cache.getMissCount()[0]);
}
private void resetCache() {
+ resetCache(32);
+ }
+
+ private void resetCache(int concurrencyLevel) {
DfsBlockCache.reconfigure(new DfsBlockCacheConfig().setBlockSize(512)
- .setBlockLimit(1 << 20));
+ .setConcurrencyLevel(concurrencyLevel).setBlockLimit(1 << 20));
cache = DfsBlockCache.getInstance();
}
- private void asyncRun(ExecutorService pool, Callable<?> call) {
+ private InMemoryRepository createRepoWithBitmap(String repoName)
+ throws Exception {
+ DfsRepositoryDescription repoDesc = new DfsRepositoryDescription(
+ repoName);
+ InMemoryRepository repo = new InMemoryRepository(repoDesc);
+ try (TestRepository<InMemoryRepository> repository = new TestRepository<>(
+ repo)) {
+ RevCommit commit = repository.branch("/refs/ref1" + repoName)
+ .commit().add("blob1", "blob1" + repoName).create();
+ repository.branch("/refs/ref2" + repoName).commit()
+ .add("blob2", "blob2" + repoName).parent(commit).create();
+ }
+ new DfsGarbageCollector(repo).pack(null);
+ return repo;
+ }
+
+ private void asyncRun(Callable<?> call) {
pool.execute(() -> {
try {
call.call();
@@ -203,4 +325,11 @@ public class DfsBlockCacheTest {
}
});
}
+
+ private void waitForExecutorPoolTermination() throws Exception {
+ pool.shutdown();
+ pool.awaitTermination(500, MILLISECONDS);
+ assertTrue("Threads did not complete, likely due to a deadlock.",
+ pool.isTerminated());
+ }
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
index fe3c1db502..9ee54d5b60 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.junit.JGitTestUtil;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.merge.MergeConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig;
+import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
@@ -1471,14 +1472,17 @@ public class ConfigTest {
// no values defined nowhere
Config config = new Config(null);
assertNull(config.get(CommitConfig.KEY).getCommitTemplatePath());
- assertNull(config.get(CommitConfig.KEY).getCommitTemplateContent());
+ assertNull(config.get(CommitConfig.KEY)
+ .getCommitTemplateContent(null));
}
@Test
public void testCommitTemplateConfig()
throws ConfigInvalidException, IOException {
+ File workTree = tmp.newFolder("dummy-worktree");
File tempFile = tmp.newFile("testCommitTemplate-");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
String expectedTemplatePath = tempFile.getPath();
@@ -1492,7 +1496,32 @@ public class ConfigTest {
.getCommitEncoding();
assertEquals(expectedTemplatePath, templatePath);
assertEquals(templateContent,
- config.get(CommitConfig.KEY).getCommitTemplateContent());
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
+ assertNull("no commitEncoding has been set so it must be null",
+ commitEncoding);
+ }
+
+ @Test
+ public void testCommitTemplateConfigRelativePath()
+ throws ConfigInvalidException, IOException {
+
+ File workTree = tmp.newFolder("dummy-worktree");
+ File tempFile = tmp.newFile("testCommitTemplate-");
+ String templateContent = "content of the template";
+ JGitTestUtil.write(tempFile, templateContent);
+ String expectedTemplatePath = "../" + tempFile.getName();
+
+ Config config = parse(
+ "[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
+
+ String templatePath = config.get(CommitConfig.KEY)
+ .getCommitTemplatePath();
+ String commitEncoding = config.get(CommitConfig.KEY)
+ .getCommitEncoding();
+ assertEquals(expectedTemplatePath, templatePath);
+ assertEquals(templateContent, config.get(CommitConfig.KEY)
+ .getCommitTemplateContent(
+ new RepositoryBuilder().setWorkTree(workTree).build()));
assertNull("no commitEncoding has been set so it must be null",
commitEncoding);
}
@@ -1501,6 +1530,8 @@ public class ConfigTest {
public void testCommitTemplateEncoding()
throws ConfigInvalidException, IOException {
Config config = new Config(null);
+ File workTree = tmp.newFolder("dummy-worktree");
+ Repository repo = FileRepositoryBuilder.create(workTree);
File tempFile = tmp.newFile("testCommitTemplate-");
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
@@ -1508,7 +1539,7 @@ public class ConfigTest {
config = parse("[i18n]\n\tcommitEncoding = utf-8\n"
+ "[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
assertEquals(templateContent,
- config.get(CommitConfig.KEY).getCommitTemplateContent());
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
String commitEncoding = config.get(CommitConfig.KEY)
.getCommitEncoding();
assertEquals("commitEncoding has been set to utf-8 it must be utf-8",
@@ -1520,6 +1551,8 @@ public class ConfigTest {
throws ConfigInvalidException, IOException {
Config config = new Config(null);
File tempFile = tmp.newFile("testCommitTemplate-");
+ File workTree = tmp.newFolder("dummy-worktree");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
// proper evaluation of the ~/ directory
@@ -1535,35 +1568,39 @@ public class ConfigTest {
.getCommitTemplatePath();
assertEquals(expectedTemplatePath, templatePath);
assertEquals(templateContent,
- config.get(CommitConfig.KEY).getCommitTemplateContent());
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
}
@Test(expected = ConfigInvalidException.class)
public void testCommitTemplateWithInvalidEncoding()
throws ConfigInvalidException, IOException {
Config config = new Config(null);
+ File workTree = tmp.newFolder("dummy-worktree");
File tempFile = tmp.newFile("testCommitTemplate-");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
config = parse("[i18n]\n\tcommitEncoding = invalidEcoding\n"
+ "[commit]\n\ttemplate = " + tempFile.getPath() + "\n");
- config.get(CommitConfig.KEY).getCommitTemplateContent();
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo);
}
@Test(expected = FileNotFoundException.class)
public void testCommitTemplateWithInvalidPath()
throws ConfigInvalidException, IOException {
Config config = new Config(null);
+ File workTree = tmp.newFolder("dummy-worktree");
File tempFile = tmp.newFile("testCommitTemplate-");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
// commit message encoding
- String expectedTemplatePath = "nonExistingTemplate";
+ String expectedTemplatePath = "/nonExistingTemplate";
config = parse("[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
String templatePath = config.get(CommitConfig.KEY)
.getCommitTemplatePath();
assertEquals(expectedTemplatePath, templatePath);
- config.get(CommitConfig.KEY).getCommitTemplateContent();
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo);
}
private static void assertValueRoundTrip(String value)
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 f4bbb4c9f8..1c5a521801 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
@@ -34,7 +34,6 @@ import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.storage.dfs.DfsGarbageCollector;
import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
-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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
index b69bb8f3ee..ca5370e912 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
@@ -71,12 +71,12 @@ class Candidate {
/**
* Score assigned to the rename to this candidate.
* <p>
- * Consider the history "A<-B<-C". If the result file S in C was renamed to
- * R in B, the rename score for this rename will be held in this field by
- * the candidate object for B. By storing the score with B, the application
- * can see what the rename score was as it makes the transition from C/S to
- * B/R. This may seem backwards since it was C that performed the rename,
- * but the application doesn't learn about path R until B.
+ * Consider the history "A&lt;-B&lt;-C". If the result file S in C was
+ * renamed to R in B, the rename score for this rename will be held in this
+ * field by the candidate object for B. By storing the score with B, the
+ * application can see what the rename score was as it makes the transition
+ * from C/S to B/R. This may seem backwards since it was C that performed
+ * the rename, but the application doesn't learn about path R until B.
*/
int renameScore;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java
index e226dbf3cc..2236eecbfe 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java
@@ -27,7 +27,7 @@ class Region {
/** First position in the {@link Candidate} that owns this Region. */
int sourceStart;
- /** Length of the region, always >= 1. */
+ /** Length of the region, always &gt;= 1. */
int length;
Region(int rs, int ss, int len) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
index ec21954aa2..49da95c9ab 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
@@ -29,12 +29,12 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.diff.DiffAlgorithm.SupportedAlgorithm;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.dircache.DirCacheIterator;
import org.eclipse.jgit.errors.AmbiguousObjectException;
import org.eclipse.jgit.errors.BinaryBlobException;
-import org.eclipse.jgit.errors.CancelledException;
import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
@@ -578,7 +578,7 @@ public class DiffFormatter implements AutoCloseable {
renameDetector.addAll(files);
try {
return renameDetector.compute(reader, progressMonitor);
- } catch (CancelledException e) {
+ } catch (CanceledException e) {
// TODO: consider propagating once bug 536323 is tackled
// (making DiffEntry.scan() and DiffFormatter.scan() and
// format() cancellable).
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
index 225921ecc1..c33f53adde 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
@@ -23,9 +23,9 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
+import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
-import org.eclipse.jgit.errors.CancelledException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.AbbreviatedObjectId;
import org.eclipse.jgit.lib.FileMode;
@@ -336,6 +336,7 @@ public class RenameDetector {
* Detect renames in the current file set.
* <p>
* This convenience function runs without a progress monitor.
+ * </p>
*
* @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s
* representing all files that have been changed.
@@ -343,7 +344,12 @@ public class RenameDetector {
* file contents cannot be read from the repository.
*/
public List<DiffEntry> compute() throws IOException {
- return compute(NullProgressMonitor.INSTANCE);
+ try {
+ return compute(NullProgressMonitor.INSTANCE);
+ } catch (CanceledException e) {
+ // Won't happen with a NullProgressMonitor
+ return Collections.emptyList();
+ }
}
/**
@@ -355,13 +361,11 @@ public class RenameDetector {
* representing all files that have been changed.
* @throws java.io.IOException
* file contents cannot be read from the repository.
- * @throws CancelledException
+ * @throws CanceledException
* if rename detection was cancelled
*/
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
- // version
public List<DiffEntry> compute(ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
if (!done) {
try {
return compute(objectReader, pm);
@@ -383,13 +387,11 @@ public class RenameDetector {
* representing all files that have been changed.
* @throws java.io.IOException
* file contents cannot be read from the repository.
- * @throws CancelledException
+ * @throws CanceledException
* if rename detection was cancelled
*/
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
- // version
public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
final ContentSource cs = ContentSource.create(reader);
return compute(new ContentSource.Pair(cs, cs), pm);
}
@@ -405,13 +407,11 @@ public class RenameDetector {
* representing all files that have been changed.
* @throws java.io.IOException
* file contents cannot be read from the repository.
- * @throws CancelledException
+ * @throws CanceledException
* if rename detection was cancelled
*/
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
- // version
public List<DiffEntry> compute(ContentSource.Pair reader, ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
if (!done) {
done = true;
@@ -451,15 +451,15 @@ public class RenameDetector {
done = false;
}
- private void advanceOrCancel(ProgressMonitor pm) throws CancelledException {
+ private void advanceOrCancel(ProgressMonitor pm) throws CanceledException {
if (pm.isCancelled()) {
- throw new CancelledException(JGitText.get().renameCancelled);
+ throw new CanceledException(JGitText.get().renameCancelled);
}
pm.update(1);
}
private void breakModifies(ContentSource.Pair reader, ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
ArrayList<DiffEntry> newEntries = new ArrayList<>(entries.size());
pm.beginTask(JGitText.get().renamesBreakingModifies, entries.size());
@@ -486,7 +486,7 @@ public class RenameDetector {
entries = newEntries;
}
- private void rejoinModifies(ProgressMonitor pm) throws CancelledException {
+ private void rejoinModifies(ProgressMonitor pm) throws CanceledException {
HashMap<String, DiffEntry> nameMap = new HashMap<>();
ArrayList<DiffEntry> newAdded = new ArrayList<>(added.size());
@@ -541,7 +541,7 @@ public class RenameDetector {
private void findContentRenames(ContentSource.Pair reader,
ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
int cnt = Math.max(added.size(), deleted.size());
if (getRenameLimit() == 0 || cnt <= getRenameLimit()) {
SimilarityRenameDetector d;
@@ -562,7 +562,7 @@ public class RenameDetector {
@SuppressWarnings("unchecked")
private void findExactRenames(ProgressMonitor pm)
- throws CancelledException {
+ throws CanceledException {
pm.beginTask(JGitText.get().renamesFindingExact, //
added.size() + added.size() + deleted.size()
+ added.size() * deleted.size());
@@ -651,7 +651,7 @@ public class RenameDetector {
matrix[mNext] = SimilarityRenameDetector.encode(score, delIdx, addIdx);
mNext++;
if (pm.isCancelled()) {
- throw new CancelledException(
+ throw new CanceledException(
JGitText.get().renameCancelled);
}
}
@@ -744,7 +744,7 @@ public class RenameDetector {
@SuppressWarnings("unchecked")
private HashMap<AbbreviatedObjectId, Object> populateMap(
List<DiffEntry> diffEntries, ProgressMonitor pm)
- throws CancelledException {
+ throws CanceledException {
HashMap<AbbreviatedObjectId, Object> map = new HashMap<>();
for (DiffEntry de : diffEntries) {
Object old = map.put(id(de), de);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
index 5871b4aeea..9ac94895b1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
@@ -20,9 +20,9 @@ import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
+import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
-import org.eclipse.jgit.errors.CancelledException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.NullProgressMonitor;
@@ -115,7 +115,7 @@ class SimilarityRenameDetector {
skipBinaryFiles = value;
}
- void compute(ProgressMonitor pm) throws IOException, CancelledException {
+ void compute(ProgressMonitor pm) throws IOException, CanceledException {
if (pm == null)
pm = NullProgressMonitor.INSTANCE;
@@ -130,9 +130,7 @@ class SimilarityRenameDetector {
//
for (--mNext; mNext >= 0; mNext--) {
if (pm.isCancelled()) {
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException
- // in next major version
- throw new CancelledException(JGitText.get().renameCancelled);
+ throw new CanceledException(JGitText.get().renameCancelled);
}
long ent = matrix[mNext];
int sIdx = srcFile(ent);
@@ -202,7 +200,7 @@ class SimilarityRenameDetector {
}
private int buildMatrix(ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
// Allocate for the worst-case scenario where every pair has a
// score that we need to consider. We might not need that many.
//
@@ -228,10 +226,7 @@ class SimilarityRenameDetector {
for (int dstIdx = 0; dstIdx < dsts.size(); dstIdx++) {
if (pm.isCancelled()) {
- // TODO(ms): use
- // org.eclipse.jgit.api.errors.CanceledException in next
- // major version
- throw new CancelledException(
+ throw new CanceledException(
JGitText.get().renameCancelled);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
index 07162db4ce..e0c1e93918 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
@@ -280,12 +280,12 @@ public class DirCacheTree {
* number of bytes of <code>cache[cacheIdx].path</code> that
* matches this tree's path. The value at array position
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
- * <code>pathOff</code> is > 0.
+ * <code>pathOff</code> is &gt; 0.
* @param ow
* the writer to use when serializing to the store.
* @return identity of this tree.
* @throws UnmergedPathException
- * one or more paths contain higher-order stages (stage > 0),
+ * one or more paths contain higher-order stages (stage &gt; 0),
* which cannot be stored in a tree object.
* @throws IOException
* an unexpected error occurred writing to the object store.
@@ -401,7 +401,7 @@ public class DirCacheTree {
* number of bytes of <code>cache[cacheIdx].path</code> that
* matches this tree's path. The value at array position
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
- * <code>pathOff</code> is > 0.
+ * <code>pathOff</code> is &gt; 0.
*/
void validate(final DirCacheEntry[] cache, final int cCnt, int cIdx,
final int pathOff) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
index 0708123e91..de210b01c4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, Google Inc. and others
+ * Copyright (C) 2010, 2021 Google Inc. 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
@@ -7,29 +7,23 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-
package org.eclipse.jgit.errors;
-import org.eclipse.jgit.internal.storage.pack.ObjectToPack;
-
/**
* A previously selected representation is no longer available.
*/
-public class StoredObjectRepresentationNotAvailableException extends Exception { //TODO remove unused ObjectToPack in 5.0
+public class StoredObjectRepresentationNotAvailableException extends Exception {
+
private static final long serialVersionUID = 1L;
/**
- * Construct an error for an object.
+ * Creates a new instance.
*
- * @param otp
- * the object whose current representation is no longer present.
* @param cause
- * cause
- * @since 4.10
+ * {@link Throwable} that caused this exception
+ * @since 6.0
*/
- public StoredObjectRepresentationNotAvailableException(ObjectToPack otp,
- Throwable cause) {
+ public StoredObjectRepresentationNotAvailableException(Throwable cause) {
super(cause);
- // Do nothing.
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
index 095927f3cd..e0a822479f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -578,10 +578,10 @@ public class RepoCommand extends GitCommand<RevCommit> {
DirCache index = DirCache.newInCore();
ObjectInserter inserter = repo.newObjectInserter();
+
try (RevWalk rw = new RevWalk(repo)) {
prepareIndex(renamedProjects, index, inserter);
ObjectId treeId = index.writeTree(inserter);
-
long prevDelay = 0;
for (int i = 0; i < LOCK_FAILURE_MAX_RETRIES - 1; i++) {
try {
@@ -597,7 +597,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
}
// In the last try, just propagate the exceptions
return commitTreeOnCurrentTip(inserter, rw, treeId);
- } catch (GitAPIException | IOException | InterruptedException e) {
+ } catch (IOException | InterruptedException e) {
throw new ManifestErrorException(e);
}
}
@@ -609,12 +609,11 @@ public class RepoCommand extends GitCommand<RevCommit> {
}
return git.commit().setMessage(RepoText.get().repoCommitMessage)
.call();
- } catch (GitAPIException | IOException e) {
+ } catch (IOException e) {
throw new ManifestErrorException(e);
}
}
-
private void prepareIndex(List<RepoProject> projects, DirCache index,
ObjectInserter inserter) throws IOException, GitAPIException {
Config cfg = new Config();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
index e87bfe24e6..54c527c03c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
@@ -104,9 +104,10 @@ public final class DfsBlockCache {
private final ReentrantLock[] loadLocks;
/**
- * A separate pool of locks to prevent concurrent loads for same index or bitmap from PackFile.
+ * A separate pool of locks per pack extension to prevent concurrent loads
+ * for same index or bitmap from PackFile.
*/
- private final ReentrantLock[] refLocks;
+ private final ReentrantLock[][] refLocks;
/** Maximum number of bytes the cache should hold. */
private final long maxBytes;
@@ -173,13 +174,16 @@ public final class DfsBlockCache {
}
table = new AtomicReferenceArray<>(tableSize);
- loadLocks = new ReentrantLock[cfg.getConcurrencyLevel()];
+ int concurrencyLevel = cfg.getConcurrencyLevel();
+ loadLocks = new ReentrantLock[concurrencyLevel];
for (int i = 0; i < loadLocks.length; i++) {
loadLocks[i] = new ReentrantLock(true /* fair */);
}
- refLocks = new ReentrantLock[cfg.getConcurrencyLevel()];
- for (int i = 0; i < refLocks.length; i++) {
- refLocks[i] = new ReentrantLock(true /* fair */);
+ refLocks = new ReentrantLock[PackExt.values().length][concurrencyLevel];
+ for (int i = 0; i < PackExt.values().length; i++) {
+ for (int j = 0; j < concurrencyLevel; ++j) {
+ refLocks[i][j] = new ReentrantLock(true /* fair */);
+ }
}
maxBytes = cfg.getBlockLimit();
@@ -636,7 +640,8 @@ public final class DfsBlockCache {
}
private ReentrantLock lockForRef(DfsStreamKey key) {
- return refLocks[(key.hash >>> 1) % refLocks.length];
+ int slot = (key.hash >>> 1) % refLocks[key.packExtPos].length;
+ return refLocks[key.packExtPos][slot];
}
private static AtomicLong[] newCounters() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
index b5bf03fcbb..bb76df1d5d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
@@ -415,8 +415,7 @@ public final class DfsPackFile extends BlockBasedFile {
try {
readFully(src.offset, buf, 0, 20, ctx);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
int c = buf[0] & 0xff;
final int typeCode = (c >> 4) & 7;
@@ -537,12 +536,11 @@ public final class DfsPackFile extends BlockBasedFile {
Long.valueOf(src.offset), getFileName()),
dataFormat);
- throw new StoredObjectRepresentationNotAvailableException(src,
+ throw new StoredObjectRepresentationNotAvailableException(
corruptObject);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
if (quickCopy != null) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
index 29d11104d4..d8e191c4e0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
@@ -23,10 +23,10 @@ import java.util.zip.CRC32;
import java.util.zip.Deflater;
import org.eclipse.jgit.internal.storage.file.PackIndex;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.transport.PackLock;
import org.eclipse.jgit.transport.PackParser;
import org.eclipse.jgit.transport.PackedObjectInfo;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 40c075ec5e..93c6201597 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -1530,7 +1530,8 @@ public class GC {
}
/**
- * @return {@code true} if number of packs > gc.autopacklimit (default 50)
+ * @return {@code true} if number of packs &gt; gc.autopacklimit (default
+ * 50)
*/
boolean tooManyPacks() {
int autopacklimit = repo.getConfig().getInt(
@@ -1549,7 +1550,8 @@ public class GC {
* Quickly estimate number of loose objects, SHA1 is distributed evenly so
* counting objects in one directory (bucket 17) is sufficient
*
- * @return {@code true} if number of loose objects > gc.auto (default 6700)
+ * @return {@code true} if number of loose objects &gt; gc.auto (default
+ * 6700)
*/
boolean tooManyLooseObjects() {
int auto = getLooseObjectLimit();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java
index dba8ccd99b..1c23ff20c7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java
@@ -34,6 +34,7 @@ import org.eclipse.jgit.lib.CoreConfig;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ProgressMonitor;
import org.eclipse.jgit.storage.pack.PackConfig;
+import org.eclipse.jgit.transport.PackLock;
import org.eclipse.jgit.transport.PackParser;
import org.eclipse.jgit.transport.PackedObjectInfo;
import org.eclipse.jgit.util.FileUtils;
@@ -431,7 +432,7 @@ public class ObjectDirectoryPackParser extends PackParser {
File packDir = new File(db.getDirectory(), "pack"); //$NON-NLS-1$
PackFile finalPack = new PackFile(packDir, id, PackExt.PACK);
PackFile finalIdx = finalPack.create(PackExt.INDEX);
- final PackLock keep = new PackLock(finalPack, db.getFS());
+ final PackLockImpl keep = new PackLockImpl(finalPack, db.getFS());
if (!packDir.exists() && !packDir.mkdir() && !packDir.exists()) {
// The objects/pack directory isn't present, and we are unable
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
index 5efd4c5bfc..289c732f4e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
@@ -521,12 +521,11 @@ public class Pack implements Iterable<PackIndex.MutableEntry> {
Long.valueOf(src.offset), getPackFile()),
dataFormat);
- throw new StoredObjectRepresentationNotAvailableException(src,
+ throw new StoredObjectRepresentationNotAvailableException(
corruptObject);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
if (quickCopy != null) {
@@ -611,7 +610,7 @@ public class Pack implements Iterable<PackIndex.MutableEntry> {
try {
doOpen();
} catch (IOException thisPackNotValid) {
- throw new StoredObjectRepresentationNotAvailableException(otp,
+ throw new StoredObjectRepresentationNotAvailableException(
thisPackNotValid);
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLock.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLockImpl.java
index 482b143e33..7cc5f50549 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLock.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLockImpl.java
@@ -14,6 +14,7 @@ import java.io.File;
import java.io.IOException;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.transport.PackLock;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils;
@@ -21,7 +22,7 @@ import org.eclipse.jgit.util.FileUtils;
* Keeps track of a {@link org.eclipse.jgit.internal.storage.file.Pack}'s
* associated <code>.keep</code> file.
*/
-public class PackLock {
+public class PackLockImpl implements PackLock {
private final File keepFile;
/**
@@ -32,7 +33,7 @@ public class PackLock {
* @param fs
* the filesystem abstraction used by the repository.
*/
- public PackLock(File packFile, FS fs) {
+ public PackLockImpl(File packFile, FS fs) {
final File p = packFile.getParentFile();
final String n = packFile.getName();
keepFile = new File(p, n.substring(0, n.length() - 5) + ".keep"); //$NON-NLS-1$
@@ -59,12 +60,7 @@ public class PackLock {
return lf.commit();
}
- /**
- * Remove the <code>.keep</code> file that holds this pack in place.
- *
- * @throws java.io.IOException
- * if deletion of .keep file failed
- */
+ @Override
public void unlock() throws IOException {
FileUtils.delete(keepFile);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
index 2dbb7859b9..648d4a1821 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
@@ -142,7 +142,7 @@ public class OpenSshConfigFile implements SshConfigStore {
* real host name, or it may just be a "Host" block in the
* configuration file.
* @param port
- * the user supplied; <= 0 if none
+ * the user supplied; &lt;= 0 if none
* @param userName
* the user supplied, may be {@code null} or empty if none given
* @return the configuration for the requested name.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java
index e4e7cd6e03..22e1f98181 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java
@@ -18,6 +18,8 @@ import java.nio.charset.IllegalCharsetNameException;
import java.nio.charset.StandardCharsets;
import java.nio.charset.UnsupportedCharsetException;
import java.text.MessageFormat;
+
+import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.internal.JGitText;
@@ -77,6 +79,9 @@ public class CommitConfig {
* {@code commit.template}. If no {@code i18n.commitEncoding} is specified,
* UTF-8 fallback is used.
*
+ * @param repository
+ * to resolve relative path in local git repo config
+ *
* @return content of the commit template or {@code null} if not present.
* @throws IOException
* if the template file can not be read
@@ -84,9 +89,10 @@ public class CommitConfig {
* if the template file does not exists
* @throws ConfigInvalidException
* if a {@code commitEncoding} is specified and is invalid
+ * @since 6.0
*/
@Nullable
- public String getCommitTemplateContent()
+ public String getCommitTemplateContent(@NonNull Repository repository)
throws FileNotFoundException, IOException, ConfigInvalidException {
if (commitTemplatePath == null) {
@@ -94,11 +100,17 @@ public class CommitConfig {
}
File commitTemplateFile;
+ FS fileSystem = repository.getFS();
if (commitTemplatePath.startsWith("~/")) { //$NON-NLS-1$
- commitTemplateFile = FS.DETECTED.resolve(FS.DETECTED.userHome(),
+ commitTemplateFile = fileSystem.resolve(fileSystem.userHome(),
commitTemplatePath.substring(2));
} else {
- commitTemplateFile = FS.DETECTED.resolve(null, commitTemplatePath);
+ commitTemplateFile = fileSystem.resolve(null, commitTemplatePath);
+ }
+ if (!commitTemplateFile.isAbsolute()) {
+ commitTemplateFile = fileSystem.resolve(
+ repository.getWorkTree().getAbsoluteFile(),
+ commitTemplatePath);
}
Charset commitMessageEncoding = getEncoding();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
index d344deac26..f48e1e68cc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
@@ -28,7 +28,6 @@ import org.eclipse.jgit.errors.PackProtocolException;
import org.eclipse.jgit.errors.RemoteRepositoryException;
import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.JGitText;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.MutableObjectId;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
index 47d156b667..f04e573feb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
@@ -35,7 +35,6 @@ import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.errors.PackProtocolException;
import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.JGitText;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.lib.NullProgressMonitor;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectIdRef;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java
index d06ef65c76..9dc0620665 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java
@@ -18,7 +18,6 @@ import java.util.Collection;
import java.util.Set;
import org.eclipse.jgit.errors.TransportException;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ProgressMonitor;
import org.eclipse.jgit.lib.Ref;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
index 34bad6e029..7d7b3ee0a0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
@@ -37,7 +37,6 @@ import org.eclipse.jgit.errors.NotSupportedException;
import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.internal.storage.file.LockFile;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.lib.BatchRefUpdate;
import org.eclipse.jgit.lib.BatchingProgressMonitor;
import org.eclipse.jgit.lib.Constants;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackLock.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackLock.java
new file mode 100644
index 0000000000..bf2140759f
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackLock.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> 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 java.io.IOException;
+
+/**
+ * A {@code PackLock} describes a {@code .keep} file that holds a pack in place.
+ * If {@link PackParser#parse(org.eclipse.jgit.lib.ProgressMonitor)} creates
+ * such a pack lock, it returns the lock so that it can be unlocked once the
+ * pack doesn't need a {@code .keep} file anymore.
+ *
+ * @since 6.0
+ */
+public interface PackLock {
+
+ /**
+ * Remove the {@code .keep} file that holds a pack in place.
+ *
+ * @throws java.io.IOException
+ * if deletion of the {@code .keep} file failed
+ */
+ void unlock() throws IOException;
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
index 715cbb48fb..e43ea0261e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
@@ -29,7 +29,6 @@ import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.errors.TooLargeObjectInPackException;
import org.eclipse.jgit.internal.JGitText;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.internal.storage.pack.BinaryDelta;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.BatchingProgressMonitor;
@@ -490,7 +489,7 @@ public abstract class PackParser {
* {@link #setLockMessage(String)}.
* @throws java.io.IOException
* the stream is malformed, or contains corrupt objects.
- * @since 3.0
+ * @since 6.0
*/
public final PackLock parse(ProgressMonitor progress) throws IOException {
return parse(progress, progress);
@@ -509,7 +508,7 @@ public abstract class PackParser {
* {@link #setLockMessage(String)}.
* @throws java.io.IOException
* the stream is malformed, or contains corrupt objects.
- * @since 3.0
+ * @since 6.0
*/
public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving)
throws IOException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
index 58f8895e00..871ba50a6c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -48,7 +48,6 @@ import org.eclipse.jgit.errors.PackProtocolException;
import org.eclipse.jgit.errors.TooLargePackException;
import org.eclipse.jgit.errors.UnpackException;
import org.eclipse.jgit.internal.JGitText;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.internal.submodule.SubmoduleValidator;
import org.eclipse.jgit.internal.submodule.SubmoduleValidator.SubmoduleValidationException;
import org.eclipse.jgit.internal.transport.connectivity.FullConnectivityChecker;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java
index d98bd2307f..1226a6b5ea 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java
@@ -28,7 +28,7 @@ public interface SshConfigStore {
* @param hostName
* to look up
* @param port
- * the user supplied; <= 0 if none
+ * the user supplied; &lt;= 0 if none
* @param userName
* the user supplied, may be {@code null} or empty if none given
* @return the configuration for the requested name.
@@ -68,7 +68,7 @@ public interface SshConfigStore {
* @param hostName
* host name to look up
* @param port
- * port number; <= 0 if none
+ * port number; &lt;= 0 if none
* @param userName
* the user name, may be {@code null} or empty if none given
* @return the configuration for the requested name.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
index a6b20451dd..d67fe074e4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
@@ -32,7 +32,6 @@ import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.internal.storage.file.ObjectDirectory;
import org.eclipse.jgit.internal.storage.file.PackIndex;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.internal.storage.file.UnpackedObject;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Constants;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index dd656e5f2b..d0007ec219 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -59,6 +59,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.annotations.Nullable;
@@ -94,6 +96,9 @@ public abstract class FS {
*/
protected static final Entry[] NO_ENTRIES = {};
+ private static final Pattern VERSION = Pattern
+ .compile("\\s(\\d+)\\.(\\d+)\\.(\\d+)"); //$NON-NLS-1$
+
private volatile Boolean supportSymlinks;
/**
@@ -1516,26 +1521,76 @@ public abstract class FS {
return null;
}
- // Trick Git into printing the path to the config file by using "echo"
- // as the editor.
- Map<String, String> env = new HashMap<>();
- env.put("GIT_EDITOR", "echo"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (parseVersion(v) < makeVersion(2, 8, 0)) {
+ // --show-origin was introduced in git 2.8.0. For older git: trick
+ // it into printing the path to the config file by using "echo" as
+ // the editor.
+ Map<String, String> env = new HashMap<>();
+ env.put("GIT_EDITOR", "echo"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ String w;
+ try {
+ w = readPipe(gitExe.getParentFile(),
+ new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
+ "--edit" }, //$NON-NLS-1$
+ SystemReader.getInstance().getDefaultCharset().name(),
+ env);
+ } catch (CommandFailedException e) {
+ LOG.warn(e.getMessage());
+ return null;
+ }
+ if (StringUtils.isEmptyOrNull(w)) {
+ return null;
+ }
+ return new File(w);
+ }
String w;
try {
w = readPipe(gitExe.getParentFile(),
new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
- "--edit" }, //$NON-NLS-1$
- SystemReader.getInstance().getDefaultCharset().name(), env);
+ "--show-origin", "--list", "-z" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SystemReader.getInstance().getDefaultCharset().name());
} catch (CommandFailedException e) {
LOG.warn(e.getMessage());
return null;
}
- if (StringUtils.isEmptyOrNull(w)) {
+ if (w == null) {
return null;
}
+ // We get NUL-terminated items; the first one will be a file name,
+ // prefixed by "file:". (Using -z is crucial, otherwise git quotes file
+ // names with special characters.)
+ int nul = w.indexOf(0);
+ if (nul <= 0) {
+ return null;
+ }
+ w = w.substring(0, nul);
+ int colon = w.indexOf(':');
+ if (colon < 0) {
+ return null;
+ }
+ w = w.substring(colon + 1);
+ return w.isEmpty() ? null : new File(w);
+ }
+
+ private long parseVersion(String version) {
+ Matcher m = VERSION.matcher(version);
+ if (m.find()) {
+ try {
+ return makeVersion(
+ Integer.parseInt(m.group(1)),
+ Integer.parseInt(m.group(2)),
+ Integer.parseInt(m.group(3)));
+ } catch (NumberFormatException e) {
+ // Ignore
+ }
+ }
+ return -1;
+ }
- return new File(w);
+ private long makeVersion(int major, int minor, int patch) {
+ return ((major * 10_000L) + minor) * 10_000L + patch;
}
/**
diff --git a/pom.xml b/pom.xml
index f7629411b6..f5b66d13ca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,7 +162,7 @@
<commons-compress-version>1.21</commons-compress-version>
<osgi-core-version>4.3.1</osgi-core-version>
<servlet-api-version>3.1.0</servlet-api-version>
- <jetty-version>9.4.44.v20210927</jetty-version>
+ <jetty-version>10.0.6</jetty-version>
<japicmp-version>0.15.3</japicmp-version>
<httpclient-version>4.5.13</httpclient-version>
<httpcore-version>4.4.14</httpcore-version>