From f30e48914e72efe2ac0d28140e07aa8d647de4f8 Mon Sep 17 00:00:00 2001
From: Nail Samatov
Date: Thu, 7 May 2020 12:03:56 +0300
Subject: [PATCH 01/55] Fix error occurring during checkout
Fix NullPointerException occurring when calling
CheckoutCommand with forced == true option when
the branch isn't changed and there is deleted
uncommitted file.
Change-Id: I99bf1fc25e6889f07092320d7bc2772ec5d341b5
Signed-off-by: Nail Samatov
---
.../eclipse/jgit/api/CheckoutCommandTest.java | 22 +++++++++++++++++++
.../jgit/dircache/DirCacheCheckout.java | 2 +-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
index b0355b2b6..0a0a88c83 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
@@ -124,6 +124,28 @@ public class CheckoutCommandTest extends RepositoryTestCase {
.setForced(true).call().getObjectId());
}
+ @Test
+ public void testCheckoutForced_deleteFileAndRestore() throws Exception {
+ File testFile = new File(db.getWorkTree(), "Test.txt");
+ assertTrue(testFile.exists());
+
+ assertEquals("test", git.getRepository().getBranch());
+ FileUtils.delete(testFile);
+ assertFalse(testFile.exists());
+ // Switch from "test" to "master".
+ assertEquals(initialCommit.getId(), git.checkout().setName("master")
+ .setForced(true).call().getObjectId());
+ assertTrue(testFile.exists());
+
+ assertEquals("master", git.getRepository().getBranch());
+ FileUtils.delete(testFile);
+ assertFalse(testFile.exists());
+ // Stay in current branch.
+ assertEquals(initialCommit.getId(), git.checkout().setName("master")
+ .setForced(true).call().getObjectId());
+ assertTrue(testFile.exists());
+ }
+
@Test
public void testCreateBranchOnCheckout() throws Exception {
git.checkout().setCreateBranch(true).setName("test2").call();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index e8e198430..8c51a7ac2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -1217,7 +1217,7 @@ public class DirCacheCheckout {
if (e != null && !FileMode.TREE.equals(e.getFileMode()))
builder.add(e);
if (force) {
- if (f.isModified(e, true, walk.getObjectReader())) {
+ if (f == null || f.isModified(e, true, walk.getObjectReader())) {
kept.add(path);
checkoutEntry(repo, e, walk.getObjectReader(), false,
new CheckoutMetadata(walk.getEolStreamType(CHECKOUT_OP),
From 519cb1e91b06fbc82b7e87431ac7485bf3c9d91b Mon Sep 17 00:00:00 2001
From: Demetr Starshov
Date: Wed, 6 May 2020 17:36:34 -0700
Subject: [PATCH 02/55] Moving transport/internal -> internal/transport
Moving transport related internal classes into dedicated subpackage in
o/e/j/internal package.
Signed-off-by: Demetr Starshov
Change-Id: I21ed029d359f5f7d8298f102efbb4b1dcdf404ad
---
org.eclipse.jgit/META-INF/MANIFEST.MF | 1 +
.../transport/connectivity}/FullConnectivityChecker.java | 2 +-
.../transport/http}/DelegatingSSLSocketFactory.java | 2 +-
.../src/org/eclipse/jgit/transport/ReceivePack.java | 2 +-
.../src/org/eclipse/jgit/transport/http/JDKHttpConnection.java | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
rename org.eclipse.jgit/src/org/eclipse/jgit/{transport/internal => internal/transport/connectivity}/FullConnectivityChecker.java (99%)
rename org.eclipse.jgit/src/org/eclipse/jgit/{transport/internal => internal/transport/http}/DelegatingSSLSocketFactory.java (98%)
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index 2cb8ce21f..5fb76f503 100644
--- a/org.eclipse.jgit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/MANIFEST.MF
@@ -86,6 +86,7 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.pgm",
org.eclipse.jgit.internal.storage.reftree;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
org.eclipse.jgit.internal.submodule;version="5.8.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.connectivity;version="5.8.0";x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.internal.transport.http;version="5.8.0";x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.internal.transport.parser;version="5.8.0";x-friends:="org.eclipse.jgit.http.server,org.eclipse.jgit.test",
org.eclipse.jgit.internal.transport.ssh;version="5.8.0";x-friends:="org.eclipse.jgit.ssh.apache",
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/FullConnectivityChecker.java
similarity index 99%
rename from org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java
rename to org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/FullConnectivityChecker.java
index 60d8f452b..b76e3a3ca 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/FullConnectivityChecker.java
@@ -8,7 +8,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.transport.internal;
+package org.eclipse.jgit.internal.transport.connectivity;
import java.io.IOException;
import java.util.Set;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/DelegatingSSLSocketFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/DelegatingSSLSocketFactory.java
similarity index 98%
rename from org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/DelegatingSSLSocketFactory.java
rename to org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/DelegatingSSLSocketFactory.java
index d25ecd459..5aab61ad0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/DelegatingSSLSocketFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/DelegatingSSLSocketFactory.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.transport.internal;
+package org.eclipse.jgit.internal.transport.http;
import java.io.IOException;
import java.net.InetAddress;
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 8a8c1ae0b..49413e54f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -48,6 +48,7 @@ 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;
import org.eclipse.jgit.internal.transport.parser.FirstCommand;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.BatchRefUpdate;
@@ -72,7 +73,6 @@ import org.eclipse.jgit.transport.ConnectivityChecker.ConnectivityCheckInfo;
import org.eclipse.jgit.transport.PacketLineIn.InputOverLimitIOException;
import org.eclipse.jgit.transport.ReceiveCommand.Result;
import org.eclipse.jgit.transport.RefAdvertiser.PacketLineOutRefAdvertiser;
-import org.eclipse.jgit.transport.internal.FullConnectivityChecker;
import org.eclipse.jgit.util.io.InterruptTimer;
import org.eclipse.jgit.util.io.LimitedInputStream;
import org.eclipse.jgit.util.io.TimeoutInputStream;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java
index 925c4e2f8..3b0bae21e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java
@@ -32,7 +32,7 @@ import javax.net.ssl.SSLSocket;
import javax.net.ssl.TrustManager;
import org.eclipse.jgit.annotations.NonNull;
-import org.eclipse.jgit.transport.internal.DelegatingSSLSocketFactory;
+import org.eclipse.jgit.internal.transport.http.DelegatingSSLSocketFactory;
import org.eclipse.jgit.util.HttpSupport;
/**
* A {@link org.eclipse.jgit.transport.http.HttpConnection} which simply
From 9075beefb1bcde3eea9ccee7e34a74a0f61e7ea2 Mon Sep 17 00:00:00 2001
From: Demetr Starshov
Date: Wed, 6 May 2020 17:53:36 -0700
Subject: [PATCH 03/55] ReceivePack: adding IterativeConnectivityChecker
Introduce an IterativeConnectivityChecker which runs a connectivity
check with a filtered set of references, and falls back to using the
full set of advertised references.
It uses references during first check attempt:
- References that are ancestors of an incoming commits (e.g., pushing
a commit onto an existing branch or pushing a new branch based on
another branch)
- Additional list of references we know client can be interested in
(e.g. list of open changes for Gerrit)
We tested it inside Google and it improves connectivity for certain
topologies. For example connectivity counts for
chromium.googlesource.com/chromium/src:
percentile_50: 1923 (was: 22777)
percentile_90: 23272 (was: 353003)
percentile_99: 345522 (was: 353435)
This saved ~2 seconds on every push to this repository.
Signed-off-by: Demetr Starshov
Change-Id: I6543c2e10ed04622ca795b195665133e690d3b10
---
org.eclipse.jgit.test/META-INF/MANIFEST.MF | 1 +
.../IterativeConnectivityCheckerTest.java | 258 ++++++++++++++++++
.../IterativeConnectivityChecker.java | 152 +++++++++++
3 files changed, 411 insertions(+)
create mode 100644 org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityCheckerTest.java
create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityChecker.java
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index 6bd06e11b..eda450526 100644
--- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
@@ -42,6 +42,7 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.eclipse.jgit.internal.storage.pack;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.storage.reftable;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.storage.reftree;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.internal.transport.connectivity;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.transport.http;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.transport.parser;version="[5.8.0,5.9.0)",
org.eclipse.jgit.junit;version="[5.8.0,5.9.0)",
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityCheckerTest.java
new file mode 100644
index 000000000..e75dd2259
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityCheckerTest.java
@@ -0,0 +1,258 @@
+/*
+ * Copyright (c) 2019, Google LLC 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
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.internal.transport.connectivity;
+
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.verify;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
+import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.transport.PackParser;
+import org.eclipse.jgit.transport.ReceiveCommand;
+import org.eclipse.jgit.transport.ConnectivityChecker;
+import org.eclipse.jgit.transport.ConnectivityChecker.ConnectivityCheckInfo;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+public class IterativeConnectivityCheckerTest {
+ @Rule
+ public MockitoRule rule = MockitoJUnit.rule();
+
+ private ObjectId branchHeadObjectId;
+
+ private ObjectId openRewiewObjectId;
+
+ private ObjectId newCommitObjectId;
+ private ObjectId otherHaveObjectId = ObjectId
+ .fromString("DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF");
+
+ private Set advertisedHaves;
+
+ @Mock
+ private ConnectivityChecker connectivityCheckerDelegate;
+
+ @Mock
+ private ProgressMonitor pm;
+
+ @Mock
+ private PackParser parser;
+
+ private RevCommit branchHeadCommitObject;
+ private RevCommit openReviewCommitObject;
+ private RevCommit newCommitObject;
+
+ private ConnectivityCheckInfo connectivityCheckInfo;
+ private IterativeConnectivityChecker connectivityChecker;
+
+ private TestRepository tr;
+
+ @Before
+ public void setUp() throws Exception {
+ tr = new TestRepository<>(
+ new InMemoryRepository(new DfsRepositoryDescription("test")));
+ connectivityChecker = new IterativeConnectivityChecker(
+ connectivityCheckerDelegate);
+ connectivityCheckInfo = new ConnectivityCheckInfo();
+ connectivityCheckInfo.setParser(parser);
+ connectivityCheckInfo.setRepository(tr.getRepository());
+ connectivityCheckInfo.setWalk(tr.getRevWalk());
+
+ branchHeadCommitObject = tr.commit().create();
+ branchHeadObjectId = branchHeadCommitObject.getId();
+
+ openReviewCommitObject = tr.commit().create();
+ openRewiewObjectId = openReviewCommitObject.getId();
+
+ advertisedHaves = wrap(branchHeadObjectId, openRewiewObjectId,
+ otherHaveObjectId);
+ }
+
+ @Test
+ public void testSuccessfulNewBranchBasedOnOld() throws Exception {
+ createNewCommit(branchHeadCommitObject);
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(createNewBrachCommand()));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate).checkConnectivity(
+ connectivityCheckInfo,
+ wrap(branchHeadObjectId /* as direct parent */),
+ pm);
+ }
+
+ @Test
+ public void testSuccessfulNewBranchBasedOnOldWithTip() throws Exception {
+ createNewCommit(branchHeadCommitObject);
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(createNewBrachCommand()));
+
+ connectivityChecker.setForcedHaves(wrap(openRewiewObjectId));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate).checkConnectivity(
+ connectivityCheckInfo,
+ wrap(branchHeadObjectId /* as direct parent */,
+ openRewiewObjectId),
+ pm);
+ }
+
+ @Test
+ public void testSuccessfulNewBranchMerge() throws Exception {
+ createNewCommit(branchHeadCommitObject, openReviewCommitObject);
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(createNewBrachCommand()));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate).checkConnectivity(
+ connectivityCheckInfo,
+ wrap(branchHeadObjectId /* as direct parent */,
+ openRewiewObjectId),
+ pm);
+ }
+
+ @Test
+ public void testSuccessfulNewBranchBasedOnNewWithTip() throws Exception {
+ createNewCommit();
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(createNewBrachCommand()));
+
+ connectivityChecker.setForcedHaves(wrap(openRewiewObjectId));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate).checkConnectivity(
+ connectivityCheckInfo, wrap(openRewiewObjectId), pm);
+ }
+
+ @Test
+ public void testSuccessfulPushOldBranch() throws Exception {
+ createNewCommit(branchHeadCommitObject);
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(pushOldBranchCommand()));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate).checkConnectivity(
+ connectivityCheckInfo, wrap(branchHeadObjectId /* as direct parent */),
+ pm);
+ }
+
+ @Test
+ public void testSuccessfulPushOldBranchMergeCommit() throws Exception {
+ createNewCommit(branchHeadCommitObject, openReviewCommitObject);
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(pushOldBranchCommand()));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate).checkConnectivity(
+ connectivityCheckInfo,
+ wrap(branchHeadObjectId /* as direct parent */,
+ openRewiewObjectId),
+ pm);
+ }
+
+
+ @Test
+ public void testNoChecksIfCantFindSubset() throws Exception {
+ createNewCommit();
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(createNewBrachCommand()));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate)
+ .checkConnectivity(connectivityCheckInfo, advertisedHaves, pm);
+ }
+
+ @Test
+ public void testReiterateInCaseNotSuccessful() throws Exception {
+ createNewCommit(branchHeadCommitObject);
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(createNewBrachCommand()));
+
+ doThrow(new MissingObjectException(branchHeadCommitObject,
+ Constants.OBJ_COMMIT)).when(connectivityCheckerDelegate)
+ .checkConnectivity(connectivityCheckInfo,
+ wrap(branchHeadObjectId /* as direct parent */), pm);
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate)
+ .checkConnectivity(connectivityCheckInfo, advertisedHaves, pm);
+ }
+
+ @Test
+ public void testDependOnGrandparent() throws Exception {
+ RevCommit grandparent = tr.commit(new RevCommit[] {});
+ RevCommit parent = tr.commit(grandparent);
+ createNewCommit(parent);
+
+ branchHeadCommitObject = tr.commit(grandparent);
+ branchHeadObjectId = branchHeadCommitObject.getId();
+ tr.getRevWalk().dispose();
+
+ connectivityCheckInfo.setCommands(
+ Collections.singletonList(createNewBrachCommand()));
+
+ connectivityChecker.checkConnectivity(connectivityCheckInfo,
+ advertisedHaves, pm);
+
+ verify(connectivityCheckerDelegate)
+ .checkConnectivity(connectivityCheckInfo, advertisedHaves, pm);
+ }
+
+ private static Set wrap(ObjectId... objectIds) {
+ return new HashSet<>(Arrays.asList(objectIds));
+ }
+
+ private ReceiveCommand createNewBrachCommand() {
+ return new ReceiveCommand(ObjectId.zeroId(), newCommitObjectId,
+ "totally/a/new/branch");
+ }
+
+ private ReceiveCommand pushOldBranchCommand() {
+ return new ReceiveCommand(branchHeadObjectId, newCommitObjectId,
+ "push/to/an/old/branch");
+ }
+
+ private void createNewCommit(RevCommit... parents) throws Exception {
+ newCommitObject = tr.commit(parents);
+ newCommitObjectId = newCommitObject.getId();
+ }
+
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityChecker.java
new file mode 100644
index 000000000..b44c4ae5c
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityChecker.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2019, Google LLC 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
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.internal.transport.connectivity;
+
+import static java.util.stream.Collectors.toList;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Queue;
+import java.util.Set;
+import java.util.stream.Stream;
+
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevObject;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.transport.ConnectivityChecker;
+import org.eclipse.jgit.transport.ReceiveCommand;
+
+/**
+ * Implementation of connectivity checker which tries to do check with smaller
+ * set of references first and if it fails will fall back to check against all
+ * advertised references.
+ *
+ * This is useful for big repos with enormous number of references.
+ */
+public class IterativeConnectivityChecker implements ConnectivityChecker {
+ private static final int MAXIMUM_PARENTS_TO_CHECK = 128;
+
+ private final ConnectivityChecker delegate;
+
+ private Set forcedHaves = Collections.emptySet();
+
+ /**
+ * @param delegate
+ * Delegate checker which will be called for actual checks.
+ */
+ public IterativeConnectivityChecker(ConnectivityChecker delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public void checkConnectivity(ConnectivityCheckInfo connectivityCheckInfo,
+ Set advertisedHaves, ProgressMonitor pm)
+ throws MissingObjectException, IOException {
+ try {
+ Set newRefs = new HashSet<>();
+ Set expectedParents = new HashSet<>();
+
+ getAllObjectIds(connectivityCheckInfo.getCommands())
+ .forEach(oid -> {
+ if (advertisedHaves.contains(oid)) {
+ expectedParents.add(oid);
+ } else {
+ newRefs.add(oid);
+ }
+ });
+ if (!newRefs.isEmpty()) {
+ expectedParents.addAll(extractAdvertisedParentCommits(newRefs,
+ advertisedHaves, connectivityCheckInfo.getWalk()));
+ }
+
+ expectedParents.addAll(forcedHaves);
+
+ if (!expectedParents.isEmpty()) {
+ delegate.checkConnectivity(connectivityCheckInfo,
+ expectedParents, pm);
+ return;
+ }
+ } catch (MissingObjectException e) {
+ // This is fine, retry with all haves.
+ }
+ delegate.checkConnectivity(connectivityCheckInfo, advertisedHaves, pm);
+ }
+
+ private static Stream getAllObjectIds(
+ List commands) {
+ return commands.stream().flatMap(cmd -> {
+ if (cmd.getType() == ReceiveCommand.Type.UPDATE || cmd
+ .getType() == ReceiveCommand.Type.UPDATE_NONFASTFORWARD) {
+ return Stream.of(cmd.getOldId(), cmd.getNewId());
+ } else if (cmd.getType() == ReceiveCommand.Type.CREATE) {
+ return Stream.of(cmd.getNewId());
+ }
+ return Stream.of();
+ });
+ }
+
+ /**
+ * Sets additional haves that client can depend on (e.g. gerrit changes).
+ *
+ * @param forcedHaves
+ * Haves server expects client to depend on.
+ */
+ public void setForcedHaves(Set forcedHaves) {
+ this.forcedHaves = Collections.unmodifiableSet(forcedHaves);
+ }
+
+ private static Set extractAdvertisedParentCommits(
+ Set newRefs, Set advertisedHaves, RevWalk rw)
+ throws MissingObjectException, IOException {
+ Set advertisedParents = new HashSet<>();
+ for (ObjectId newRef : newRefs) {
+ RevObject object = rw.parseAny(newRef);
+ if (object instanceof RevCommit) {
+ int numberOfParentsToCheck = 0;
+ Queue parents = new ArrayDeque<>(
+ MAXIMUM_PARENTS_TO_CHECK);
+ parents.addAll(
+ parseParents(((RevCommit) object).getParents(), rw));
+ // Looking through a chain of ancestors handles the case where a
+ // series of commits is sent in a single push for a new branch.
+ while (!parents.isEmpty()) {
+ RevCommit parentCommit = parents.poll();
+ if (advertisedHaves.contains(parentCommit.getId())) {
+ advertisedParents.add(parentCommit.getId());
+ } else if (numberOfParentsToCheck < MAXIMUM_PARENTS_TO_CHECK) {
+ RevCommit[] grandParents = parentCommit.getParents();
+ numberOfParentsToCheck += grandParents.length;
+ parents.addAll(parseParents(grandParents, rw));
+ }
+ }
+ }
+ }
+ return advertisedParents;
+ }
+
+ private static List parseParents(RevCommit[] parents,
+ RevWalk rw) {
+ return Arrays.stream(parents).map((commit) -> {
+ try {
+ return rw.parseCommit(commit);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }).collect(toList());
+ }
+}
From d27dceb3844415510e5bad54ace67add7c75e293 Mon Sep 17 00:00:00 2001
From: Pat Long
Date: Thu, 23 Apr 2020 13:52:22 -0400
Subject: [PATCH 04/55] Allow for using custom s3 host with lfs server
By default, it will generate hostname using the aws region passed to the
constructor.
This will allow for easier testing, since you can just spin up a local
minio (or other s3-compatible storage service) instance and point the
application at that for the storage mechanism.
It will also allow for storing lfs objects on-prem.
Change-Id: I2566b1fcce58f3d306ddd23a8da702ef5a451c7b
Signed-off-by: Pat Long
Signed-off-by: Matthias Sohn
---
.../server/internal/LfsServerText.properties | 1 +
.../lfs/server/internal/LfsServerText.java | 1 +
.../eclipse/jgit/lfs/server/s3/S3Config.java | 49 ++++++++++++++++++-
.../jgit/lfs/server/s3/S3Repository.java | 6 ++-
4 files changed, 53 insertions(+), 4 deletions(-)
diff --git a/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties b/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties
index 659714528..911cdcf12 100644
--- a/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties
+++ b/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties
@@ -4,6 +4,7 @@ objectNotFound=Object ''{0}'' not found
undefinedS3AccessKey=S3 configuration: 'accessKey' is undefined
undefinedS3Bucket=S3 configuration: 'bucket' is undefined
undefinedS3Region=S3 configuration: 'region' is undefined
+undefinedS3Hostname=S3 configuration: 'hostname' is undefined
undefinedS3SecretKey=S3 configuration: 'secretKey' is undefined
undefinedS3StorageClass=S3 configuration: 'storageClass' is undefined
unparsableEndpoint=Unable to parse service endpoint: {0}
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java
index bed485f60..56d59bb54 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java
@@ -33,6 +33,7 @@ public class LfsServerText extends TranslationBundle {
/***/ public String undefinedS3AccessKey;
/***/ public String undefinedS3Bucket;
/***/ public String undefinedS3Region;
+ /***/ public String undefinedS3Hostname;
/***/ public String undefinedS3SecretKey;
/***/ public String undefinedS3StorageClass;
/***/ public String unparsableEndpoint;
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java
index f3dd2781c..3942e22a8 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java
@@ -16,6 +16,7 @@ package org.eclipse.jgit.lfs.server.s3;
* @since 4.3
*/
public class S3Config {
+ private final String hostname;
private final String region;
private final String bucket;
private final String storageClass;
@@ -25,8 +26,12 @@ public class S3Config {
private final boolean disableSslVerify;
/**
- * Constructor for S3Config.
+ *
+ * Constructor for S3Config.
+ *
*
+ * @param hostname
+ * S3 API host
* @param region
* AWS region
* @param bucket
@@ -43,10 +48,12 @@ public class S3Config {
* @param disableSslVerify
* if {@code true} disable Amazon server certificate and hostname
* verification
+ * @since 5.8
*/
- public S3Config(String region, String bucket, String storageClass,
+ public S3Config(String hostname, String region, String bucket, String storageClass,
String accessKey, String secretKey, int expirationSeconds,
boolean disableSslVerify) {
+ this.hostname = hostname;
this.region = region;
this.bucket = bucket;
this.storageClass = storageClass;
@@ -56,6 +63,44 @@ public class S3Config {
this.disableSslVerify = disableSslVerify;
}
+ /**
+ * Constructor for S3Config.
+ *
+ * @param region
+ * AWS region
+ * @param bucket
+ * S3 storage bucket
+ * @param storageClass
+ * S3 storage class
+ * @param accessKey
+ * access key for authenticating to AWS
+ * @param secretKey
+ * secret key for authenticating to AWS
+ * @param expirationSeconds
+ * period in seconds after which requests signed for this bucket
+ * will expire
+ * @param disableSslVerify
+ * if {@code true} disable Amazon server certificate and hostname
+ * verification
+ */
+ public S3Config(String region, String bucket, String storageClass,
+ String accessKey, String secretKey, int expirationSeconds,
+ boolean disableSslVerify) {
+ this(String.format("s3-%s.amazonaws.com", region), region, bucket, //$NON-NLS-1$
+ storageClass, accessKey, secretKey, expirationSeconds,
+ disableSslVerify);
+ }
+
+ /**
+ * Get the hostname
.
+ *
+ * @return Get the S3 API host
+ * @since 5.8
+ */
+ public String getHostname() {
+ return hostname;
+ }
+
/**
* Get the region
.
*
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
index bd1705b82..c7c7a7146 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java
@@ -159,6 +159,8 @@ public class S3Repository implements LargeFileRepository {
config.getBucket());
assertNotEmpty(LfsServerText.get().undefinedS3Region,
config.getRegion());
+ assertNotEmpty(LfsServerText.get().undefinedS3Hostname,
+ config.getHostname());
assertNotEmpty(LfsServerText.get().undefinedS3SecretKey,
config.getSecretKey());
assertNotEmpty(LfsServerText.get().undefinedS3StorageClass,
@@ -173,8 +175,8 @@ public class S3Repository implements LargeFileRepository {
private URL getObjectUrl(AnyLongObjectId oid) {
try {
- return new URL(String.format("https://s3-%s.amazonaws.com/%s/%s", //$NON-NLS-1$
- s3Config.getRegion(), s3Config.getBucket(),
+ return new URL(String.format("https://%s/%s/%s", //$NON-NLS-1$
+ s3Config.getHostname(), s3Config.getBucket(),
getPath(oid)));
} catch (MalformedURLException e) {
throw new IllegalArgumentException(MessageFormat.format(
From a379d007dbf5eefbe8c93738755582586eb835b1 Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Mon, 11 May 2020 10:36:54 +0200
Subject: [PATCH 05/55] Fix downloading LFS Object fails behind proxy
When downloading LFS objects also accept response code 203 as successful
download. This response may be seen when downloading via a proxy.
Bug: 563022
Change-Id: Iee85fdb451b33369d08859872e5bfc2a67dffa6d
Signed-off-by: Matthias Sohn
---
.../src/org/eclipse/jgit/lfs/SmudgeFilter.java | 3 ++-
org.eclipse.jgit/.settings/.api_filters | 6 ++++++
.../src/org/eclipse/jgit/transport/http/HttpConnection.java | 6 ++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
index 23ece3e48..2f80d5b9a 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
@@ -133,7 +133,8 @@ public class SmudgeFilter extends FilterCommand {
.toRequest(Protocol.OPERATION_DOWNLOAD, res))
.getBytes(UTF_8));
int responseCode = lfsServerConn.getResponseCode();
- if (responseCode != HttpConnection.HTTP_OK) {
+ if (!(responseCode == HttpConnection.HTTP_OK
+ || responseCode == HttpConnection.HTTP_NOT_AUTHORITATIVE)) {
throw new IOException(
MessageFormat.format(LfsText.get().serverFailure,
lfsServerConn.getURL(),
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index c8b7bf799..2d860f59d 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -7,5 +7,11 @@
+
+
+
+
+
+
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java
index c4d086d4b..98c231a46 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java
@@ -40,6 +40,12 @@ public interface HttpConnection {
*/
int HTTP_OK = java.net.HttpURLConnection.HTTP_OK;
+ /**
+ * @see HttpURLConnection#HTTP_NOT_AUTHORITATIVE
+ * @since 5.8
+ */
+ int HTTP_NOT_AUTHORITATIVE = java.net.HttpURLConnection.HTTP_NOT_AUTHORITATIVE;
+
/**
* @see HttpURLConnection#HTTP_MOVED_PERM
* @since 4.7
From 840e414d0b0b817e7c154664914d19cb2b6d0387 Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Mon, 10 Feb 2020 15:22:31 -0800
Subject: [PATCH 06/55] Refactor: Make retriveCompressed an method of the
Bitmap class
Make retrieveCompressed() a method of Bitmap interface to avoid type
casting and later reuse in improving the memory footprint of GC's bitmap
generation phase.
Change-Id: I098d85105cf17af845d43b8c71b4ca48b02fd7da
Signed-off-by: Yunjie Li
---
.../jgit/internal/storage/file/BitmapIndexImpl.java | 8 +++++++-
.../storage/file/PackBitmapIndexBuilder.java | 13 +------------
.../src/org/eclipse/jgit/lib/BitmapIndex.java | 10 ++++++++++
3 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
index 6aa1a0e8e..0d3a2b4f1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
@@ -252,6 +252,11 @@ public class BitmapIndexImpl implements BitmapIndex {
return bitmapIndex;
}
+ @Override
+ public EWAHCompressedBitmap retrieveCompressed() {
+ return build().retrieveCompressed();
+ }
+
private EWAHCompressedBitmap ewahBitmap(Bitmap other) {
if (other instanceof CompressedBitmap) {
CompressedBitmap b = (CompressedBitmap) other;
@@ -372,7 +377,8 @@ public class BitmapIndexImpl implements BitmapIndex {
};
}
- EWAHCompressedBitmap getEwahCompressedBitmap() {
+ @Override
+ public EWAHCompressedBitmap retrieveCompressed() {
return bitmap;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
index 9538cc5e0..d87b6996f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
@@ -17,11 +17,9 @@ import java.util.List;
import java.util.NoSuchElementException;
import org.eclipse.jgit.internal.JGitText;
-import org.eclipse.jgit.internal.storage.file.BitmapIndexImpl.CompressedBitmap;
import org.eclipse.jgit.internal.storage.pack.ObjectToPack;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.BitmapIndex.Bitmap;
-import org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectIdOwnerMap;
@@ -134,16 +132,7 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
* the flags to be stored with the bitmap
*/
public void addBitmap(AnyObjectId objectId, Bitmap bitmap, int flags) {
- if (bitmap instanceof BitmapBuilder)
- bitmap = ((BitmapBuilder) bitmap).build();
-
- EWAHCompressedBitmap compressed;
- if (bitmap instanceof CompressedBitmap)
- compressed = ((CompressedBitmap) bitmap).getEwahCompressedBitmap();
- else
- throw new IllegalArgumentException(bitmap.getClass().toString());
-
- addBitmap(objectId, compressed, flags);
+ addBitmap(objectId, bitmap.retrieveCompressed(), flags);
}
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java
index f61286d6d..f6695bdf7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java
@@ -14,6 +14,8 @@ import java.util.Iterator;
import org.eclipse.jgit.internal.storage.file.PackBitmapIndex;
+import com.googlecode.javaewah.EWAHCompressedBitmap;
+
/**
* A compressed bitmap representation of the entire object graph.
*
@@ -81,6 +83,14 @@ public interface BitmapIndex {
*/
@Override
Iterator iterator();
+
+ /**
+ * Returns the corresponding raw compressed EWAH bitmap of the bitmap.
+ *
+ * @return the corresponding {@code EWAHCompressedBitmap}
+ * @since 5.8
+ */
+ EWAHCompressedBitmap retrieveCompressed();
}
/**
From d23254ee5751dd9dd154b338d73d5c23fffd1616 Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Wed, 22 Apr 2020 13:12:05 -0700
Subject: [PATCH 07/55] PackBitmapIndex: Move BitmapCommit to a top-level class
Move BitmapCommit from inside the PackWriterBitmapPreparer to a new
top-level class in preparation for improving the memory footprint of GC's
bitmap generation phase.
Change-Id: I4d404a5b3a34998b441d23105197f33d32d39670
Signed-off-by: Yunjie Li
---
.../storage/pack/GcCommitSelectionTest.java | 1 -
.../internal/storage/pack/BitmapCommit.java | 35 +++++++++++++++++++
.../internal/storage/pack/PackWriter.java | 4 +--
.../pack/PackWriterBitmapPreparer.java | 22 ------------
4 files changed, 37 insertions(+), 25 deletions(-)
create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java
index f2876b785..cc826c30b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java
@@ -23,7 +23,6 @@ import java.util.Set;
import org.eclipse.jgit.internal.storage.file.GcTestCase;
import org.eclipse.jgit.internal.storage.file.PackBitmapIndexBuilder;
-import org.eclipse.jgit.internal.storage.pack.PackWriterBitmapPreparer.BitmapCommit;
import org.eclipse.jgit.junit.TestRepository.BranchBuilder;
import org.eclipse.jgit.junit.TestRepository.CommitBuilder;
import org.eclipse.jgit.lib.Constants;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java
new file mode 100644
index 000000000..cbf1ccfd9
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2020, Google LLC 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
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.storage.pack;
+
+import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.lib.ObjectId;
+
+/**
+ * A commit object for which a bitmap index should be built.
+ */
+public final class BitmapCommit extends ObjectId {
+ private final boolean reuseWalker;
+ private final int flags;
+
+ BitmapCommit(AnyObjectId objectId, boolean reuseWalker, int flags) {
+ super(objectId);
+ this.reuseWalker = reuseWalker;
+ this.flags = flags;
+ }
+
+ boolean isReuseWalker() {
+ return reuseWalker;
+ }
+
+ int getFlags() {
+ return flags;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
index 75dd345f4..0c965fe18 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
@@ -2313,14 +2313,14 @@ public class PackWriter implements AutoCloseable {
PackWriterBitmapPreparer bitmapPreparer = new PackWriterBitmapPreparer(
reader, writeBitmaps, pm, stats.interestingObjects, config);
- Collection selectedCommits = bitmapPreparer
+ Collection selectedCommits = bitmapPreparer
.selectCommits(numCommits, excludeFromBitmapSelection);
beginPhase(PackingPhase.BUILDING_BITMAPS, pm, selectedCommits.size());
BitmapWalker walker = bitmapPreparer.newBitmapWalker();
AnyObjectId last = null;
- for (PackWriterBitmapPreparer.BitmapCommit cmit : selectedCommits) {
+ for (BitmapCommit cmit : selectedCommits) {
if (!cmit.isReuseWalker()) {
walker = bitmapPreparer.newBitmapWalker();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
index 51b4993e2..0377bccd8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
@@ -467,28 +467,6 @@ class PackWriterBitmapPreparer {
new ObjectWalk(reader), bitmapIndex, null);
}
- /**
- * A commit object for which a bitmap index should be built.
- */
- static final class BitmapCommit extends ObjectId {
- private final boolean reuseWalker;
- private final int flags;
-
- BitmapCommit(AnyObjectId objectId, boolean reuseWalker, int flags) {
- super(objectId);
- this.reuseWalker = reuseWalker;
- this.flags = flags;
- }
-
- boolean isReuseWalker() {
- return reuseWalker;
- }
-
- int getFlags() {
- return flags;
- }
- }
-
/**
* Container for state used in the first phase of selecting commits, which
* walks all of the reachable commits via the branch tips that are not
From b1d4b457081e7e31d292237991a4fe20e6d1b689 Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Wed, 22 Apr 2020 13:17:47 -0700
Subject: [PATCH 08/55] PackBitmapIndex: Add util methods and builder to
BitmapCommit
Add some utility methods and a builder class for BitmapCommit class in
preparation for improving the memory footprint of GC's bitmap generation
phase.
Change-Id: Ice3d257fc26f3917a65a64eaf53b508b89043caa
Signed-off-by: Yunjie Li
---
.../internal/storage/pack/BitmapCommit.java | 128 ++++++++++++++++++
1 file changed, 128 insertions(+)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java
index cbf1ccfd9..33c478e4a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java
@@ -16,13 +16,26 @@ import org.eclipse.jgit.lib.ObjectId;
* A commit object for which a bitmap index should be built.
*/
public final class BitmapCommit extends ObjectId {
+
private final boolean reuseWalker;
+
private final int flags;
+ private final boolean addToIndex;
+
BitmapCommit(AnyObjectId objectId, boolean reuseWalker, int flags) {
super(objectId);
this.reuseWalker = reuseWalker;
this.flags = flags;
+ this.addToIndex = false;
+ }
+
+ BitmapCommit(AnyObjectId objectId, boolean reuseWalker, int flags,
+ boolean addToIndex) {
+ super(objectId);
+ this.reuseWalker = reuseWalker;
+ this.flags = flags;
+ this.addToIndex = addToIndex;
}
boolean isReuseWalker() {
@@ -32,4 +45,119 @@ public final class BitmapCommit extends ObjectId {
int getFlags() {
return flags;
}
+
+ /**
+ * Whether corresponding bitmap should be added to PackBitmapIndexBuilder.
+ *
+ * @return true if the corresponding bitmap should be added to
+ * PackBitmapIndexBuilder.
+ */
+ public boolean isAddToIndex() {
+ return addToIndex;
+ }
+
+ /**
+ * Get a builder of BitmapCommit whose object id is {@code objId}.
+ *
+ * @param objId
+ * the object id of the BitmapCommit
+ * @return a BitmapCommit builder with object id set.
+ */
+ public static Builder newBuilder(AnyObjectId objId) {
+ return new Builder().setId(objId);
+ }
+
+ /**
+ * Get a builder of BitmapCommit whose fields are copied from
+ * {@code commit}.
+ *
+ * @param commit
+ * the bitmap commit the builder is copying from
+ * @return a BitmapCommit build with fields copied from an existing bitmap
+ * commit.
+ */
+ public static Builder copyFrom(BitmapCommit commit) {
+ return new Builder().setId(commit)
+ .setReuseWalker(commit.isReuseWalker())
+ .setFlags(commit.getFlags())
+ .setAddToIndex(commit.isAddToIndex());
+ }
+
+ /**
+ * Builder of BitmapCommit.
+ */
+ public static class Builder {
+ private AnyObjectId objectId;
+
+ private boolean reuseWalker;
+
+ private int flags;
+
+ private boolean addToIndex;
+
+ // Prevent default constructor.
+ private Builder() {
+ }
+
+ /**
+ * Set objectId of the builder.
+ *
+ * @param objectId
+ * the object id of the BitmapCommit
+ * @return the builder itself
+ */
+ public Builder setId(AnyObjectId objectId) {
+ this.objectId = objectId;
+ return this;
+ }
+
+ /**
+ * Set reuseWalker of the builder.
+ *
+ * @param reuseWalker
+ * whether the BitmapCommit should reuse bitmap walker when
+ * walking objects
+ * @return the builder itself
+ */
+ public Builder setReuseWalker(boolean reuseWalker) {
+ this.reuseWalker = reuseWalker;
+ return this;
+ }
+
+ /**
+ * Set flags of the builder.
+ *
+ * @param flags
+ * the flags of the BitmapCommit
+ * @return the builder itself
+ */
+ public Builder setFlags(int flags) {
+ this.flags = flags;
+ return this;
+ }
+
+ /**
+ * Set whether whether the bitmap of the BitmapCommit should be added to
+ * PackBitmapIndexBuilder when building bitmap index file.
+ *
+ * @param addToIndex
+ * whether the bitmap of the BitmapCommit should be added to
+ * PackBitmapIndexBuilder when building bitmap index file
+ * @return the builder itself
+ */
+ public Builder setAddToIndex(boolean addToIndex) {
+ this.addToIndex = addToIndex;
+ return this;
+ }
+
+ /**
+ * Builds BitmapCommit from the builder.
+ *
+ * @return the new BitmapCommit.
+ */
+ public BitmapCommit build() {
+ return new BitmapCommit(objectId, reuseWalker, flags,
+ addToIndex);
+ }
+ }
}
\ No newline at end of file
From 067d946090c4db43134687c93d30192ad1314bec Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Mon, 10 Feb 2020 17:02:13 -0800
Subject: [PATCH 09/55] PackBitmapIndex: Add AddToBitmapWithCacheFilter class
Add a new revwalk filter, AddToBitmapWithCachedFilter. This filter updates
a client-provided {@code BitmapBuilder} as a side effect of a revwalk.
Similar to {@code AddToBitmapFilter}, it short circuits the walk when it
encounters a commit which is included in the provided bitmap's BitmapIndex.
It also short circuits the walk if it encounters the client-provided
cached commit.
Change-Id: I62cb503016f4d3995d648d92b82baab7f93549a9
Signed-off-by: Yunjie Li
---
.../revwalk/AddToBitmapWithCacheFilter.java | 91 +++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java
new file mode 100644
index 000000000..d7ccadfbe
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2020, Google LLC 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
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.revwalk;
+
+import org.eclipse.jgit.lib.BitmapIndex.Bitmap;
+import org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.revwalk.filter.RevFilter;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevFlag;
+
+/**
+ * A RevFilter that adds the visited commits to {@code bitmap} as a side effect.
+ *
+ * When the walk hits a commit that is the same as {@code cachedCommit} or is
+ * part of {@code bitmap}'s BitmapIndex, that entire bitmap is ORed into
+ * {@code bitmap} and the commit and its parents are marked as SEEN so that the
+ * walk does not have to visit its ancestors. This ensures the walk is very
+ * short if there is good bitmap coverage.
+ */
+public class AddToBitmapWithCacheFilter extends RevFilter {
+ private final AnyObjectId cachedCommit;
+
+ private final Bitmap cachedBitmap;
+
+ private final BitmapBuilder bitmap;
+
+ /**
+ * Create a filter with a cached BitmapCommit that adds visited commits to
+ * the given bitmap.
+ *
+ * @param cachedCommit
+ * the cached commit
+ * @param cachedBitmap
+ * the bitmap corresponds to {@code cachedCommit}}
+ * @param bitmap
+ * bitmap to write visited commits to
+ */
+ public AddToBitmapWithCacheFilter(AnyObjectId cachedCommit,
+ Bitmap cachedBitmap,
+ BitmapBuilder bitmap) {
+ this.cachedCommit = cachedCommit;
+ this.cachedBitmap = cachedBitmap;
+ this.bitmap = bitmap;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final boolean include(RevWalk rw, RevCommit c) {
+ Bitmap visitedBitmap;
+
+ if (bitmap.contains(c)) {
+ // already included
+ } else if ((visitedBitmap = bitmap.getBitmapIndex()
+ .getBitmap(c)) != null) {
+ bitmap.or(visitedBitmap);
+ } else if (cachedCommit.equals(c)) {
+ bitmap.or(cachedBitmap);
+ } else {
+ bitmap.addObject(c, Constants.OBJ_COMMIT);
+ return true;
+ }
+
+ for (RevCommit p : c.getParents()) {
+ p.add(RevFlag.SEEN);
+ }
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final RevFilter clone() {
+ throw new UnsupportedOperationException();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final boolean requiresCommitBody() {
+ return false;
+ }
+}
+
From dcb02654360e7617380361a3b755dc380c239edf Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Tue, 11 Feb 2020 11:06:33 -0800
Subject: [PATCH 10/55] PackBitmapIndex: Reduce memory usage in GC
Currently, the garbage collection is consistently failing for some large
repositories in the building bitmap phase, e.g.Linux-MSM project:
https://source.codeaurora.org/quic/la/kernel/msm-3.18
Historically, bitmap index creation happened in 3 phases:
1. Select the commits to which bitmaps should be attached.
2. Create all bitmaps for these commits, stored in uncompressed format
in the PackBitmapIndexBuilder.
3. Deltify the bitmaps and write them to disk.
We investigated the process. For phase 2 it's most efficient to create
bitmaps starting with oldest commit and moving to the newest commit,
because the newer commits are able to reuse the work for the old ones.
But for bitmap deltification in phase 3, it's better when a newer
commit's bitmap is the base, and the current disk format writes bitmaps
out for the newest commits first.
This change introduces a new collection to hold the deltified and
compressed representations of the bitmaps, keeping a smaller subset of
commits in the PackBitmapIndexBuilder to help make the bitmap index
creation more memory efficient.
And in this commit, we're setting DISTANCE_THRESHOLD to 0 in the
PackWriterBitmapPreparer, which means the garbage collection will not
have much behavoir change and will still use as much memory as before.
Change-Id: I6ec2c3e8dde11805af47874d67d33cf1ef83660e
Signed-off-by: Yunjie Li
---
.../storage/file/PackBitmapIndexBuilder.java | 144 ++++++++++--------
.../internal/storage/pack/PackWriter.java | 10 +-
.../pack/PackWriterBitmapPreparer.java | 18 ++-
.../eclipse/jgit/revwalk/BitmapWalker.java | 33 +++-
4 files changed, 136 insertions(+), 69 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
index d87b6996f..5666b5760 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
@@ -11,12 +11,13 @@
package org.eclipse.jgit.internal.storage.file;
import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.Collections;
-import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
-import java.util.NoSuchElementException;
import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.internal.storage.pack.BitmapCommit;
import org.eclipse.jgit.internal.storage.pack.ObjectToPack;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.BitmapIndex.Bitmap;
@@ -39,8 +40,12 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
private final EWAHCompressedBitmap blobs;
private final EWAHCompressedBitmap tags;
private final BlockList byOffset;
- final BlockList
- byAddOrder = new BlockList<>();
+
+ private final LinkedList
+ bitmapsToWriteXorBuffer = new LinkedList<>();
+
+ private List bitmapsToWrite = new ArrayList<>();
+
final ObjectIdOwnerMap
positionEntries = new ObjectIdOwnerMap<>();
@@ -135,6 +140,63 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
addBitmap(objectId, bitmap.retrieveCompressed(), flags);
}
+ /**
+ * Processes a commit and prepares its bitmap to write to the bitmap index
+ * file.
+ *
+ * @param c
+ * the commit corresponds to the bitmap.
+ * @param bitmap
+ * the bitmap to be written.
+ * @param flags
+ * the flags of the commit.
+ */
+ public void processBitmapForWrite(BitmapCommit c, Bitmap bitmap,
+ int flags) {
+ EWAHCompressedBitmap compressed = bitmap.retrieveCompressed();
+ compressed.trim();
+ StoredBitmap newest = new StoredBitmap(c, compressed, null, flags);
+
+ bitmapsToWriteXorBuffer.add(newest);
+ if (bitmapsToWriteXorBuffer.size() > MAX_XOR_OFFSET_SEARCH) {
+ bitmapsToWrite.add(
+ generateStoredEntry(bitmapsToWriteXorBuffer.pollFirst()));
+ }
+
+ if (c.isAddToIndex()) {
+ // The Bitmap map in the base class is used to make revwalks
+ // efficient, so only add bitmaps that keep it efficient without
+ // bloating memory.
+ addBitmap(c, bitmap, flags);
+ }
+ }
+
+ private StoredEntry generateStoredEntry(StoredBitmap bitmapToWrite) {
+ int bestXorOffset = 0;
+ EWAHCompressedBitmap bestBitmap = bitmapToWrite.getBitmap();
+
+ int offset = 1;
+ for (StoredBitmap curr : bitmapsToWriteXorBuffer) {
+ EWAHCompressedBitmap bitmap = curr.getBitmap()
+ .xor(bitmapToWrite.getBitmap());
+ if (bitmap.sizeInBytes() < bestBitmap.sizeInBytes()) {
+ bestBitmap = bitmap;
+ bestXorOffset = offset;
+ }
+ offset++;
+ }
+
+ PositionEntry entry = positionEntries.get(bitmapToWrite);
+ if (entry == null) {
+ throw new IllegalStateException();
+ }
+ bestBitmap.trim();
+ StoredEntry result = new StoredEntry(entry.namePosition, bestBitmap,
+ bestXorOffset, bitmapToWrite.getFlags());
+
+ return result;
+ }
+
/**
* Stores the bitmap for the objectId.
*
@@ -150,7 +212,6 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
bitmap.trim();
StoredBitmap result = new StoredBitmap(objectId, bitmap, null, flags);
getBitmaps().add(result);
- byAddOrder.add(result);
}
/** {@inheritDoc} */
@@ -236,15 +297,18 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
/** {@inheritDoc} */
@Override
public int getBitmapCount() {
- return getBitmaps().size();
+ return bitmapsToWriteXorBuffer.size() + bitmapsToWrite.size();
}
/**
* Remove all the bitmaps entries added.
+ *
+ * @param size
+ * the expected number of bitmap entries to be written.
*/
- public void clearBitmaps() {
- byAddOrder.clear();
+ public void resetBitmaps(int size) {
getBitmaps().clear();
+ bitmapsToWrite = new ArrayList<>(size);
}
/** {@inheritDoc} */
@@ -254,64 +318,18 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
}
/**
- * Get an iterator over the xor compressed entries.
+ * Get list of xor compressed entries that need to be written.
*
- * @return an iterator over the xor compressed entries.
+ * @return a list of the xor compressed entries.
*/
- public Iterable getCompressedBitmaps() {
- // Add order is from oldest to newest. The reverse add order is the
- // output order.
- return () -> new Iterator() {
-
- private int index = byAddOrder.size() - 1;
-
- @Override
- public boolean hasNext() {
- return index >= 0;
- }
-
- @Override
- public StoredEntry next() {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- StoredBitmap item = byAddOrder.get(index);
- int bestXorOffset = 0;
- EWAHCompressedBitmap bestBitmap = item.getBitmap();
-
- // Attempt to compress the bitmap with an XOR of the
- // previously written entries.
- for (int i = 1; i <= MAX_XOR_OFFSET_SEARCH; i++) {
- int curr = i + index;
- if (curr >= byAddOrder.size()) {
- break;
- }
-
- StoredBitmap other = byAddOrder.get(curr);
- EWAHCompressedBitmap bitmap = other.getBitmap()
- .xor(item.getBitmap());
-
- if (bitmap.sizeInBytes() < bestBitmap.sizeInBytes()) {
- bestBitmap = bitmap;
- bestXorOffset = i;
- }
- }
- index--;
-
- PositionEntry entry = positionEntries.get(item);
- if (entry == null) {
- throw new IllegalStateException();
- }
- bestBitmap.trim();
- return new StoredEntry(entry.namePosition, bestBitmap,
- bestXorOffset, item.getFlags());
- }
+ public List getCompressedBitmaps() {
+ while (!bitmapsToWriteXorBuffer.isEmpty()) {
+ bitmapsToWrite.add(
+ generateStoredEntry(bitmapsToWriteXorBuffer.pollFirst()));
+ }
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
+ Collections.reverse(bitmapsToWrite);
+ return bitmapsToWrite;
}
/** Data object for the on disk representation of a bitmap entry. */
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
index 0c965fe18..824c62ad9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
@@ -2331,8 +2331,14 @@ public class PackWriter implements AutoCloseable {
throw new IllegalStateException(MessageFormat.format(
JGitText.get().bitmapMissingObject, cmit.name(),
last.name()));
- last = cmit;
- writeBitmaps.addBitmap(cmit, bitmap.build(), cmit.getFlags());
+ last = BitmapCommit.copyFrom(cmit).build();
+ writeBitmaps.processBitmapForWrite(cmit, bitmap.build(),
+ cmit.getFlags());
+
+ // The bitmap walker should stop when the walk hits the previous
+ // commit, which saves time.
+ walker.setPrevCommit(last);
+ walker.setPrevBitmap(bitmap);
pm.update(1);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
index 0377bccd8..fefe565ad 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
@@ -58,6 +58,8 @@ class PackWriterBitmapPreparer {
private static final int DAY_IN_SECONDS = 24 * 60 * 60;
+ private static final int DISTANCE_THRESHOLD = 0;
+
private static final Comparator ORDER_BY_REVERSE_TIMESTAMP = (
RevCommit a, RevCommit b) -> Integer
.signum(b.getCommitTime() - a.getCommitTime());
@@ -244,6 +246,7 @@ class PackWriterBitmapPreparer {
// This commit is selected.
// Calculate where to look for the next one.
int flags = nextFlg;
+ int currDist = distanceFromTip;
nextIn = nextSpan(distanceFromTip);
nextFlg = nextIn == distantCommitSpan
? PackBitmapIndex.FLAG_REUSE
@@ -279,8 +282,17 @@ class PackWriterBitmapPreparer {
longestAncestorChain = new ArrayList<>();
chains.add(longestAncestorChain);
}
- longestAncestorChain.add(new BitmapCommit(c,
- !longestAncestorChain.isEmpty(), flags));
+
+ // The commit bc should reuse bitmap walker from its close
+ // ancestor. And the bitmap of bc should only be added to
+ // PackBitmapIndexBuilder when it's an old enough
+ // commit,i.e. distance from tip should be greater than
+ // DISTANCE_THRESHOLD, to save memory.
+ BitmapCommit bc = BitmapCommit.newBuilder(c).setFlags(flags)
+ .setAddToIndex(currDist >= DISTANCE_THRESHOLD)
+ .setReuseWalker(!longestAncestorChain.isEmpty())
+ .build();
+ longestAncestorChain.add(bc);
writeBitmaps.addBitmap(c, bitmap, 0);
}
@@ -288,12 +300,12 @@ class PackWriterBitmapPreparer {
selections.addAll(chain);
}
}
- writeBitmaps.clearBitmaps(); // Remove the temporary commit bitmaps.
// Add the remaining peeledWant
for (AnyObjectId remainingWant : selectionHelper.newWants) {
selections.add(new BitmapCommit(remainingWant, false, 0));
}
+ writeBitmaps.resetBitmaps(selections.size()); // Remove the temporary commit bitmaps.
pm.endTask();
return selections;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java
index 023962e25..aaecd2395 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java
@@ -16,6 +16,7 @@ import java.util.Arrays;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.internal.revwalk.AddToBitmapFilter;
+import org.eclipse.jgit.internal.revwalk.AddToBitmapWithCacheFilter;
import org.eclipse.jgit.internal.revwalk.AddUnseenToBitmapFilter;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.BitmapIndex;
@@ -41,6 +42,11 @@ public final class BitmapWalker {
private long countOfBitmapIndexMisses;
+ // Cached bitmap and commit to save walk time.
+ private AnyObjectId prevCommit;
+
+ private Bitmap prevBitmap;
+
/**
* Create a BitmapWalker.
*
@@ -55,6 +61,28 @@ public final class BitmapWalker {
this.pm = (pm == null) ? NullProgressMonitor.INSTANCE : pm;
}
+ /**
+ * Set the cached commit for the walker.
+ *
+ * @param prevCommit
+ * the cached commit.
+ * @since 5.7
+ */
+ public void setPrevCommit(AnyObjectId prevCommit) {
+ this.prevCommit = prevCommit;
+ }
+
+ /**
+ * Set the bitmap associated with the cached commit for the walker.
+ *
+ * @param prevBitmap
+ * the bitmap associated with the cached commit.
+ * @since 5.7
+ */
+ public void setPrevBitmap(Bitmap prevBitmap) {
+ this.prevBitmap = prevBitmap;
+ }
+
/**
* Return the number of objects that had to be walked because they were not covered by a
* bitmap.
@@ -169,7 +197,10 @@ public final class BitmapWalker {
}
if (marked) {
- if (seen == null) {
+ if (prevCommit != null) {
+ walker.setRevFilter(new AddToBitmapWithCacheFilter(prevCommit,
+ prevBitmap, bitmapResult));
+ } else if (seen == null) {
walker.setRevFilter(new AddToBitmapFilter(bitmapResult));
} else {
walker.setRevFilter(
From e250482c7af5e1750b241683a1afde35ed020fee Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Thu, 23 Apr 2020 15:11:14 -0700
Subject: [PATCH 11/55] PackBitmapIndex: Remove convertedBitmaps in the
Remapper
The convertedBitmaps serves for time-optimization purpose. But it's
actually not saving time much but using lots of memory. So remove the
field here to save memory.
Currently the remapper class is only used in the construction of the
bitmap index file. And during the preparation of the file, we're only
getting bitmaps from the remapper when finding objects accessible from
a commit, so bitmap associated with each commit will only be fetched once
and thus the convertedBitmaps would hardly be read, which means that it's
not saving time.
Change-Id: Ic942a8e485135fb177ec21d09282d08ca6646fdb
Signed-off-by: Yunjie Li
---
.../internal/storage/file/PackBitmapIndexRemapper.java | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
index 273eeef7e..4b2528451 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
@@ -18,7 +18,6 @@ import org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex.StoredBitmap;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.BitmapIndex;
import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.ObjectIdOwnerMap;
import com.googlecode.javaewah.EWAHCompressedBitmap;
import com.googlecode.javaewah.IntIterator;
@@ -34,7 +33,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
private final BasePackBitmapIndex oldPackIndex;
final PackBitmapIndex newPackIndex;
- private final ObjectIdOwnerMap convertedBitmaps;
private final BitSet inflated;
private final int[] prevToNewMapping;
@@ -65,7 +63,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
private PackBitmapIndexRemapper(PackBitmapIndex newPackIndex) {
this.oldPackIndex = null;
this.newPackIndex = newPackIndex;
- this.convertedBitmaps = null;
this.inflated = null;
this.prevToNewMapping = null;
}
@@ -74,7 +71,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
BasePackBitmapIndex oldPackIndex, PackBitmapIndex newPackIndex) {
this.oldPackIndex = oldPackIndex;
this.newPackIndex = newPackIndex;
- convertedBitmaps = new ObjectIdOwnerMap<>();
inflated = new BitSet(newPackIndex.getObjectCount());
prevToNewMapping = new int[oldPackIndex.getObjectCount()];
@@ -152,10 +148,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
if (bitmap != null || oldPackIndex == null)
return bitmap;
- StoredBitmap stored = convertedBitmaps.get(objectId);
- if (stored != null)
- return stored.getBitmap();
-
StoredBitmap oldBitmap = oldPackIndex.getBitmaps().get(objectId);
if (oldBitmap == null)
return null;
@@ -168,8 +160,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
inflated.set(prevToNewMapping[i.next()]);
bitmap = inflated.toEWAHCompressedBitmap();
bitmap.trim();
- convertedBitmaps.add(
- new StoredBitmap(objectId, bitmap, null, oldBitmap.getFlags()));
return bitmap;
}
From 3aee92478c2cbc67cd921533437b824e43ed9798 Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Thu, 23 Apr 2020 15:12:15 -0700
Subject: [PATCH 12/55] PackBitmapIndex: Not buffer inflated bitmap in
BasePackBitmapIndex
Currently we're buffering the inflated bitmap entry in BasePackBitmapIndex
to optimize running time. However, this will use lots of memory during
the construction of the pack bitmap index file which may cause failure of
garbage collection.
The running time didn't increase significantly, if there's any increase,
after removing the buffering here. The report about usage of time/memory
will come in the next commit.
Change-Id: I874503ecc85714acab7ca62a6a7968c2dc0b56b3
Signed-off-by: Yunjie Li
---
.../eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
index c9bb167f0..74b46bcee 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
@@ -72,7 +72,6 @@ abstract class BasePackBitmapIndex extends PackBitmapIndex {
if (r instanceof EWAHCompressedBitmap) {
out = out.xor((EWAHCompressedBitmap) r);
out.trim();
- bitmapContainer = out;
return out;
}
xb = (XorCompressedBitmap) r;
From 913234e2ec299a30c8795d84e5ef52a683416cde Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Wed, 29 Apr 2020 15:27:47 -0700
Subject: [PATCH 13/55] PackBitmapIndex: Set distance threshold
Setting the distance threshold to 2000 in PackWriterBitmapPreparer to
reduce memory usage in garbage collection. When the threshold is 0, GC
for the msm repository would use about 37 GB memory to complete. After
setting it to 2000, GC can finish in 75 min with about 10 GB memory.
Change-Id: I39783eeecbae58261c883735499e61ee1cac75fe
Signed-off-by: Yunjie Li
---
.../jgit/internal/storage/pack/PackWriterBitmapPreparer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
index fefe565ad..f1ede2acf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
@@ -58,7 +58,7 @@ class PackWriterBitmapPreparer {
private static final int DAY_IN_SECONDS = 24 * 60 * 60;
- private static final int DISTANCE_THRESHOLD = 0;
+ private static final int DISTANCE_THRESHOLD = 2000;
private static final Comparator ORDER_BY_REVERSE_TIMESTAMP = (
RevCommit a, RevCommit b) -> Integer
From 91188a7d82128d22b832ac91e6239a4bd1802180 Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Sun, 17 May 2020 23:08:27 +0200
Subject: [PATCH 14/55] Fix wrong @since tags added in dcb0265
This change was introduced in 5.8.
Change-Id: Ic74ebff5a0547bb55e0401b38f73ebc6e67cace9
Signed-off-by: Matthias Sohn
---
.../src/org/eclipse/jgit/revwalk/BitmapWalker.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java
index aaecd2395..8cd5eb223 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java
@@ -66,7 +66,7 @@ public final class BitmapWalker {
*
* @param prevCommit
* the cached commit.
- * @since 5.7
+ * @since 5.8
*/
public void setPrevCommit(AnyObjectId prevCommit) {
this.prevCommit = prevCommit;
@@ -77,7 +77,7 @@ public final class BitmapWalker {
*
* @param prevBitmap
* the bitmap associated with the cached commit.
- * @since 5.7
+ * @since 5.8
*/
public void setPrevBitmap(Bitmap prevBitmap) {
this.prevBitmap = prevBitmap;
From d0f010dd2696731ede9d9b402b1e98a8cf78408c Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Sun, 17 May 2020 23:11:31 +0200
Subject: [PATCH 15/55] Suppress API error for new method
BitmapIndex.Bitmap#retrieveCompressed
OSGi semantic versioning allows breaking implementers in a minor
release.
Change-Id: Ib55dc43dd3b50b0ef39a7094190f230210aee4b6
Signed-off-by: Matthias Sohn
---
org.eclipse.jgit/.settings/.api_filters | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index 2d860f59d..be1d521aa 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -1,5 +1,13 @@
+
+
+
+
+
+
+
+
From b3f08af88099cfc26446c8b2d242a351f1bf69d8 Mon Sep 17 00:00:00 2001
From: David Pursehouse
Date: Mon, 18 May 2020 10:25:13 +0900
Subject: [PATCH 16/55] Bazel: Fix src_sha1 of bcpg-jdk15on
Test plan:
bazel build //...
Change-Id: Ibf1d0b56785d62150bbae49b553c856efbe6d197
Signed-off-by: David Pursehouse
---
WORKSPACE | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/WORKSPACE b/WORKSPACE
index 9e0ad3ecb..630e85ffb 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -259,7 +259,7 @@ maven_jar(
name = "bcpg",
artifact = "org.bouncycastle:bcpg-jdk15on:" + BOUNCYCASTLE_VER,
sha1 = "f32fc02cc29c9fdcc35c0de4d16964f01777067c",
- src_sha1 = "35e87838bf9348b25aae07135ceccfbef6827e3c",
+ src_sha1 = "508476d5383c7d086b400f5e7c5a8cf4dc8ac4e2",
)
maven_jar(
From 4d7a16257f674b061851b5a2ee63f61b900cb6f1 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Mon, 4 May 2020 11:38:46 +0200
Subject: [PATCH 17/55] Include full IssuerFingerprint in GPG signature
Update dependency to Bouncy Castle to 1.65.
Add the IssuerFingerprint as a hashed sub-packet in the signature. If
added unhashed, GPG ignores it.
Bug: 553206
Change-Id: I6807e8e2385e6ec5790f388e4753a44aa9474ebb
Signed-off-by: Thomas Wolf
---
org.eclipse.jgit/META-INF/MANIFEST.MF | 22 +++++++++----------
.../lib/internal/BouncyCastleGpgSigner.java | 6 +++++
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index 5fb76f503..1cdb6417b 100644
--- a/org.eclipse.jgit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/MANIFEST.MF
@@ -162,17 +162,17 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
com.jcraft.jsch;version="[0.1.37,0.2.0)",
javax.crypto,
javax.net.ssl,
- org.bouncycastle;version="[1.61.0,2.0.0)",
- org.bouncycastle.bcpg;version="[1.61.0,2.0.0)",
- org.bouncycastle.gpg;version="[1.61.0,2.0.0)",
- org.bouncycastle.gpg.keybox;version="[1.61.0,2.0.0)",
- org.bouncycastle.gpg.keybox.jcajce;version="[1.61.0,2.0.0)",
- org.bouncycastle.jce.provider;version="[1.61.0,2.0.0)",
- org.bouncycastle.openpgp;version="[1.61.0,2.0.0)",
- org.bouncycastle.openpgp.jcajce;version="[1.61.0,2.0.0)",
- org.bouncycastle.openpgp.operator;version="[1.61.0,2.0.0)",
- org.bouncycastle.openpgp.operator.jcajce;version="[1.61.0,2.0.0)",
- org.bouncycastle.util.encoders;version="[1.61.0,2.0.0)",
+ org.bouncycastle;version="[1.65.0,2.0.0)",
+ org.bouncycastle.bcpg;version="[1.65.0,2.0.0)",
+ org.bouncycastle.gpg;version="[1.65.0,2.0.0)",
+ org.bouncycastle.gpg.keybox;version="[1.65.0,2.0.0)",
+ org.bouncycastle.gpg.keybox.jcajce;version="[1.65.0,2.0.0)",
+ org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)",
+ org.bouncycastle.openpgp;version="[1.65.0,2.0.0)",
+ org.bouncycastle.openpgp.jcajce;version="[1.65.0,2.0.0)",
+ org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)",
+ org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)",
+ org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)",
org.slf4j;version="[1.7.0,2.0.0)",
org.xml.sax,
org.xml.sax.helpers
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java
index 388169637..dfcfdab11 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java
@@ -25,6 +25,7 @@ import org.bouncycastle.openpgp.PGPPrivateKey;
import org.bouncycastle.openpgp.PGPSecretKey;
import org.bouncycastle.openpgp.PGPSignature;
import org.bouncycastle.openpgp.PGPSignatureGenerator;
+import org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator;
import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder;
import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder;
import org.eclipse.jgit.annotations.NonNull;
@@ -117,6 +118,11 @@ public class BouncyCastleGpgSigner extends GpgSigner {
HashAlgorithmTags.SHA256).setProvider(
BouncyCastleProvider.PROVIDER_NAME));
signatureGenerator.init(PGPSignature.BINARY_DOCUMENT, privateKey);
+ PGPSignatureSubpacketGenerator subpacketGenerator = new PGPSignatureSubpacketGenerator();
+ subpacketGenerator.setIssuerFingerprint(false,
+ secretKey.getPublicKey());
+ signatureGenerator
+ .setHashedSubpackets(subpacketGenerator.generate());
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
try (BCPGOutputStream out = new BCPGOutputStream(
new ArmoredOutputStream(buffer))) {
From 551bc5cddd4a55185b95eaa53240c27a5bc71156 Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Wed, 20 May 2020 02:56:44 +0200
Subject: [PATCH 18/55] Update Orbit to S20200519202422 and ant to 1.10.8
Change-Id: I5bc120a495deb2f3b29bd04bb1c9a2058394ba8a
Signed-off-by: Matthias Sohn
---
org.eclipse.jgit.ant/pom.xml | 2 +-
.../org.eclipse.jgit.target/jgit-4.10.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.10.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.11.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.11.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.12.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.12.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.13.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.13.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.14.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.14.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.15-staging.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.15-staging.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.6.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.7.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.8.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.8.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.9.target | 8 ++++----
.../org.eclipse.jgit.target/jgit-4.9.tpd | 2 +-
.../orbit/{I20200506000552.tpd => S20200519202422.tpd} | 8 ++++----
22 files changed, 55 insertions(+), 55 deletions(-)
rename org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/{I20200506000552.tpd => S20200519202422.tpd} (95%)
diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml
index 54f7ba9bc..bfc415863 100644
--- a/org.eclipse.jgit.ant/pom.xml
+++ b/org.eclipse.jgit.ant/pom.xml
@@ -38,7 +38,7 @@
org.apache.ant
ant
- 1.10.7
+ 1.10.8
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
index f4c2acf7d..c0a249020 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
index 34357eee0..3f1cbe11d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
@@ -1,7 +1,7 @@
target "jgit-4.10" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/2018-12/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
index b17d13aad..09883e054 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
index f7c0a5b7d..faf51ad8a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
@@ -1,7 +1,7 @@
target "jgit-4.11" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/2019-03/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
index f72699b73..f2e56341a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
index 4be47a478..5ce5fb7f1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
@@ -1,7 +1,7 @@
target "jgit-4.12" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/2019-06/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
index 7be48e553..bebedb6c8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
index 3c3dd50c4..2aaae751f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
@@ -1,7 +1,7 @@
target "jgit-4.13" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/2019-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
index 02330c92d..0e748d510 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
index 69fb2bb0d..224c35439 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
@@ -1,7 +1,7 @@
target "jgit-4.14-staging" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/2019-12/201912181000/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target
index f070f48c2..09c1e74c9 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd
index 84bad578c..b21bd6af7 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd
@@ -1,7 +1,7 @@
target "jgit-4.14-staging" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/staging/2020-03/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
index 4a40ec0f9..2fd0c3151 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
index 8c8253597..2477408dc 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
@@ -1,7 +1,7 @@
target "jgit-4.6" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/neon/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
index 0a704200e..bf79c3196 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
index baa228a70..941f354f8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
@@ -1,7 +1,7 @@
target "jgit-4.7" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/oxygen/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
index fa0413746..42adace3a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
index e60b7b556..20ade8676 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
@@ -1,7 +1,7 @@
target "jgit-4.8" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/photon/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
index 4db5e3b1c..c48d691e6 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
@@ -1,7 +1,7 @@
-
+
@@ -39,8 +39,8 @@
-
-
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
index af62db9ec..3b082331a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
@@ -1,7 +1,7 @@
target "jgit-4.9" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/I20200506000552.tpd"
+include "orbit/S20200519202422.tpd"
location "https://download.eclipse.org/releases/2018-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200506000552.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20200519202422.tpd
similarity index 95%
rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200506000552.tpd
rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20200519202422.tpd
index 5edb2fc4c..abe97e1fd 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200506000552.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20200519202422.tpd
@@ -1,7 +1,7 @@
-target "I20200506000552" with source configurePhase
+target "S20200519202422" with source configurePhase
// see https://download.eclipse.org/tools/orbit/downloads/
-location "https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository" {
+location "https://download.eclipse.org/tools/orbit/downloads/drops/S20200519202422/repository" {
com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
@@ -18,8 +18,8 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I202005060005
net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
- org.apache.ant [1.10.7.v20190926-0324,1.10.7.v20190926-0324]
- org.apache.ant.source [1.10.7.v20190926-0324,1.10.7.v20190926-0324]
+ org.apache.ant [1.10.8.v20200515-1239,1.10.8.v20200515-1239]
+ org.apache.ant.source [1.10.8.v20200515-1239,1.10.8.v20200515-1239]
org.apache.commons.codec [1.13.0.v20200108-0001,1.13.0.v20200108-0001]
org.apache.commons.codec.source [1.13.0.v20200108-0001,1.13.0.v20200108-0001]
org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343]
From 97e660e1a54b2bae4b5e830ad45c3d7b9ea9ea21 Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Wed, 20 May 2020 16:13:40 +0200
Subject: [PATCH 19/55] Log stack trace if CachingKeyPairProvider hits
unexpected exception
Log the stack trace in order to help understanding the bug 563380
Bug: 563380
Change-Id: If993a63ccec5042b10e1d5e945b18f4b5f06d8ff
Signed-off-by: Matthias Sohn
---
.../jgit/internal/transport/sshd/CachingKeyPairProvider.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
index 2ce69901c..79b3637ca 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
@@ -170,7 +170,7 @@ public class CachingKeyPairProvider extends FileKeyPairProvider
} catch (CancellationException cancelled) {
throw cancelled;
} catch (Exception other) {
- log.warn(other.toString());
+ log.warn(other.getMessage(), other);
}
}
return nextItem != null;
From f17cb089aa3f8b72c9a9acd5ff2e1a3a5e977c76 Mon Sep 17 00:00:00 2001
From: David Ostrovsky
Date: Sun, 6 Oct 2019 15:28:44 +0200
Subject: [PATCH 20/55] Bazel: Remove superfluous dependencies flagged by
unused_deps
Bazel buildtools project includes in addition to buildifier also unused
deps and buildozer utilities, that detect unused dependencies and fix
them by applying the removal to the build files. This change is created
by installing unused_deps from buildtools@HEAD and running:
$ unused_deps //...
and applying the suggested modifications.
Change-Id: Iad74ec2fa719475b29391586f40b13ae30477004
Signed-off-by: David Ostrovsky
---
org.eclipse.jgit.http.test/BUILD | 2 --
org.eclipse.jgit.lfs.test/BUILD | 2 --
org.eclipse.jgit.pgm.test/BUILD | 1 -
org.eclipse.jgit.pgm/BUILD | 2 +-
4 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/org.eclipse.jgit.http.test/BUILD b/org.eclipse.jgit.http.test/BUILD
index 09316adc6..732b4fae2 100644
--- a/org.eclipse.jgit.http.test/BUILD
+++ b/org.eclipse.jgit.http.test/BUILD
@@ -37,9 +37,7 @@ java_library(
deps = [
"//lib:junit",
"//lib:servlet-api",
- "//org.eclipse.jgit.http.server:jgit-servlet",
"//org.eclipse.jgit:jgit",
- "//org.eclipse.jgit.junit.http:junit-http",
"//org.eclipse.jgit.junit:junit",
],
)
diff --git a/org.eclipse.jgit.lfs.test/BUILD b/org.eclipse.jgit.lfs.test/BUILD
index ee2402aee..061ecd71f 100644
--- a/org.eclipse.jgit.lfs.test/BUILD
+++ b/org.eclipse.jgit.lfs.test/BUILD
@@ -25,8 +25,6 @@ java_library(
srcs = glob(["src/**/*.java"]),
deps = [
"//lib:junit",
- "//org.eclipse.jgit:jgit",
- "//org.eclipse.jgit.junit:junit",
"//org.eclipse.jgit.lfs:jgit-lfs",
],
)
diff --git a/org.eclipse.jgit.pgm.test/BUILD b/org.eclipse.jgit.pgm.test/BUILD
index 86413b5ff..539d66688 100644
--- a/org.eclipse.jgit.pgm.test/BUILD
+++ b/org.eclipse.jgit.pgm.test/BUILD
@@ -21,7 +21,6 @@ junit_tests(
"//lib:slf4j-api",
"//lib:slf4j-simple",
"//lib:xz",
- "//org.eclipse.jgit.archive:jgit-archive",
"//org.eclipse.jgit:jgit",
"//org.eclipse.jgit.junit:junit",
"//org.eclipse.jgit.pgm:pgm",
diff --git a/org.eclipse.jgit.pgm/BUILD b/org.eclipse.jgit.pgm/BUILD
index 18607ea6e..3ff55e43c 100644
--- a/org.eclipse.jgit.pgm/BUILD
+++ b/org.eclipse.jgit.pgm/BUILD
@@ -6,8 +6,8 @@ java_library(
resource_strip_prefix = "org.eclipse.jgit.pgm/resources",
resources = glob(["resources/**"]),
visibility = ["//visibility:public"],
+ runtime_deps = [":services"],
deps = [
- ":services",
"//lib:args4j",
"//lib:commons-logging",
"//lib:httpclient",
From 3c34e0acbfcac236daaf746690130c6e99a8e524 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Mon, 23 Mar 2020 16:55:35 +0100
Subject: [PATCH 21/55] Attributes: fix handling of text=auto in combination
with eol
In Git 2.10.0 the interpretation of gitattributes changed or was fixed
such that "* text=auto eol=crlf" would indeed still do auto-detection
of text vs. binary content.[1] Previously this was identical to
"* text eol=crlf", i.e., treating all files as text.
JGit still did the latter, which caused surprises because it changed
binary files.
[1] https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248
Bug: 561341
Change-Id: I5b6fb97b5e86fd950a98537b6b8574f768ae30e5
Signed-off-by: Thomas Wolf
---
.../org/eclipse/jgit/attributes/add.png | Bin 0 -> 366 bytes
.../jgit/attributes/AttributeFileTests.java | 107 ++++++++++++++++++
.../jgit/util/io/EolStreamTypeUtil.java | 17 +--
3 files changed, 117 insertions(+), 7 deletions(-)
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/attributes/add.png
create mode 100644 org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/attributes/add.png b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/attributes/add.png
new file mode 100644
index 0000000000000000000000000000000000000000..c6aeae4d462dd0c8f31506fbd5b1657fc51c459b
GIT binary patch
literal 366
zcmV-!0g?WRP)s0KuLhCE+?CHy}zc-p?O|6y$*s0MhH1pM-=_WumSi4y`o&pI3MAA~!0
z`u_)teSyjOR0ezl((7;rs6&B=f^VJI^VXxD|3SEPgV%qz63^8{Mb%7
literal 0
HcmV?d00001
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java
new file mode 100644
index 000000000..7b90dcda0
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2020 Thomas Wolf 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.attributes;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.Arrays;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.ResetCommand.ResetType;
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheEntry;
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.util.IO;
+import org.eclipse.jgit.util.RawParseUtils;
+import org.junit.Test;
+
+/**
+ * End-to-end tests for some attribute combinations. Writes files, commit them,
+ * examines the index, deletes the files, performs a hard reset and checks file
+ * contents again.
+ */
+public class AttributeFileTests extends RepositoryTestCase {
+
+ @Test
+ public void testTextAutoEolLf() throws Exception {
+ writeTrashFile(".gitattributes", "* text=auto eol=lf");
+ performTest("Test\r\nFile", "Test\nFile", "Test\nFile");
+ }
+
+ @Test
+ public void testTextAutoEolCrLf() throws Exception {
+ writeTrashFile(".gitattributes", "* text=auto eol=crlf");
+ performTest("Test\r\nFile", "Test\nFile", "Test\r\nFile");
+ }
+
+ private void performTest(String initial, String index, String finalText)
+ throws Exception {
+ File dummy = writeTrashFile("dummy.foo", initial);
+ byte[] data = readTestResource("add.png");
+ assertTrue("Expected some binary data", data.length > 100);
+ File binary = writeTrashFile("add.png", "");
+ Files.write(binary.toPath(), data);
+ try (Git git = Git.wrap(db)) {
+ git.add().addFilepattern(".").call();
+ git.commit().setMessage("test commit").call();
+ // binary should be unchanged, dummy should match "index"
+ verifyIndexContent("dummy.foo",
+ index.getBytes(StandardCharsets.UTF_8));
+ verifyIndexContent("add.png", data);
+ assertTrue("Should be able to delete " + dummy, dummy.delete());
+ assertTrue("Should be able to delete " + binary, binary.delete());
+ git.reset().setMode(ResetType.HARD).call();
+ assertTrue("File " + dummy + " should exist", dummy.isFile());
+ assertTrue("File " + binary + " should exist", binary.isFile());
+ // binary should be unchanged, dummy should match "finalText"
+ String textFile = RawParseUtils.decode(IO.readFully(dummy, 512));
+ assertEquals("Unexpected text content", finalText, textFile);
+ byte[] binaryFile = IO.readFully(binary, 512);
+ assertArrayEquals("Unexpected binary content", data, binaryFile);
+ }
+ }
+
+ private byte[] readTestResource(String name) throws Exception {
+ try (InputStream in = new BufferedInputStream(
+ getClass().getResourceAsStream(name))) {
+ byte[] data = new byte[512];
+ int read = in.read(data);
+ if (read == data.length) {
+ return data;
+ }
+ return Arrays.copyOf(data, read);
+ }
+ }
+
+ private void verifyIndexContent(String path, byte[] expectedContent)
+ throws Exception {
+ DirCache dc = db.readDirCache();
+ for (int i = 0; i < dc.getEntryCount(); ++i) {
+ DirCacheEntry entry = dc.getEntry(i);
+ if (path.equals(entry.getPathString())) {
+ byte[] data = db.open(entry.getObjectId(), Constants.OBJ_BLOB)
+ .getCachedBytes();
+ assertArrayEquals("Unexpected index content for " + path,
+ expectedContent, data);
+ return;
+ }
+ }
+ fail("Path not found in index: " + path);
+ }
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java
index deab4e67a..a6acb40ee 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java
@@ -140,19 +140,19 @@ public final class EolStreamTypeUtil {
}
// new git system
+ if ("auto".equals(attrs.getValue("text"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ return EolStreamType.AUTO_LF;
+ }
+
String eol = attrs.getValue("eol"); //$NON-NLS-1$
- if (eol != null)
+ if (eol != null) {
// check-in is always normalized to LF
return EolStreamType.TEXT_LF;
-
+ }
if (attrs.isSet("text")) { //$NON-NLS-1$
return EolStreamType.TEXT_LF;
}
- if ("auto".equals(attrs.getValue("text"))) { //$NON-NLS-1$ //$NON-NLS-2$
- return EolStreamType.AUTO_LF;
- }
-
switch (options.getAutoCRLF()) {
case TRUE:
case INPUT:
@@ -205,7 +205,10 @@ public final class EolStreamTypeUtil {
// new git system
String eol = attrs.getValue("eol"); //$NON-NLS-1$
if (eol != null) {
- if ("crlf".equals(eol)) {//$NON-NLS-1$
+ if ("crlf".equals(eol)) { //$NON-NLS-1$
+ if ("auto".equals(attrs.getValue("text"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ return EolStreamType.AUTO_CRLF;
+ }
return EolStreamType.TEXT_CRLF;
} else if ("lf".equals(eol)) { //$NON-NLS-1$
return EolStreamType.DIRECT;
From 3dbd1f2fe70f6f0ca25ad4278cb976e0d2ddb65a Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Wed, 8 Apr 2020 00:07:47 +0200
Subject: [PATCH 22/55] Ignore core.eol if core.autocrlf=input
Config core.eol is to be ignored if core.autocrlf is true or input.[1]
JGit didn't do so when core.autocrlf=input was set.
[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreeol
Bug: 561877
Change-Id: I5e62e0510d160b5113c1090319af09c2bc1bcb59
Signed-off-by: Thomas Wolf
---
.../jgit/attributes/AttributeFileTests.java | 32 +++++++++++++++++++
.../jgit/util/io/EolStreamTypeUtil.java | 2 ++
2 files changed, 34 insertions(+)
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java
index 7b90dcda0..5d05a98d6 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java
@@ -26,7 +26,9 @@ import org.eclipse.jgit.api.ResetCommand.ResetType;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.IO;
import org.eclipse.jgit.util.RawParseUtils;
import org.junit.Test;
@@ -38,6 +40,36 @@ import org.junit.Test;
*/
public class AttributeFileTests extends RepositoryTestCase {
+ @Test
+ public void testTextAutoCoreEolCoreAutoCrLfInput() throws Exception {
+ FileBasedConfig cfg = db.getConfig();
+ cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+ ConfigConstants.CONFIG_KEY_AUTOCRLF, false);
+ cfg.save();
+ final String content = "Line1\nLine2\n";
+ try (Git git = Git.wrap(db)) {
+ writeTrashFile(".gitattributes", "* text=auto");
+ File dummy = writeTrashFile("dummy.txt", content);
+ git.add().addFilepattern(".").call();
+ git.commit().setMessage("Commit with LF").call();
+ assertEquals("Unexpected index state",
+ "[.gitattributes, mode:100644, content:* text=auto]"
+ + "[dummy.txt, mode:100644, content:" + content
+ + ']',
+ indexState(CONTENT));
+ assertTrue("Should be able to delete " + dummy, dummy.delete());
+ cfg.setString(ConfigConstants.CONFIG_CORE_SECTION, null,
+ ConfigConstants.CONFIG_KEY_EOL, "crlf");
+ cfg.setString(ConfigConstants.CONFIG_CORE_SECTION, null,
+ ConfigConstants.CONFIG_KEY_AUTOCRLF, "input");
+ cfg.save();
+ git.reset().setMode(ResetType.HARD).call();
+ assertTrue("File " + dummy + "should exist", dummy.isFile());
+ String textFile = RawParseUtils.decode(IO.readFully(dummy, 512));
+ assertEquals("Unexpected text content", content, textFile);
+ }
+ }
+
@Test
public void testTextAutoEolLf() throws Exception {
writeTrashFile(".gitattributes", "* text=auto eol=lf");
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java
index a6acb40ee..c33c869b6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java
@@ -168,6 +168,8 @@ public final class EolStreamTypeUtil {
switch (options.getAutoCRLF()) {
case TRUE:
return EolStreamType.TEXT_CRLF;
+ case INPUT:
+ return EolStreamType.DIRECT;
default:
// no decision
}
From bdb7357228c6611cea2d266255c7751bd9ed368e Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Wed, 13 May 2020 20:06:23 +0200
Subject: [PATCH 23/55] TransportHttp: abort on time-out or on SocketException
Avoid trying other authentication methods on SocketException or on
InterruptedIOException. SocketException is rather fatal, such as
nothing listening on the peer's port, connection reset, or it could
be a connection time-out.
Time-outs enforced by Timeout{Input,Output}Stream may result in
InterruptedIOException being thrown.
In both cases, it makes no sense to try other authentication methods,
and doing so may wrongly report "authentication not supported" or
"cannot open git-upload-pack" or some such instead of reporting a
time-out.
Bug: 563138
Change-Id: I0191b1e784c2471035e550205abd06ec9934fd00
Signed-off-by: Thomas Wolf
---
.../http/test/SmartClientSmartServerTest.java | 76 +++++++++++++++++++
.../eclipse/jgit/transport/TransportHttp.java | 14 ++++
2 files changed, 90 insertions(+)
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
index 51a7a8ddc..8d1870a87 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
@@ -112,6 +112,10 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
private URIish authOnPostURI;
+ private URIish slowURI;
+
+ private URIish slowAuthURI;
+
private RevBlob A_txt;
private RevCommit A, B, unreachableCommit;
@@ -152,6 +156,10 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
ServletContextHandler authOnPost = addAuthContext(gs, "pauth", "POST");
+ ServletContextHandler slow = addSlowContext(gs, "slow", false);
+
+ ServletContextHandler slowAuth = addSlowContext(gs, "slowAuth", true);
+
server.setUp();
remoteRepository = src.getRepository();
@@ -160,6 +168,8 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
redirectURI = toURIish(redirect, srcName);
authURI = toURIish(auth, srcName);
authOnPostURI = toURIish(authOnPost, srcName);
+ slowURI = toURIish(slow, srcName);
+ slowAuthURI = toURIish(slowAuth, srcName);
A_txt = src.blob("A");
A = src.commit().add("A_txt", A_txt).create();
@@ -372,6 +382,43 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
return redirect;
}
+ private ServletContextHandler addSlowContext(GitServlet gs, String path,
+ boolean auth) {
+ ServletContextHandler slow = server.addContext('/' + path);
+ slow.addFilter(new FilterHolder(new Filter() {
+
+ @Override
+ public void init(FilterConfig filterConfig)
+ throws ServletException {
+ // empty
+ }
+
+ // Simply delays the servlet for two seconds. Used for timeout
+ // tests, which use a one-second timeout.
+ @Override
+ public void doFilter(ServletRequest request,
+ ServletResponse response, FilterChain chain)
+ throws IOException, ServletException {
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ throw new IOException(e);
+ }
+ chain.doFilter(request, response);
+ }
+
+ @Override
+ public void destroy() {
+ // empty
+ }
+ }), "/*", EnumSet.of(DispatcherType.REQUEST));
+ slow.addServlet(new ServletHolder(gs), "/*");
+ if (auth) {
+ return server.authBasic(slow);
+ }
+ return slow;
+ }
+
@Test
public void testListRemote() throws IOException {
assertEquals("http", remoteURI.getScheme());
@@ -488,6 +535,35 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
}
}
+ @Test
+ public void testTimeoutExpired() throws Exception {
+ try (Repository dst = createBareRepository();
+ Transport t = Transport.open(dst, slowURI)) {
+ t.setTimeout(1);
+ TransportException expected = assertThrows(TransportException.class,
+ () -> t.fetch(NullProgressMonitor.INSTANCE,
+ mirror(master)));
+ assertTrue("Unexpected exception message: " + expected.toString(),
+ expected.getMessage().contains("time"));
+ }
+ }
+
+ @Test
+ public void testTimeoutExpiredWithAuth() throws Exception {
+ try (Repository dst = createBareRepository();
+ Transport t = Transport.open(dst, slowAuthURI)) {
+ t.setTimeout(1);
+ t.setCredentialsProvider(testCredentials);
+ TransportException expected = assertThrows(TransportException.class,
+ () -> t.fetch(NullProgressMonitor.INSTANCE,
+ mirror(master)));
+ assertTrue("Unexpected exception message: " + expected.toString(),
+ expected.getMessage().contains("time"));
+ assertFalse("Unexpected exception message: " + expected.toString(),
+ expected.getMessage().contains("auth"));
+ }
+ }
+
@Test
public void testInitialClone_Small() throws Exception {
try (Repository dst = createBareRepository();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
index c3c1f2a40..16169f028 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -39,11 +39,13 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.InterruptedIOException;
import java.io.OutputStream;
import java.net.HttpCookie;
import java.net.MalformedURLException;
import java.net.Proxy;
import java.net.ProxySelector;
+import java.net.SocketException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
@@ -573,6 +575,14 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
}
} catch (NotSupportedException | TransportException e) {
throw e;
+ } catch (InterruptedIOException e) {
+ // Timeout!? Don't try other authentication methods.
+ throw new TransportException(uri, MessageFormat.format(
+ JGitText.get().connectionTimeOut, u.getHost()), e);
+ } catch (SocketException e) {
+ // Nothing on other end, timeout, connection reset, ...
+ throw new TransportException(uri,
+ JGitText.get().connectionFailed, e);
} catch (SSLHandshakeException e) {
handleSslFailure(e);
continue; // Re-try
@@ -1501,6 +1511,10 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
} catch (SSLHandshakeException e) {
handleSslFailure(e);
continue; // Re-try
+ } catch (SocketException | InterruptedIOException e) {
+ // Timeout!? Must propagate; don't try other authentication
+ // methods.
+ throw e;
} catch (IOException e) {
if (authenticator == null || authMethod
.getType() != HttpAuthMethod.Type.NONE) {
From 3a499606b1d8f18cb129cd47e63dd17f54e80def Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Thu, 23 Apr 2020 18:30:19 +0200
Subject: [PATCH 24/55] Builder API to configure SshdSessionFactories
A builder API provides a more convenient way to define a customized
SshdSessionFactory by hiding the subclassing.
Also provide a new interface SshConfigStore to abstract away the
specifics of reading a ssh config file, and provide a way to customize
the concrete ssh config implementation to be used. This facilitates
using an alternate ssh config implementation that may or may not be
based on files.
Change-Id: Ib9038e8ff2a4eb3a9ce7b3554d1450befec8e1e1
Signed-off-by: Thomas Wolf
---
.../transport/sshd/NoFilesSshBuilderTest.java | 163 ++++++++
.../jgit/transport/sshd/NoFilesSshTest.java | 1 -
.../transport/sshd/JGitSshConfig.java | 58 +--
.../transport/sshd/SshdSessionFactory.java | 55 ++-
.../sshd/SshdSessionFactoryBuilder.java | 393 ++++++++++++++++++
.../transport/ssh/OpenSshConfigFile.java | 14 +-
.../jgit/transport/SshConfigStore.java | 114 +++++
7 files changed, 746 insertions(+), 52 deletions(-)
create mode 100644 org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
create mode 100644 org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java
create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
new file mode 100644
index 000000000..04208fef3
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2020 Thomas Wolf 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.sshd;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.net.InetSocketAddress;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.security.GeneralSecurityException;
+import java.security.KeyPair;
+import java.security.PublicKey;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.sshd.common.NamedResource;
+import org.apache.sshd.common.config.keys.KeyUtils;
+import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
+import org.apache.sshd.common.session.SessionContext;
+import org.apache.sshd.common.util.net.SshdSocketAddress;
+import org.apache.sshd.common.util.security.SecurityUtils;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.SshSessionFactory;
+import org.eclipse.jgit.transport.ssh.SshTestHarness;
+import org.eclipse.jgit.util.FS;
+import org.junit.After;
+import org.junit.Test;
+
+/**
+ * Test for using the SshdSessionFactory without files in ~/.ssh but with an
+ * in-memory setup, creating the factory via the builder API.
+ */
+public class NoFilesSshBuilderTest extends SshTestHarness {
+
+ private PublicKey testServerKey;
+
+ private KeyPair testUserKey;
+
+ @Override
+ protected SshSessionFactory createSessionFactory() {
+ return new SshdSessionFactoryBuilder() //
+ .setConfigStoreFactory((h, f, u) -> null)
+ .setDefaultKeysProvider(f -> new KeyAuthenticator())
+ .setServerKeyDatabase((h, s) -> new ServerKeyDatabase() {
+
+ @Override
+ public List lookup(String connectAddress,
+ InetSocketAddress remoteAddress,
+ Configuration config) {
+ return Collections.singletonList(testServerKey);
+ }
+
+ @Override
+ public boolean accept(String connectAddress,
+ InetSocketAddress remoteAddress,
+ PublicKey serverKey, Configuration config,
+ CredentialsProvider provider) {
+ return KeyUtils.compareKeys(serverKey, testServerKey);
+ }
+
+ }) //
+ .setPreferredAuthentications("publickey")
+ .setHomeDirectory(FS.DETECTED.userHome())
+ .setSshDirectory(sshDir) //
+ .build(new JGitKeyCache());
+ }
+
+ private class KeyAuthenticator
+ implements KeyIdentityProvider, Iterable {
+
+ @Override
+ public Iterator iterator() {
+ // Should not be called. The use of the Iterable interface in
+ // SshdSessionFactory.getDefaultKeys() made sense in sshd 2.0.0,
+ // but sshd 2.2.0 added the SessionContext, which although good
+ // (without it we couldn't check here) breaks the Iterable analogy.
+ // But we're stuck now with that interface for getDefaultKeys, and
+ // so this override throwing an exception is unfortunately needed.
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Iterable loadKeys(SessionContext session)
+ throws IOException, GeneralSecurityException {
+ if (!TEST_USER.equals(session.getUsername())) {
+ return Collections.emptyList();
+ }
+ SshdSocketAddress remoteAddress = SshdSocketAddress
+ .toSshdSocketAddress(session.getRemoteAddress());
+ switch (remoteAddress.getHostName()) {
+ case "localhost":
+ case "127.0.0.1":
+ return Collections.singletonList(testUserKey);
+ default:
+ return Collections.emptyList();
+ }
+ }
+ }
+
+ @After
+ public void cleanUp() {
+ testServerKey = null;
+ testUserKey = null;
+ }
+
+ @Override
+ protected void installConfig(String... config) {
+ File configFile = new File(sshDir, Constants.CONFIG);
+ if (config != null) {
+ try {
+ Files.write(configFile.toPath(), Arrays.asList(config));
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+ }
+
+ private KeyPair load(Path path) throws Exception {
+ try (InputStream in = Files.newInputStream(path)) {
+ return SecurityUtils
+ .loadKeyPairIdentities(null,
+ NamedResource.ofName(path.toString()), in, null)
+ .iterator().next();
+ }
+ }
+
+ @Test
+ public void testCloneWithBuiltInKeys() throws Exception {
+ // This test should fail unless our in-memory setup is taken: no
+ // known_hosts file, and a config that specifies a non-existing key.
+ File newHostKey = new File(getTemporaryDirectory(), "newhostkey");
+ copyTestResource("id_ed25519", newHostKey);
+ server.addHostKey(newHostKey.toPath(), true);
+ testServerKey = load(newHostKey.toPath()).getPublic();
+ assertTrue(newHostKey.delete());
+ testUserKey = load(privateKey1.getAbsoluteFile().toPath());
+ assertNotNull(testServerKey);
+ assertNotNull(testUserKey);
+ cloneWith(
+ "ssh://" + TEST_USER + "@localhost:" + testPort
+ + "/doesntmatter",
+ new File(getTemporaryDirectory(), "cloned"), null, //
+ "Host localhost", //
+ "IdentityFile "
+ + new File(sshDir, "does_not_exist").getAbsolutePath());
+ }
+
+}
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
index 608f647bc..fa026a5c0 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
@@ -47,7 +47,6 @@ import org.junit.Test;
*/
public class NoFilesSshTest extends SshTestHarness {
-
private PublicKey testServerKey;
private KeyPair testUserKey;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java
index e770134fa..97e0fcc7d 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018, Thomas Wolf and others
+ * Copyright (C) 2018, 2020 Thomas Wolf 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
@@ -12,7 +12,6 @@ package org.eclipse.jgit.internal.transport.sshd;
import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.flag;
import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.positive;
-import java.io.File;
import java.io.IOException;
import java.net.SocketAddress;
import java.util.Map;
@@ -22,61 +21,36 @@ import org.apache.sshd.client.config.hosts.HostConfigEntry;
import org.apache.sshd.client.config.hosts.HostConfigEntryResolver;
import org.apache.sshd.common.AttributeRepository;
import org.apache.sshd.common.util.net.SshdSocketAddress;
-import org.eclipse.jgit.annotations.NonNull;
-import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile;
-import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.HostEntry;
+import org.eclipse.jgit.transport.SshConfigStore;
import org.eclipse.jgit.transport.SshConstants;
+import org.eclipse.jgit.transport.SshSessionFactory;
/**
- * A {@link HostConfigEntryResolver} adapted specifically for JGit.
- *
- * We use our own config file parser and entry resolution since the default
- * {@link org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver
- * ConfigFileHostEntryResolver} has a number of problems:
- *
- *
- * - It does case-insensitive pattern matching. Matching in OpenSsh is
- * case-sensitive! Compare also bug 531118.
- * - It only merges values from the global items (before the first "Host"
- * line) into the host entries. Otherwise it selects the most specific match.
- * OpenSsh processes all entries in the order they appear in the file
- * and whenever one matches, it updates values as appropriate.
- * - We have to ensure that ~ replacement uses the same HOME directory as
- * JGit. Compare bug bug 526175.
- *
- * Therefore, this re-uses the parsing and caching from
- * {@link OpenSshConfigFile}.
- *
+ * A bridge between a JGit {@link SshConfigStore} and the Apache MINA sshd
+ * {@link HostConfigEntryResolver}.
*/
public class JGitSshConfig implements HostConfigEntryResolver {
- private final OpenSshConfigFile configFile;
-
- private final String localUserName;
+ private final SshConfigStore configFile;
/**
- * Creates a new {@link OpenSshConfigFile} that will read the config from
- * file {@code config} use the given file {@code home} as "home" directory.
+ * Creates a new {@link JGitSshConfig} that will read the config from the
+ * given {@link SshConfigStore}.
*
- * @param home
- * user's home directory for the purpose of ~ replacement
- * @param config
- * file to load; may be {@code null} if no ssh config file
- * handling is desired
- * @param localUserName
- * user name of the current user on the local host OS
+ * @param store
+ * to use
*/
- public JGitSshConfig(@NonNull File home, File config,
- @NonNull String localUserName) {
- this.localUserName = localUserName;
- configFile = config == null ? null : new OpenSshConfigFile(home, config, localUserName);
+ public JGitSshConfig(SshConfigStore store) {
+ configFile = store;
}
@Override
public HostConfigEntry resolveEffectiveHost(String host, int port,
SocketAddress localAddress, String username,
AttributeRepository attributes) throws IOException {
- HostEntry entry = configFile == null ? new HostEntry() : configFile.lookup(host, port, username);
+ SshConfigStore.HostConfig entry = configFile == null
+ ? SshConfigStore.EMPTY_CONFIG
+ : configFile.lookup(host, port, username);
JGitHostConfigEntry config = new JGitHostConfigEntry();
// Apache MINA conflates all keys, even multi-valued ones, in one map
// and puts multiple values separated by commas in one string. See
@@ -102,7 +76,7 @@ public class JGitSshConfig implements HostConfigEntryResolver {
String user = username != null && !username.isEmpty() ? username
: entry.getValue(SshConstants.USER);
if (user == null || user.isEmpty()) {
- user = localUserName;
+ user = SshSessionFactory.getLocalUserName();
}
config.setUsername(user);
config.setProperty(SshConstants.USER, user);
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
index 4c1b49b67..cb6b7d674 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
@@ -39,6 +39,7 @@ import org.apache.sshd.common.config.keys.loader.openssh.kdf.BCryptKdfOptions;
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.errors.TransportException;
+import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile;
import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider;
import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory;
import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory;
@@ -50,6 +51,7 @@ import org.eclipse.jgit.internal.transport.sshd.OpenSshServerKeyDatabase;
import org.eclipse.jgit.internal.transport.sshd.PasswordProviderWrapper;
import org.eclipse.jgit.internal.transport.sshd.SshdText;
import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.SshConfigStore;
import org.eclipse.jgit.transport.SshConstants;
import org.eclipse.jgit.transport.SshSessionFactory;
import org.eclipse.jgit.transport.URIish;
@@ -327,8 +329,8 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
@NonNull File homeDir, @NonNull File sshDir) {
return defaultHostConfigEntryResolver.computeIfAbsent(
new Tuple(new Object[] { homeDir, sshDir }),
- t -> new JGitSshConfig(homeDir, getSshConfig(sshDir),
- getLocalUserName()));
+ t -> new JGitSshConfig(createSshConfigStore(homeDir,
+ getSshConfig(sshDir), getLocalUserName())));
}
/**
@@ -347,7 +349,29 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
}
/**
- * Obtain a {@link ServerKeyDatabase} to verify server host keys. The
+ * Obtains a {@link SshConfigStore}, or {@code null} if not SSH config is to
+ * be used. The default implementation returns {@code null} if
+ * {@code configFile == null} and otherwise an OpenSSH-compatible store
+ * reading host entries from the given file.
+ *
+ * @param homeDir
+ * may be used for ~-replacements by the returned config store
+ * @param configFile
+ * to use, or {@code null} if none
+ * @param localUserName
+ * user name of the current user on the local OS
+ * @return A {@link SshConfigStore}, or {@code null} if none is to be used
+ *
+ * @since 5.8
+ */
+ protected SshConfigStore createSshConfigStore(@NonNull File homeDir,
+ File configFile, String localUserName) {
+ return configFile == null ? null
+ : new OpenSshConfigFile(homeDir, configFile, localUserName);
+ }
+
+ /**
+ * Obtains a {@link ServerKeyDatabase} to verify server host keys. The
* default implementation returns a {@link ServerKeyDatabase} that
* recognizes the two openssh standard files {@code ~/.ssh/known_hosts} and
* {@code ~/.ssh/known_hosts2} as well as any files configured via the
@@ -365,10 +389,31 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
@NonNull File sshDir) {
return defaultServerKeyDatabase.computeIfAbsent(
new Tuple(new Object[] { homeDir, sshDir }),
- t -> new OpenSshServerKeyDatabase(true,
- getDefaultKnownHostsFiles(sshDir)));
+ t -> createServerKeyDatabase(homeDir, sshDir));
+
+ }
+ /**
+ * Creates a {@link ServerKeyDatabase} to verify server host keys. The
+ * default implementation returns a {@link ServerKeyDatabase} that
+ * recognizes the two openssh standard files {@code ~/.ssh/known_hosts} and
+ * {@code ~/.ssh/known_hosts2} as well as any files configured via the
+ * {@code UserKnownHostsFile} option in the ssh config file.
+ *
+ * @param homeDir
+ * home directory to use for ~ replacement
+ * @param sshDir
+ * representing ~/.ssh/
+ * @return the {@link ServerKeyDatabase}
+ * @since 5.8
+ */
+ @NonNull
+ protected ServerKeyDatabase createServerKeyDatabase(@NonNull File homeDir,
+ @NonNull File sshDir) {
+ return new OpenSshServerKeyDatabase(true,
+ getDefaultKnownHostsFiles(sshDir));
}
+
/**
* Gets the list of default user known hosts files. The default returns
* ~/.ssh/known_hosts and ~/.ssh/known_hosts2. The ssh config
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java
new file mode 100644
index 000000000..2147c2bd5
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java
@@ -0,0 +1,393 @@
+/*
+ * Copyright (C) 2020 Thomas Wolf 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.sshd;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.security.KeyPair;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+import org.eclipse.jgit.annotations.NonNull;
+import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.SshConfigStore;
+import org.eclipse.jgit.util.StringUtils;
+
+/**
+ * A builder API to configure {@link SshdSessionFactory SshdSessionFactories}.
+ *
+ * @since 5.8
+ */
+public final class SshdSessionFactoryBuilder {
+
+ private final State state = new State();
+
+ /**
+ * Sets the {@link ProxyDataFactory} to use for {@link SshdSessionFactory
+ * SshdSessionFactories} created by {@link #build(KeyCache)}.
+ *
+ * @param proxyDataFactory
+ * to use
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setProxyDataFactory(
+ ProxyDataFactory proxyDataFactory) {
+ this.state.proxyDataFactory = proxyDataFactory;
+ return this;
+ }
+
+ /**
+ * Sets the home directory to use for {@link SshdSessionFactory
+ * SshdSessionFactories} created by {@link #build(KeyCache)}.
+ *
+ * @param homeDirectory
+ * to use; may be {@code null}, in which case the home directory
+ * as defined by {@link org.eclipse.jgit.util.FS#userHome()
+ * FS.userHome()} is assumed
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setHomeDirectory(File homeDirectory) {
+ this.state.homeDirectory = homeDirectory;
+ return this;
+ }
+
+ /**
+ * Sets the SSH directory to use for {@link SshdSessionFactory
+ * SshdSessionFactories} created by {@link #build(KeyCache)}.
+ *
+ * @param sshDirectory
+ * to use; may be {@code null}, in which case ".ssh" under the
+ * {@link #setHomeDirectory(File) home directory} is assumed
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setSshDirectory(File sshDirectory) {
+ this.state.sshDirectory = sshDirectory;
+ return this;
+ }
+
+ /**
+ * Sets the default preferred authentication mechanisms to use for
+ * {@link SshdSessionFactory SshdSessionFactories} created by
+ * {@link #build(KeyCache)}.
+ *
+ * @param authentications
+ * comma-separated list of authentication mechanism names; if
+ * {@code null} or empty, the default as specified by
+ * {@link SshdSessionFactory#getDefaultPreferredAuthentications()}
+ * will be used
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setPreferredAuthentications(
+ String authentications) {
+ this.state.preferredAuthentications = authentications;
+ return this;
+ }
+
+ /**
+ * Sets a function that returns the SSH config file, given the SSH
+ * directory. The function may return {@code null}, in which case no SSH
+ * config file will be used. If a non-null file is returned, it will be used
+ * when it exists. If no supplier has been set, or the supplier has been set
+ * explicitly to {@code null}, by default a file named
+ * {@link org.eclipse.jgit.transport.SshConstants#CONFIG
+ * SshConstants.CONFIG} in the {@link #setSshDirectory(File) SSH directory}
+ * is used.
+ *
+ * @param supplier
+ * returning a {@link File} for the SSH config file to use, or
+ * returning {@code null} if no config file is to be used
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setConfigFile(
+ Function supplier) {
+ this.state.configFileFinder = supplier;
+ return this;
+ }
+
+ /**
+ * A factory interface for creating a @link SshConfigStore}.
+ */
+ @FunctionalInterface
+ public interface ConfigStoreFactory {
+
+ /**
+ * Creates a {@link SshConfigStore}. May return {@code null} if none is
+ * to be used.
+ *
+ * @param homeDir
+ * to use for ~-replacements
+ * @param configFile
+ * to use, may be {@code null} if none
+ * @param localUserName
+ * name of the current user in the local OS
+ * @return the {@link SshConfigStore}, or {@code null} if none is to be
+ * used
+ */
+ SshConfigStore create(@NonNull File homeDir, File configFile,
+ String localUserName);
+ }
+
+ /**
+ * Sets a factory for the {@link SshConfigStore} to use. If not set or
+ * explicitly set to {@code null}, the default as specified by
+ * {@link SshdSessionFactory#createSshConfigStore(File, File, String)} is
+ * used.
+ *
+ * @param factory
+ * to set
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setConfigStoreFactory(
+ ConfigStoreFactory factory) {
+ this.state.configFactory = factory;
+ return this;
+ }
+
+ /**
+ * Sets a function that returns the default known hosts files, given the SSH
+ * directory. If not set or explicitly set to {@code null}, the defaults as
+ * specified by {@link SshdSessionFactory#getDefaultKnownHostsFiles(File)}
+ * are used.
+ *
+ * @param supplier
+ * to get the default known hosts files
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setDefaultKnownHostsFiles(
+ Function> supplier) {
+ this.state.knownHostsFileFinder = supplier;
+ return this;
+ }
+
+ /**
+ * Sets a function that returns the default private key files, given the SSH
+ * directory. If not set or explicitly set to {@code null}, the defaults as
+ * specified by {@link SshdSessionFactory#getDefaultIdentities(File)} are
+ * used.
+ *
+ * @param supplier
+ * to get the default private key files
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setDefaultIdentities(
+ Function> supplier) {
+ this.state.defaultKeyFileFinder = supplier;
+ return this;
+ }
+
+ /**
+ * Sets a function that returns the default private keys, given the SSH
+ * directory. If not set or explicitly set to {@code null}, the defaults as
+ * specified by {@link SshdSessionFactory#getDefaultKeys(File)} are used.
+ *
+ * @param provider
+ * to get the default private key files
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setDefaultKeysProvider(
+ Function> provider) {
+ this.state.defaultKeysProvider = provider;
+ return this;
+ }
+
+ /**
+ * Sets a factory function to create a {@link KeyPasswordProvider}. If not
+ * set or explicitly set to {@code null}, or if the factory returns
+ * {@code null}, the default as specified by
+ * {@link SshdSessionFactory#createKeyPasswordProvider(CredentialsProvider)}
+ * is used.
+ *
+ * @param factory
+ * to create a {@link KeyPasswordProvider}
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setKeyPasswordProvider(
+ Function factory) {
+ this.state.passphraseProviderFactory = factory;
+ return this;
+ }
+
+ /**
+ * Sets a function that creates a new {@link ServerKeyDatabase}, given the
+ * SSH and home directory. If not set or explicitly set to {@code null}, or
+ * if the {@code factory} returns {@code null}, the default as specified by
+ * {@link SshdSessionFactory#createServerKeyDatabase(File, File)} is used.
+ *
+ * @param factory
+ * to create a {@link ServerKeyDatabase}
+ * @return this {@link SshdSessionFactoryBuilder}
+ */
+ public SshdSessionFactoryBuilder setServerKeyDatabase(
+ BiFunction factory) {
+ this.state.serverKeyDatabaseCreator = factory;
+ return this;
+ }
+
+ /**
+ * Builds a {@link SshdSessionFactory} as configured, using the given
+ * {@link KeyCache} for caching keys.
+ *
+ * Different {@link SshdSessionFactory SshdSessionFactories} should
+ * not share the same {@link KeyCache} since the cache is
+ * invalidated when the factory itself or when the last {@link SshdSession}
+ * created from the factory is closed.
+ *
+ *
+ * @param cache
+ * to use for caching ssh keys; may be {@code null} if no caching
+ * is desired.
+ * @return the {@link SshdSessionFactory}
+ */
+ public SshdSessionFactory build(KeyCache cache) {
+ // Use a copy to avoid that subsequent calls to setters affect an
+ // already created SshdSessionFactory.
+ return state.copy().build(cache);
+ }
+
+ private static class State {
+
+ ProxyDataFactory proxyDataFactory;
+
+ File homeDirectory;
+
+ File sshDirectory;
+
+ String preferredAuthentications;
+
+ Function configFileFinder;
+
+ ConfigStoreFactory configFactory;
+
+ Function passphraseProviderFactory;
+
+ Function> knownHostsFileFinder;
+
+ Function> defaultKeyFileFinder;
+
+ Function> defaultKeysProvider;
+
+ BiFunction serverKeyDatabaseCreator;
+
+ State copy() {
+ State c = new State();
+ c.proxyDataFactory = proxyDataFactory;
+ c.homeDirectory = homeDirectory;
+ c.sshDirectory = sshDirectory;
+ c.preferredAuthentications = preferredAuthentications;
+ c.configFileFinder = configFileFinder;
+ c.configFactory = configFactory;
+ c.passphraseProviderFactory = passphraseProviderFactory;
+ c.knownHostsFileFinder = knownHostsFileFinder;
+ c.defaultKeyFileFinder = defaultKeyFileFinder;
+ c.defaultKeysProvider = defaultKeysProvider;
+ c.serverKeyDatabaseCreator = serverKeyDatabaseCreator;
+ return c;
+ }
+
+ SshdSessionFactory build(KeyCache cache) {
+ SshdSessionFactory factory = new SessionFactory(cache,
+ proxyDataFactory);
+ factory.setHomeDirectory(homeDirectory);
+ factory.setSshDirectory(sshDirectory);
+ return factory;
+ }
+
+ private class SessionFactory extends SshdSessionFactory {
+
+ public SessionFactory(KeyCache cache,
+ ProxyDataFactory proxyDataFactory) {
+ super(cache, proxyDataFactory);
+ }
+
+ @Override
+ protected File getSshConfig(File sshDir) {
+ if (configFileFinder != null) {
+ return configFileFinder.apply(sshDir);
+ }
+ return super.getSshConfig(sshDir);
+ }
+
+ @Override
+ protected List getDefaultKnownHostsFiles(File sshDir) {
+ if (knownHostsFileFinder != null) {
+ List result = knownHostsFileFinder.apply(sshDir);
+ return result == null ? Collections.emptyList() : result;
+ }
+ return super.getDefaultKnownHostsFiles(sshDir);
+ }
+
+ @Override
+ protected List getDefaultIdentities(File sshDir) {
+ if (defaultKeyFileFinder != null) {
+ List result = defaultKeyFileFinder.apply(sshDir);
+ return result == null ? Collections.emptyList() : result;
+ }
+ return super.getDefaultIdentities(sshDir);
+ }
+
+ @Override
+ protected String getDefaultPreferredAuthentications() {
+ if (!StringUtils.isEmptyOrNull(preferredAuthentications)) {
+ return preferredAuthentications;
+ }
+ return super.getDefaultPreferredAuthentications();
+ }
+
+ @Override
+ protected Iterable getDefaultKeys(File sshDir) {
+ if (defaultKeysProvider != null) {
+ Iterable result = defaultKeysProvider
+ .apply(sshDir);
+ return result == null ? Collections.emptyList() : result;
+ }
+ return super.getDefaultKeys(sshDir);
+ }
+
+ @Override
+ protected KeyPasswordProvider createKeyPasswordProvider(
+ CredentialsProvider provider) {
+ if (passphraseProviderFactory != null) {
+ KeyPasswordProvider result = passphraseProviderFactory
+ .apply(provider);
+ if (result != null) {
+ return result;
+ }
+ }
+ return super.createKeyPasswordProvider(provider);
+ }
+
+ @Override
+ protected ServerKeyDatabase createServerKeyDatabase(File homeDir,
+ File sshDir) {
+ if (serverKeyDatabaseCreator != null) {
+ ServerKeyDatabase result = serverKeyDatabaseCreator
+ .apply(homeDir, sshDir);
+ if (result != null) {
+ return result;
+ }
+ }
+ return super.createServerKeyDatabase(homeDir, sshDir);
+ }
+
+ @Override
+ protected SshConfigStore createSshConfigStore(File homeDir,
+ File configFile, String localUserName) {
+ if (configFactory != null) {
+ return configFactory.create(homeDir, configFile,
+ localUserName);
+ }
+ return super.createSshConfigStore(homeDir, configFile,
+ localUserName);
+ }
+ }
+ }
+}
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 2fbc9122f..98c63cdcd 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
@@ -32,6 +32,7 @@ import java.util.TreeSet;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.errors.InvalidPatternException;
import org.eclipse.jgit.fnmatch.FileNameMatcher;
+import org.eclipse.jgit.transport.SshConfigStore;
import org.eclipse.jgit.transport.SshConstants;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.StringUtils;
@@ -80,7 +81,7 @@ import org.eclipse.jgit.util.SystemReader;
* @see man
* ssh-config
*/
-public class OpenSshConfigFile {
+public class OpenSshConfigFile implements SshConfigStore {
/**
* "Host" name of the HostEntry for the default options before the first
@@ -152,8 +153,9 @@ public class OpenSshConfigFile {
* the user supplied; <= 0 if none
* @param userName
* the user supplied, may be {@code null} or empty if none given
- * @return r configuration for the requested name.
+ * @return the configuration for the requested name.
*/
+ @Override
@NonNull
public HostEntry lookup(@NonNull String hostName, int port,
String userName) {
@@ -446,7 +448,7 @@ public class OpenSshConfigFile {
* of several matching host entries, %-substitutions, and ~ replacement have
* all been done.
*/
- public static class HostEntry {
+ public static class HostEntry implements SshConfigStore.HostConfig {
/**
* Keys that can be specified multiple times, building up a list. (I.e.,
@@ -489,7 +491,7 @@ public class OpenSshConfigFile {
private Map> listOptions;
/**
- * Retrieves the value of a single-valued key, or the first is the key
+ * Retrieves the value of a single-valued key, or the first if the key
* has multiple values. Keys are case-insensitive, so
* {@code getValue("HostName") == getValue("HOSTNAME")}.
*
@@ -497,6 +499,7 @@ public class OpenSshConfigFile {
* to get the value of
* @return the value, or {@code null} if none
*/
+ @Override
public String getValue(String key) {
String result = options != null ? options.get(key) : null;
if (result == null) {
@@ -524,6 +527,7 @@ public class OpenSshConfigFile {
* to get the values of
* @return a possibly empty list of values
*/
+ @Override
public List getValues(String key) {
List values = listOptions != null ? listOptions.get(key)
: null;
@@ -778,6 +782,7 @@ public class OpenSshConfigFile {
*
* @return all single-valued options
*/
+ @Override
@NonNull
public Map getOptions() {
if (options == null) {
@@ -792,6 +797,7 @@ public class OpenSshConfigFile {
*
* @return all multi-valued options
*/
+ @Override
@NonNull
public Map> getMultiValuedOptions() {
if (listOptions == null && multiOptions == null) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java
new file mode 100644
index 000000000..04a4922bb
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2020, Thomas Wolf 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.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jgit.annotations.NonNull;
+
+/**
+ * An abstraction for a SSH config storage, like the OpenSSH ~/.ssh/config file.
+ *
+ * @since 5.8
+ */
+public interface SshConfigStore {
+
+ /**
+ * Locate the configuration for a specific host request.
+ *
+ * @param hostName
+ * to look up
+ * @param port
+ * the user supplied; <= 0 if none
+ * @param userName
+ * the user supplied, may be {@code null} or empty if none given
+ * @return the configuration for the requested name.
+ */
+ @NonNull
+ HostConfig lookup(@NonNull String hostName, int port, String userName);
+
+ /**
+ * A host entry from the ssh config. Any merging of global values and of
+ * several matching host entries, %-substitutions, and ~ replacement have
+ * all been done.
+ */
+ interface HostConfig {
+
+ /**
+ * Retrieves the value of a single-valued key, or the first if the key
+ * has multiple values. Keys are case-insensitive, so
+ * {@code getValue("HostName") == getValue("HOSTNAME")}.
+ *
+ * @param key
+ * to get the value of
+ * @return the value, or {@code null} if none
+ */
+ String getValue(String key);
+
+ /**
+ * Retrieves the values of a multi- or list-valued key. Keys are
+ * case-insensitive, so
+ * {@code getValue("HostName") == getValue("HOSTNAME")}.
+ *
+ * @param key
+ * to get the values of
+ * @return a possibly empty list of values
+ */
+ List getValues(String key);
+
+ /**
+ * Retrieves an unmodifiable map of all single-valued options, with
+ * case-insensitive lookup by keys.
+ *
+ * @return all single-valued options
+ */
+ @NonNull
+ Map getOptions();
+
+ /**
+ * Retrieves an unmodifiable map of all multi- or list-valued options,
+ * with case-insensitive lookup by keys.
+ *
+ * @return all multi-valued options
+ */
+ @NonNull
+ Map> getMultiValuedOptions();
+
+ }
+
+ /**
+ * An empty {@link HostConfig}.
+ */
+ static final HostConfig EMPTY_CONFIG = new HostConfig() {
+
+ @Override
+ public String getValue(String key) {
+ return null;
+ }
+
+ @Override
+ public List getValues(String key) {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public Map getOptions() {
+ return Collections.emptyMap();
+ }
+
+ @Override
+ public Map> getMultiValuedOptions() {
+ return Collections.emptyMap();
+ }
+
+ };
+}
From 5a5d85a4a3407df5f9693ab36287e72726c512f6 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Sun, 26 Apr 2020 16:43:28 +0200
Subject: [PATCH 25/55] In-memory SSH keys for the "no files" sshd tests
Avoid using a key written to a file. This makes it clearer that
the test does not rely on files being present.
Change-Id: I31cf4f404aab5b891c32fc4bda906b7f8fe03777
Signed-off-by: Thomas Wolf
---
.../jgit/junit/ssh/SshTestGitServer.java | 37 ++++++++++++++++---
.../transport/sshd/NoFilesSshBuilderTest.java | 31 +++++-----------
.../jgit/transport/sshd/NoFilesSshTest.java | 33 ++++++-----------
3 files changed, 52 insertions(+), 49 deletions(-)
diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java
index 883ff0b8b..03e285582 100644
--- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java
+++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018, Thomas Wolf and others
+ * Copyright (C) 2018, 2020 Thomas Wolf 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
@@ -252,11 +252,24 @@ public class SshTestGitServer {
.loadKeyPairIdentities(null,
NamedResource.ofName(key.toString()), in, null)
.iterator().next();
- if (inFront) {
- hostKeys.add(0, pair);
- } else {
- hostKeys.add(pair);
- }
+ addHostKey(pair, inFront);
+ }
+ }
+
+ /**
+ * Adds an additional host key to the server.
+ *
+ * @param key
+ * {@link KeyPair} to add
+ * @param inFront
+ * whether to add the new key before other existing keys
+ * @since 5.8
+ */
+ public void addHostKey(@NonNull KeyPair key, boolean inFront) {
+ if (inFront) {
+ hostKeys.add(0, key);
+ } else {
+ hostKeys.add(key);
}
}
@@ -322,6 +335,18 @@ public class SshTestGitServer {
.resolvePublicKey(null, PublicKeyEntryResolver.IGNORING);
}
+ /**
+ * Sets the test user's public key on the server.
+ *
+ * @param key
+ * to set
+ *
+ * @since 5.8
+ */
+ public void setTestUserPublicKey(@NonNull PublicKey key) {
+ this.testKey = key;
+ }
+
/**
* Sets the lines the server sends before its server identification in the
* initial protocol version exchange.
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
index 04208fef3..e35f45690 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
@@ -10,29 +10,25 @@
package org.eclipse.jgit.transport.sshd;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.io.UncheckedIOException;
import java.net.InetSocketAddress;
import java.nio.file.Files;
-import java.nio.file.Path;
import java.security.GeneralSecurityException;
import java.security.KeyPair;
+import java.security.KeyPairGenerator;
import java.security.PublicKey;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.sshd.common.NamedResource;
import org.apache.sshd.common.config.keys.KeyUtils;
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
import org.apache.sshd.common.session.SessionContext;
import org.apache.sshd.common.util.net.SshdSocketAddress;
-import org.apache.sshd.common.util.security.SecurityUtils;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.CredentialsProvider;
import org.eclipse.jgit.transport.SshSessionFactory;
@@ -130,27 +126,20 @@ public class NoFilesSshBuilderTest extends SshTestHarness {
}
}
- private KeyPair load(Path path) throws Exception {
- try (InputStream in = Files.newInputStream(path)) {
- return SecurityUtils
- .loadKeyPairIdentities(null,
- NamedResource.ofName(path.toString()), in, null)
- .iterator().next();
- }
- }
-
@Test
public void testCloneWithBuiltInKeys() throws Exception {
// This test should fail unless our in-memory setup is taken: no
- // known_hosts file, and a config that specifies a non-existing key.
- File newHostKey = new File(getTemporaryDirectory(), "newhostkey");
- copyTestResource("id_ed25519", newHostKey);
- server.addHostKey(newHostKey.toPath(), true);
- testServerKey = load(newHostKey.toPath()).getPublic();
- assertTrue(newHostKey.delete());
- testUserKey = load(privateKey1.getAbsoluteFile().toPath());
+ // known_hosts file, a config that specifies a non-existing key,
+ // and the test is using a newly generated KeyPairs anyway.
+ KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
+ generator.initialize(2048);
+ testUserKey = generator.generateKeyPair();
+ KeyPair hostKey = generator.generateKeyPair();
+ server.addHostKey(hostKey, true);
+ testServerKey = hostKey.getPublic();
assertNotNull(testServerKey);
assertNotNull(testUserKey);
+ server.setTestUserPublicKey(testUserKey.getPublic());
cloneWith(
"ssh://" + TEST_USER + "@localhost:" + testPort
+ "/doesntmatter",
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
index fa026a5c0..d9352051a 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 Thomas Wolf and others
+ * Copyright (C) 2019, 2020 Thomas Wolf 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
@@ -10,29 +10,25 @@
package org.eclipse.jgit.transport.sshd;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.io.UncheckedIOException;
import java.net.InetSocketAddress;
import java.nio.file.Files;
-import java.nio.file.Path;
import java.security.GeneralSecurityException;
import java.security.KeyPair;
+import java.security.KeyPairGenerator;
import java.security.PublicKey;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.sshd.common.NamedResource;
import org.apache.sshd.common.config.keys.KeyUtils;
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
import org.apache.sshd.common.session.SessionContext;
import org.apache.sshd.common.util.net.SshdSocketAddress;
-import org.apache.sshd.common.util.security.SecurityUtils;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.CredentialsProvider;
import org.eclipse.jgit.transport.SshSessionFactory;
@@ -154,27 +150,20 @@ public class NoFilesSshTest extends SshTestHarness {
}
}
- private KeyPair load(Path path) throws Exception {
- try (InputStream in = Files.newInputStream(path)) {
- return SecurityUtils
- .loadKeyPairIdentities(null,
- NamedResource.ofName(path.toString()), in, null)
- .iterator().next();
- }
- }
-
@Test
public void testCloneWithBuiltInKeys() throws Exception {
// This test should fail unless our in-memory setup is taken: no
- // known_hosts file, and a config that specifies a non-existing key.
- File newHostKey = new File(getTemporaryDirectory(), "newhostkey");
- copyTestResource("id_ed25519", newHostKey);
- server.addHostKey(newHostKey.toPath(), true);
- testServerKey = load(newHostKey.toPath()).getPublic();
- assertTrue(newHostKey.delete());
- testUserKey = load(privateKey1.getAbsoluteFile().toPath());
+ // known_hosts file, a config that specifies a non-existing key,
+ // and the test is using a newly generated KeyPairs anyway.
+ KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
+ generator.initialize(2048);
+ testUserKey = generator.generateKeyPair();
+ KeyPair hostKey = generator.generateKeyPair();
+ server.addHostKey(hostKey, true);
+ testServerKey = hostKey.getPublic();
assertNotNull(testServerKey);
assertNotNull(testUserKey);
+ server.setTestUserPublicKey(testUserKey.getPublic());
cloneWith(
"ssh://" + TEST_USER + "@localhost:" + testPort
+ "/doesntmatter",
From b6087813e0980ab22b39065cc6457d88be94cc4b Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Tue, 26 May 2020 23:36:05 +0200
Subject: [PATCH 26/55] Add 4.16 staging target platform
* replace 4.15 staging by 4.15 release
* add 4.16 staging
Change-Id: I33cc701f0ea6fffeaec898fa50ef536b20102048
Signed-off-by: Matthias Sohn
---
.../jgit-4.15-staging.tpd | 8 --
.../org.eclipse.jgit.target/jgit-4.15.target | 94 +++++++++++++++++++
.../org.eclipse.jgit.target/jgit-4.15.tpd | 8 ++
...taging.target => jgit-4.16-staging.target} | 4 +-
.../jgit-4.16-staging.tpd | 8 ++
5 files changed, 112 insertions(+), 10 deletions(-)
delete mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
rename org.eclipse.jgit.packaging/org.eclipse.jgit.target/{jgit-4.15-staging.target => jgit-4.16-staging.target} (98%)
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd
deleted file mode 100644
index b21bd6af7..000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd
+++ /dev/null
@@ -1,8 +0,0 @@
-target "jgit-4.14-staging" with source configurePhase
-
-include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
-
-location "https://download.eclipse.org/staging/2020-03/" {
- org.eclipse.osgi lazy
-}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
new file mode 100644
index 000000000..f066313c2
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
new file mode 100644
index 000000000..93e1faf62
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.15" with source configurePhase
+
+include "projects/jetty-9.4.x.tpd"
+include "orbit/S20200519202422.tpd"
+
+location "https://download.eclipse.org/releases/2020-03/202003181000/" {
+ org.eclipse.osgi lazy
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
similarity index 98%
rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target
rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
index 09c1e74c9..1dbcd5474 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
@@ -1,7 +1,7 @@
-
+
@@ -88,7 +88,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd
new file mode 100644
index 000000000..7c5f0d6f2
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.15" with source configurePhase
+
+include "projects/jetty-9.4.x.tpd"
+include "orbit/S20200519202422.tpd"
+
+location "https://download.eclipse.org/staging/2020-06/" {
+ org.eclipse.osgi lazy
+}
From efb15a56f7c3d1d2829312ecf98f743d4fcf5828 Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Wed, 27 May 2020 01:57:08 +0200
Subject: [PATCH 27/55] Update jetty to 9.4.28.v20200408
Change-Id: I6fe26c1efcf812de3102ee82ce67f9e0bc3b0135
Signed-off-by: Matthias Sohn
---
WORKSPACE | 26 +++++++-------
.../org.eclipse.jgit.target/jgit-4.10.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.11.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.12.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.13.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.14.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.15.target | 36 +++++++++----------
.../jgit-4.16-staging.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.6.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.7.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.8.target | 36 +++++++++----------
.../org.eclipse.jgit.target/jgit-4.9.target | 36 +++++++++----------
.../projects/jetty-9.4.x.tpd | 34 +++++++++---------
pom.xml | 2 +-
14 files changed, 229 insertions(+), 229 deletions(-)
diff --git a/WORKSPACE b/WORKSPACE
index 630e85ffb..64218b590 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -209,48 +209,48 @@ maven_jar(
sha1 = "3edcfe49d2c6053a70a2a47e4e1c2f94998a49cf",
)
-JETTY_VER = "9.4.25.v20191220"
+JETTY_VER = "9.4.28.v20200408"
maven_jar(
name = "jetty-servlet",
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
- sha1 = "bee77d6a4f87dc90d5bc142cbd6cef470ec46aae",
- src_sha1 = "e8b09b6431fc9cfbff588698ac0262a745fe00e4",
+ sha1 = "7df27a6d73e3094ad94ea4f32e3e6597cecbdf38",
+ src_sha1 = "49da8455dd5760b7c5961df3b1e7d1490ff9723e",
)
maven_jar(
name = "jetty-security",
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
- sha1 = "593ff5b5dfd5bf973184329f5d1209b9a411ec12",
- src_sha1 = "369f869a13a33d25535db3176a84945e94a3718a",
+ sha1 = "d5fe6851f14d1375e4b4ab1818475bfd929cf517",
+ src_sha1 = "204f19ac7e4df9f6f68df1910154d7667ecd78e8",
)
maven_jar(
name = "jetty-server",
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
- sha1 = "5b352c9f9135a1c20e4808e5cb1d84fbddfdc460",
- src_sha1 = "0f3acc2abcdb86491a2c37074592860cb1100269",
+ sha1 = "9c2cbd96426be38b1273ec87ae21e2696688a737",
+ src_sha1 = "83454098deb880ecc7168252578f712c06a5504b",
)
maven_jar(
name = "jetty-http",
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
- sha1 = "c3aa7da362f1a492667ce754ba16b2535b793668",
- src_sha1 = "70ef1436dc895eafe2cc24cf59af6e2d2874d963",
+ sha1 = "dd56750ea7410c925f1fbae973c0a19cce5a0a68",
+ src_sha1 = "1ef8d10cb5ce5694f12650cbb49b31008c673182",
)
maven_jar(
name = "jetty-io",
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
- sha1 = "3eb34b5481012701de0ea9dfaf2bdf1dbb947b16",
- src_sha1 = "ad129617793088aaf69eab18a13c9bce02cb1195",
+ sha1 = "adda6786588a922f834e9c33c7db5f1484310f44",
+ src_sha1 = "4e7756e00b97b439d404e6a682bb1cdeb36fc887",
)
maven_jar(
name = "jetty-util",
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
- sha1 = "fd8b642cc16728f1c36ca6a64653cb1b26ec0232",
- src_sha1 = "c84dc3026cc4aea013dc97b18228756816167745",
+ sha1 = "118d2a44721885a04238aee21a5055dc1ab3818a",
+ src_sha1 = "e2e6d7c90e4126645d2667014d02f0732c08c948",
)
BOUNCYCASTLE_VER = "1.65"
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
index c0a249020..f42e3f37f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
index 09883e054..fb95c1b02 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
index f2e56341a..0a5a4b3cb 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
index bebedb6c8..39cea039f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
index 0e748d510..2b5938cb0 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
index f066313c2..d71cd42ab 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
index 1dbcd5474..f0609c594 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
index 2fd0c3151..9145c15c0 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
index bf79c3196..6d985312b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
index 42adace3a..4ad96015e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
index c48d691e6..69eacd41b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
@@ -1,26 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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
index fb9bb2d00..0eea06d64 100644
--- 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
@@ -1,20 +1,20 @@
target "jetty-9.4.x" with source configurePhase
-location jetty-9.4.25 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/" {
- org.eclipse.jetty.client [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.client.source [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.continuation [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.continuation.source [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.http [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.http.source [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.io [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.io.source [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.security [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.security.source [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.server [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.server.source [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.servlet [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.servlet.source [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.util [9.4.25.v20191220,9.4.25.v20191220]
- org.eclipse.jetty.util.source [9.4.25.v20191220,9.4.25.v20191220]
+location jetty-9.4.25 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/" {
+ org.eclipse.jetty.client [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.client.source [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.continuation [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.continuation.source [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.http [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.http.source [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.io [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.io.source [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.security [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.security.source [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.server [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.server.source [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.servlet [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.servlet.source [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.util [9.4.28.v20200408,9.4.28.v20200408]
+ org.eclipse.jetty.util.source [9.4.28.v20200408,9.4.28.v20200408]
}
diff --git a/pom.xml b/pom.xml
index 694946309..ec5cbc5aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,7 +162,7 @@
1.19
4.3.1
3.1.0
- 9.4.25.v20191220
+ 9.4.28.v20200408
0.14.3
4.5.10
4.4.12
From 06a90fdf2e593897c20dae66081e903e4b1b7574 Mon Sep 17 00:00:00 2001
From: Yunjie Li
Date: Wed, 27 May 2020 10:29:20 -0700
Subject: [PATCH 28/55] Revert "PackBitmapIndex: Not buffer inflated bitmap in
BasePackBitmapIndex"
This reverts commit 3aee92478c2cbc67cd921533437b824e43ed9798, which
increased fetch latency significantly.
Change-Id: Id31a94dff83bf7ab2121718ead819bd08306a0b6
Signed-off-by: Yunjie Li
---
.../eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
index 74b46bcee..c9bb167f0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
@@ -72,6 +72,7 @@ abstract class BasePackBitmapIndex extends PackBitmapIndex {
if (r instanceof EWAHCompressedBitmap) {
out = out.xor((EWAHCompressedBitmap) r);
out.trim();
+ bitmapContainer = out;
return out;
}
xb = (XorCompressedBitmap) r;
From 6f17f9ed3fdadec1e6995f42ca34f570c0dee1b5 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Tue, 26 May 2020 08:50:33 +0200
Subject: [PATCH 29/55] RawTextComparator.WS_IGNORE_CHANGE must not compare
whitespace
Only the presence or absence of whitespace is significant; but not the
actual whitespace characters. Don't compare whitespace bytes.
Compare the C git implementation at [1].
[1] https://github.com/git/git/blob/0d0e1e8/xdiff/xutils.c#L173
Bug: 563570
Change-Id: I2d0522b637ba6b5c8b911b3376a9df5daa9d4c27
Signed-off-by: Thomas Wolf
---
.../RawTextIgnoreWhitespaceChangeTest.java | 28 +++++++++++++++++++
.../eclipse/jgit/diff/RawTextComparator.java | 28 ++++++++-----------
2 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
index b271a048a..73b2a72ac 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
@@ -75,4 +75,32 @@ public class RawTextIgnoreWhitespaceChangeTest {
assertTrue(cmp.equals(a, 5, b, 5));
assertTrue(cmp.equals(b, 5, a, 5));
}
+
+ @Test
+ public void testEqualsWithTabs() {
+ RawText a = new RawText(
+ Constants.encodeASCII("a\tb\t \na\tb\t c \n foo\na b\na b"));
+ RawText b = new RawText(
+ Constants.encodeASCII("a b \na b c\n\tfoo\nab\na \tb"));
+
+ // "a\tb\t \n" == "a b \n"
+ assertTrue(cmp.equals(a, 0, b, 0));
+ assertTrue(cmp.equals(b, 0, a, 0));
+
+ // "a\tb\t c \n" == "a b c\n"
+ assertTrue(cmp.equals(a, 1, b, 1));
+ assertTrue(cmp.equals(b, 1, a, 1));
+
+ // " foo" == "\tfoo"
+ assertTrue(cmp.equals(a, 2, b, 2));
+ assertTrue(cmp.equals(b, 2, a, 2));
+
+ // "a b" != "ab"
+ assertFalse(cmp.equals(a, 3, b, 3));
+ assertFalse(cmp.equals(b, 3, a, 3));
+
+ // "a b" == "a \tb "
+ assertTrue(cmp.equals(a, 4, b, 4));
+ assertTrue(cmp.equals(b, 4, a, 4));
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
index 508d07c20..0c41b8598 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
@@ -191,21 +191,15 @@ public abstract class RawTextComparator extends SequenceComparator {
be = trimTrailingWhitespace(b.content, bs, be);
while (as < ae && bs < be) {
- byte ac = a.content[as];
- byte bc = b.content[bs];
+ byte ac = a.content[as++];
+ byte bc = b.content[bs++];
- if (ac != bc)
- return false;
-
- if (isWhitespace(ac))
+ if (isWhitespace(ac) && isWhitespace(bc)) {
as = trimLeadingWhitespace(a.content, as, ae);
- else
- as++;
-
- if (isWhitespace(bc))
bs = trimLeadingWhitespace(b.content, bs, be);
- else
- bs++;
+ } else if (ac != bc) {
+ return false;
+ }
}
return as == ae && bs == be;
}
@@ -215,12 +209,12 @@ public abstract class RawTextComparator extends SequenceComparator {
int hash = 5381;
end = trimTrailingWhitespace(raw, ptr, end);
while (ptr < end) {
- byte c = raw[ptr];
- hash = ((hash << 5) + hash) + (c & 0xff);
- if (isWhitespace(c))
+ byte c = raw[ptr++];
+ if (isWhitespace(c)) {
ptr = trimLeadingWhitespace(raw, ptr, end);
- else
- ptr++;
+ c = ' ';
+ }
+ hash = ((hash << 5) + hash) + (c & 0xff);
}
return hash;
}
From 089eacb273e98b659d4f2c15721c1524e084ae07 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Fri, 29 May 2020 23:04:44 +0200
Subject: [PATCH 30/55] WindowCache: conditional JMX setup
Make it possible to programmatically suppress the JMX bean
registration. In EGit it is not needed but can be rather costly
because it occurs during plug-in activation and accesses the
git user config.
Bug: 563740
Change-Id: I07ef7ae2f0208d177d2a03862846a8efe0191956
Signed-off-by: Thomas Wolf
---
.../internal/storage/file/WindowCache.java | 4 ++-
.../jgit/storage/file/WindowCacheConfig.java | 36 +++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
index 852302f00..80c8e10de 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
@@ -470,7 +470,9 @@ public class WindowCache {
mbean = new StatsRecorderImpl();
statsRecorder = mbean;
- Monitoring.registerMBean(mbean, "block_cache"); //$NON-NLS-1$
+ if (cfg.getExposeStatsViaJmx()) {
+ Monitoring.registerMBean(mbean, "block_cache"); //$NON-NLS-1$
+ }
if (maxFiles < 1)
throw new IllegalArgumentException(JGitText.get().openFilesMustBeAtLeast1);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
index 221353a91..a12f65259 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
@@ -47,6 +47,8 @@ public class WindowCacheConfig {
private int streamFileThreshold;
+ private boolean exposeStats;
+
/**
* Create a default configuration.
*/
@@ -58,6 +60,7 @@ public class WindowCacheConfig {
packedGitMMAP = false;
deltaBaseCacheLimit = 10 * MB;
streamFileThreshold = PackConfig.DEFAULT_BIG_FILE_THRESHOLD;
+ exposeStats = true;
}
/**
@@ -219,6 +222,39 @@ public class WindowCacheConfig {
streamFileThreshold = newLimit;
}
+ /**
+ * Tell whether the statistics JMX bean should be automatically registered.
+ *
+ * Registration of that bean via JMX is additionally subject to a boolean
+ * JGit-specific user config "jmx.WindowCacheStats". The bean will be
+ * registered only if this user config is {@code true} and
+ * {@code getExposeStatsViaJmx() == true}.
+ *
+ *
+ * By default, this returns {@code true} unless changed via
+ * {@link #setExposeStatsViaJmx(boolean)}.
+ *
+ * @return whether to expose WindowCacheStats statistics via JMX upon
+ * {@link #install()}
+ * @since 5.8
+ */
+ public boolean getExposeStatsViaJmx() {
+ return exposeStats;
+ }
+
+ /**
+ * Defines whether the statistics JMX MBean should be automatically set up.
+ * (By default {@code true}.) If set to {@code false}, the JMX monitoring
+ * bean is not registered.
+ *
+ * @param expose
+ * whether to register the JMX Bean
+ * @since 5.8
+ */
+ public void setExposeStatsViaJmx(boolean expose) {
+ exposeStats = expose;
+ }
+
/**
* Update properties by setting fields from the configuration.
*
From 0b2d41b8584e16d6f7abeca92eaae326033b4489 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Fri, 29 May 2020 21:57:37 +0200
Subject: [PATCH 31/55] Verify that the user home directory is valid
If the determination of the user home directory produces a Java File
object with an invalid path, spurious exceptions may occur at the
most inopportune moments anytime later. In the case in the linked bug
report, start-up of EGit failed, leading to numerous user-visible
problems in Eclipse.
So validate the return value of FS.userHomeImpl(). If converting that
File to a Path throws an exception, log the problem and fall back to
Java system property user.home. If that also is not valid, use null.
(A null user home directory is allowed by FS, and calling in Java
new File(null, "some_string") is fine and produces a File relative
to the current working directory.)
Bug: 563739
Change-Id: If9eec0f9a31a45bd815231706285c71b09f8cf56
Signed-off-by: Thomas Wolf
---
.../eclipse/jgit/internal/JGitText.properties | 2 ++
.../org/eclipse/jgit/internal/JGitText.java | 2 ++
.../src/org/eclipse/jgit/util/FS.java | 30 ++++++++++++++++++-
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index c9ca11b54..9dd632093 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -269,6 +269,7 @@ exceptionCaughtDuringExecutionOfTagCommand=Exception caught during execution of
exceptionHookExecutionInterrupted=Execution of "{0}" hook interrupted.
exceptionOccurredDuringAddingOfOptionToALogCommand=Exception occurred during adding of {0} as option to a Log command
exceptionOccurredDuringReadingOfGIT_DIR=Exception occurred during reading of $GIT_DIR/{0}. {1}
+exceptionWhileFindingUserHome=Problem determining the user home directory, trying Java user.home
exceptionWhileReadingPack=Exception caught while accessing pack file {0}, the pack file might be corrupt. Caught {1} consecutive errors while trying to read this pack.
expectedACKNAKFoundEOF=Expected ACK/NAK, found EOF
expectedACKNAKGot=Expected ACK/NAK, got: {0}
@@ -356,6 +357,7 @@ invalidGitdirRef = Invalid .git reference in file ''{0}''
invalidGitModules=Invalid .gitmodules file
invalidGitType=invalid git type: {0}
invalidHexString=Invalid hex string: {0}
+invalidHomeDirectory=Invalid home directory: {0}
invalidHooksPath=Invalid git config core.hooksPath = {0}
invalidId=Invalid id: {0}
invalidId0=Invalid id
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index ec2414d41..f18ecb921 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -297,6 +297,7 @@ public class JGitText extends TranslationBundle {
/***/ public String exceptionHookExecutionInterrupted;
/***/ public String exceptionOccurredDuringAddingOfOptionToALogCommand;
/***/ public String exceptionOccurredDuringReadingOfGIT_DIR;
+ /***/ public String exceptionWhileFindingUserHome;
/***/ public String exceptionWhileReadingPack;
/***/ public String expectedACKNAKFoundEOF;
/***/ public String expectedACKNAKGot;
@@ -384,6 +385,7 @@ public class JGitText extends TranslationBundle {
/***/ public String invalidGitModules;
/***/ public String invalidGitType;
/***/ public String invalidHexString;
+ /***/ public String invalidHomeDirectory;
/***/ public String invalidHooksPath;
/***/ public String invalidId;
/***/ public String invalidId0;
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 988953b00..91574efec 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -1036,12 +1036,36 @@ public abstract class FS {
public File userHome() {
Holder p = userHome;
if (p == null) {
- p = new Holder<>(userHomeImpl());
+ p = new Holder<>(safeUserHomeImpl());
userHome = p;
}
return p.value;
}
+ private File safeUserHomeImpl() {
+ File home;
+ try {
+ home = userHomeImpl();
+ if (home != null) {
+ home.toPath();
+ return home;
+ }
+ } catch (RuntimeException e) {
+ LOG.error(JGitText.get().exceptionWhileFindingUserHome, e);
+ }
+ home = defaultUserHomeImpl();
+ if (home != null) {
+ try {
+ home.toPath();
+ return home;
+ } catch (InvalidPathException e) {
+ LOG.error(MessageFormat
+ .format(JGitText.get().invalidHomeDirectory, home), e);
+ }
+ }
+ return null;
+ }
+
/**
* Set the user's home directory location.
*
@@ -1081,6 +1105,10 @@ public abstract class FS {
* @return the user's home directory; null if the user does not have one.
*/
protected File userHomeImpl() {
+ return defaultUserHomeImpl();
+ }
+
+ private File defaultUserHomeImpl() {
final String home = AccessController.doPrivileged(
(PrivilegedAction) () -> System.getProperty("user.home") //$NON-NLS-1$
);
From 77848d635b76d8294697ffaf11acf51256df2a5b Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Mon, 27 Apr 2020 00:58:28 +0200
Subject: [PATCH 32/55] Decouple BouncyCastle from JGit Core
Motivation: BouncyCastle serves as 'default' implementation of
the GPG Signer. If a client application does not use it there is no need
to pull in this dependency, especially since BouncyCastle is a large
library.
Move the classes depending on BouncyCastle to an OSGi fragment extending
the org.eclipse.jgit bundle. They are moved to a distinct internal
package in order to avoid split packages. This doesn't break public API
since these classes were already in an internal package before this
change.
Add a new feature org.eclipse.jgit.gpg.bc to enable installation. With
that users can now decide if they want to install it.
Attempts to sign a commit if org.eclipse.jgit.gpg.bc isn't available
will result in ServiceUnavailableException being thrown.
Bug: 559106
Change-Id: I42fd6c00002e17aa9a7be96ae434b538ea86ccf8
Also-by: Michael Dardis
Signed-off-by: Michael Dardis
Signed-off-by: Matthias Sohn
Signed-off-by: David Ostrovsky
---
WORKSPACE | 6 +-
lib/BUILD | 3 +
org.eclipse.jgit.gpg.bc.test/.classpath | 11 +
org.eclipse.jgit.gpg.bc.test/.gitignore | 2 +
org.eclipse.jgit.gpg.bc.test/.project | 28 ++
.../org.eclipse.core.resources.prefs | 2 +
.../.settings/org.eclipse.core.runtime.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 399 ++++++++++++++++++
.../.settings/org.eclipse.jdt.ui.prefs | 66 +++
.../org.eclipse.mylyn.tasks.ui.prefs | 3 +
.../.settings/org.eclipse.mylyn.team.ui.prefs | 2 +
.../.settings/org.eclipse.pde.api.tools.prefs | 104 +++++
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.pde.prefs | 34 ++
org.eclipse.jgit.gpg.bc.test/BUILD | 14 +
.../META-INF/MANIFEST.MF | 14 +
org.eclipse.jgit.gpg.bc.test/about.html | 96 +++++
org.eclipse.jgit.gpg.bc.test/build.properties | 5 +
.../plugin.properties | 2 +
org.eclipse.jgit.gpg.bc.test/pom.xml | 112 +++++
.../BouncyCastleGpgKeyLocatorTest.java | 2 +-
org.eclipse.jgit.gpg.bc/.classpath | 8 +
org.eclipse.jgit.gpg.bc/.fbprefs | 124 ++++++
org.eclipse.jgit.gpg.bc/.gitignore | 2 +
org.eclipse.jgit.gpg.bc/.project | 34 ++
.../org.eclipse.core.resources.prefs | 2 +
.../.settings/org.eclipse.core.runtime.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 399 ++++++++++++++++++
.../.settings/org.eclipse.jdt.ui.prefs | 66 +++
.../org.eclipse.mylyn.tasks.ui.prefs | 3 +
.../.settings/org.eclipse.mylyn.team.ui.prefs | 2 +
.../.settings/org.eclipse.pde.api.tools.prefs | 104 +++++
.../.settings/org.eclipse.pde.core.prefs | 2 +
org.eclipse.jgit.gpg.bc/BUILD | 21 +
org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF | 30 ++
.../META-INF/SOURCE-MANIFEST.MF | 7 +
org.eclipse.jgit.gpg.bc/about.html | 96 +++++
org.eclipse.jgit.gpg.bc/build.properties | 7 +
org.eclipse.jgit.gpg.bc/plugin.properties | 2 +
org.eclipse.jgit.gpg.bc/pom.xml | 223 ++++++++++
.../services/org.eclipse.jgit.lib.GpgSigner | 1 +
.../jgit/gpg/bc/internal/BCText.properties | 11 +
.../eclipse/jgit/gpg/bc/internal/BCText.java | 33 ++
.../gpg/bc}/internal/BouncyCastleGpgKey.java | 2 +-
.../internal/BouncyCastleGpgKeyLocator.java | 23 +-
.../BouncyCastleGpgKeyPassphrasePrompt.java | 11 +-
.../bc}/internal/BouncyCastleGpgSigner.java | 5 +-
.../.gitignore | 1 +
.../org.eclipse.jgit.gpg.bc.feature/.project | 17 +
.../.settings/org.eclipse.core.runtime.prefs | 2 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../org.eclipse.mylyn.tasks.ui.prefs | 3 +
.../.settings/org.eclipse.mylyn.team.ui.prefs | 2 +
.../build.properties | 4 +
.../edl-v10.html | 59 +++
.../feature.properties | 176 ++++++++
.../feature.xml | 57 +++
.../license.html | 168 ++++++++
.../org.eclipse.jgit.gpg.bc.feature/pom.xml | 44 ++
.../org.eclipse.jgit.repository/category.xml | 3 +
.../org.eclipse.jgit.repository/pom.xml | 5 +
.../feature.xml | 7 +
org.eclipse.jgit.packaging/pom.xml | 7 +
org.eclipse.jgit.pgm/BUILD | 5 +-
org.eclipse.jgit.pgm/pom.xml | 6 +
org.eclipse.jgit.test/BUILD | 1 +
org.eclipse.jgit/BUILD | 3 -
org.eclipse.jgit/META-INF/MANIFEST.MF | 142 ++++---
org.eclipse.jgit/pom.xml | 19 +-
.../eclipse/jgit/internal/JGitText.properties | 10 +-
.../org/eclipse/jgit/api/CommitCommand.java | 24 +-
.../errors/ServiceUnavailableException.java | 42 ++
.../org/eclipse/jgit/internal/JGitText.java | 10 +-
.../src/org/eclipse/jgit/lib/GpgSigner.java | 24 +-
pom.xml | 4 +-
75 files changed, 2836 insertions(+), 142 deletions(-)
create mode 100644 org.eclipse.jgit.gpg.bc.test/.classpath
create mode 100644 org.eclipse.jgit.gpg.bc.test/.gitignore
create mode 100644 org.eclipse.jgit.gpg.bc.test/.project
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.resources.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.runtime.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.ui.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.tasks.ui.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.team.ui.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.api.tools.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.core.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.prefs
create mode 100644 org.eclipse.jgit.gpg.bc.test/BUILD
create mode 100644 org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
create mode 100644 org.eclipse.jgit.gpg.bc.test/about.html
create mode 100644 org.eclipse.jgit.gpg.bc.test/build.properties
create mode 100644 org.eclipse.jgit.gpg.bc.test/plugin.properties
create mode 100644 org.eclipse.jgit.gpg.bc.test/pom.xml
rename {org.eclipse.jgit.test/tst/org/eclipse/jgit/lib => org.eclipse.jgit.gpg.bc.test/tst/org/eclipse/jgit/gpg/bc}/internal/BouncyCastleGpgKeyLocatorTest.java (99%)
create mode 100644 org.eclipse.jgit.gpg.bc/.classpath
create mode 100644 org.eclipse.jgit.gpg.bc/.fbprefs
create mode 100644 org.eclipse.jgit.gpg.bc/.gitignore
create mode 100644 org.eclipse.jgit.gpg.bc/.project
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.resources.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.runtime.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.ui.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.tasks.ui.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.team.ui.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.api.tools.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.core.prefs
create mode 100644 org.eclipse.jgit.gpg.bc/BUILD
create mode 100644 org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
create mode 100644 org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
create mode 100644 org.eclipse.jgit.gpg.bc/about.html
create mode 100644 org.eclipse.jgit.gpg.bc/build.properties
create mode 100644 org.eclipse.jgit.gpg.bc/plugin.properties
create mode 100644 org.eclipse.jgit.gpg.bc/pom.xml
create mode 100644 org.eclipse.jgit.gpg.bc/resources/META-INF/services/org.eclipse.jgit.lib.GpgSigner
create mode 100644 org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties
create mode 100644 org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java
rename {org.eclipse.jgit/src/org/eclipse/jgit/lib => org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc}/internal/BouncyCastleGpgKey.java (95%)
rename {org.eclipse.jgit/src/org/eclipse/jgit/lib => org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc}/internal/BouncyCastleGpgKeyLocator.java (96%)
rename {org.eclipse.jgit/src/org/eclipse/jgit/lib => org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc}/internal/BouncyCastleGpgKeyPassphrasePrompt.java (88%)
rename {org.eclipse.jgit/src/org/eclipse/jgit/lib => org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc}/internal/BouncyCastleGpgSigner.java (97%)
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.gitignore
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.project
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.core.runtime.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.m2e.core.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.team.ui.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/build.properties
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/edl-v10.html
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.properties
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/license.html
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml
create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ServiceUnavailableException.java
diff --git a/WORKSPACE b/WORKSPACE
index 64218b590..509cf6d09 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -264,9 +264,9 @@ maven_jar(
maven_jar(
name = "bcprov",
- artifact = "org.bouncycastle:bcprov-jdk15on:" + BOUNCYCASTLE_VER,
- sha1 = "320b989112f00a63a3bcfa5a98f31a4f865a20fa",
- src_sha1 = "ef2676604015c183bb29f8e17846cb3aa4b80c24",
+ artifact = "org.bouncycastle:bcprov-jdk15on:1.65.01",
+ sha1 = "0fbd478ea7b07acc3902b9585a37fd88393f8427",
+ src_sha1 = "8f54635075628c69b6c037e800dd0b03ffb8dd51",
)
maven_jar(
diff --git a/lib/BUILD b/lib/BUILD
index 6c974865e..a6864fa36 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -154,6 +154,7 @@ java_library(
name = "bcpg",
visibility = [
"//org.eclipse.jgit:__pkg__",
+ "//org.eclipse.jgit.gpg.bc:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
exports = ["@bcpg//jar"],
@@ -163,6 +164,7 @@ java_library(
name = "bcprov",
visibility = [
"//org.eclipse.jgit:__pkg__",
+ "//org.eclipse.jgit.gpg.bc:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
exports = ["@bcprov//jar"],
@@ -172,6 +174,7 @@ java_library(
name = "bcpkix",
visibility = [
"//org.eclipse.jgit:__pkg__",
+ "//org.eclipse.jgit.gpg.bc:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
exports = ["@bcpkix//jar"],
diff --git a/org.eclipse.jgit.gpg.bc.test/.classpath b/org.eclipse.jgit.gpg.bc.test/.classpath
new file mode 100644
index 000000000..f08af0a4e
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.classpath
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.gpg.bc.test/.gitignore b/org.eclipse.jgit.gpg.bc.test/.gitignore
new file mode 100644
index 000000000..934e0e06f
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jgit.gpg.bc.test/.project b/org.eclipse.jgit.gpg.bc.test/.project
new file mode 100644
index 000000000..9aac4a256
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.project
@@ -0,0 +1,28 @@
+
+
+ org.eclipse.jgit.gpg.bc.test
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..822846c4d
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,399 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..fef371382
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,66 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_JGit Format
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..3dec4d97c
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 000000000..ce7a0f047
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.description} \n\nBug\: ${task.key}
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 000000000..c0030ded7
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+changed_execution_env=Error
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Warning
+incompatible_api_component_version_report_minor_without_api_change=Ignore
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..923c37fb8
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..2174e4fd5
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.gpg.bc.test/BUILD b/org.eclipse.jgit.gpg.bc.test/BUILD
new file mode 100644
index 000000000..1e3677d92
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/BUILD
@@ -0,0 +1,14 @@
+load(
+ "@com_googlesource_gerrit_bazlets//tools:junit.bzl",
+ "junit_tests",
+)
+
+junit_tests(
+ name = "bc",
+ srcs = glob(["tst/**/*.java"]),
+ tags = ["bc"],
+ deps = [
+ "//lib:junit",
+ "//org.eclipse.jgit.gpg.bc:gpg-bc",
+ ],
+)
diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..3eb0e04bf
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Automatic-Module-Name: org.eclipse.jgit.gpg.bc.test
+Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.test
+Bundle-Version: 5.8.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: org.eclipse.jgit.gpg.bc.internal;version="[5.8.0,5.9.0)",
+ org.junit;version="[4.13,5.0.0)"
+Export-Package: org.eclipse.jgit.gpg.bc.internal;x-internal:=true
+Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)",
+ org.hamcrest.library;bundle-version="[1.1.0,2.0.0)"
diff --git a/org.eclipse.jgit.gpg.bc.test/about.html b/org.eclipse.jgit.gpg.bc.test/about.html
new file mode 100644
index 000000000..f971af18d
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/about.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+Eclipse Distribution License - Version 1.0
+
+
+
+
+
+
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+- Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+SHA-1 UbcCheck - MIT
+
+Copyright (c) 2017:
+
+Marc Stevens
+Cryptology Group
+Centrum Wiskunde & Informatica
+P.O. Box 94079, 1090 GB Amsterdam, Netherlands
+marc@marc-stevens.nl
+
+
+Dan Shumow
+Microsoft Research
+danshu@microsoft.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+- The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+
+
diff --git a/org.eclipse.jgit.gpg.bc.test/build.properties b/org.eclipse.jgit.gpg.bc.test/build.properties
new file mode 100644
index 000000000..9ffa0caf7
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/build.properties
@@ -0,0 +1,5 @@
+source.. = tst/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/org.eclipse.jgit.gpg.bc.test/plugin.properties b/org.eclipse.jgit.gpg.bc.test/plugin.properties
new file mode 100644
index 000000000..43776620c
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/plugin.properties
@@ -0,0 +1,2 @@
+Bundle-Name=JGit Tests for GPG with bouncycastle
+Bundle-Vendor=Eclipse JGit
diff --git a/org.eclipse.jgit.gpg.bc.test/pom.xml b/org.eclipse.jgit.gpg.bc.test/pom.xml
new file mode 100644
index 000000000..05c496b26
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc.test/pom.xml
@@ -0,0 +1,112 @@
+
+
+
+
+ 4.0.0
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit-parent
+ 5.8.0-SNAPSHOT
+
+
+ org.eclipse.jgit.gpg.bc.test
+ JGit - BouncyCastle GPG Tests
+
+
+ JUnit tests for the JGit GPG support based on BouncyCastle.
+
+
+
+ true
+
+
+
+
+ junit
+ junit
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.junit
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.gpg.bc
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.test
+ ${project.version}
+
+
+
+
+
+
+
+ test.long
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ @{argLine} -Djgit.test.long=true
+
+
+
+
+
+
+
+
+ src/
+ tst/
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ test-jar
+
+
+
+
+
+ maven-surefire-plugin
+
+ @{argLine} -Xmx1024m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}
+
+ **/*Test.java
+ **/*Tests.java
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocatorTest.java b/org.eclipse.jgit.gpg.bc.test/tst/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocatorTest.java
similarity index 99%
rename from org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocatorTest.java
rename to org.eclipse.jgit.gpg.bc.test/tst/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocatorTest.java
index e93091d67..744620163 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocatorTest.java
+++ b/org.eclipse.jgit.gpg.bc.test/tst/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocatorTest.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.lib.internal;
+package org.eclipse.jgit.gpg.bc.internal;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
diff --git a/org.eclipse.jgit.gpg.bc/.classpath b/org.eclipse.jgit.gpg.bc/.classpath
new file mode 100644
index 000000000..110168ffa
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.gpg.bc/.fbprefs b/org.eclipse.jgit.gpg.bc/.fbprefs
new file mode 100644
index 000000000..0a87ea2b4
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.fbprefs
@@ -0,0 +1,124 @@
+#FindBugs User Preferences
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|false
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindCircularDependencies=FindCircularDependencies|false
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
+detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|true
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
+detectorFindUnreleasedLock=FindUnreleasedLock|true
+detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
+detectorFindUnsyncGet=FindUnsyncGet|true
+detectorFindUselessControlFlow=FindUselessControlFlow|true
+detectorFormatStringChecker=FormatStringChecker|true
+detectorHugeSharedStringConstants=HugeSharedStringConstants|true
+detectorIDivResultCastToDouble=IDivResultCastToDouble|true
+detectorIncompatMask=IncompatMask|true
+detectorInconsistentAnnotations=InconsistentAnnotations|true
+detectorInefficientMemberAccess=InefficientMemberAccess|false
+detectorInefficientToArray=InefficientToArray|true
+detectorInfiniteLoop=InfiniteLoop|true
+detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
+detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
+detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
+detectorInitializationChain=InitializationChain|true
+detectorInstantiateStaticClass=InstantiateStaticClass|true
+detectorInvalidJUnitTest=InvalidJUnitTest|true
+detectorIteratorIdioms=IteratorIdioms|true
+detectorLazyInit=LazyInit|true
+detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
+detectorMethodReturnCheck=MethodReturnCheck|true
+detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
+detectorMutableLock=MutableLock|true
+detectorMutableStaticFields=MutableStaticFields|true
+detectorNaming=Naming|true
+detectorNumberConstructor=NumberConstructor|true
+detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
+detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
+detectorPublicSemaphores=PublicSemaphores|false
+detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
+detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
+detectorRedundantInterfaces=RedundantInterfaces|true
+detectorRepeatedConditionals=RepeatedConditionals|true
+detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
+detectorSerializableIdiom=SerializableIdiom|true
+detectorStartInConstructor=StartInConstructor|true
+detectorStaticCalendarDetector=StaticCalendarDetector|true
+detectorStringConcatenation=StringConcatenation|true
+detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
+detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
+detectorSwitchFallthrough=SwitchFallthrough|true
+detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
+detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
+detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
+detectorURLProblems=URLProblems|true
+detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
+detectorUnnecessaryMath=UnnecessaryMath|true
+detectorUnreadFields=UnreadFields|true
+detectorUseObjectEquals=UseObjectEquals|false
+detectorUselessSubclassMethod=UselessSubclassMethod|false
+detectorVarArgsProblems=VarArgsProblems|true
+detectorVolatileUsage=VolatileUsage|true
+detectorWaitInLoop=WaitInLoop|true
+detectorWrongMapIterator=WrongMapIterator|true
+detectorXMLFactoryBypass=XMLFactoryBypass|true
+detector_threshold=2
+effort=default
+excludefilter0=findBugs/FindBugsExcludeFilter.xml
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false
+filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL|
+run_at_full_build=true
diff --git a/org.eclipse.jgit.gpg.bc/.gitignore b/org.eclipse.jgit.gpg.bc/.gitignore
new file mode 100644
index 000000000..934e0e06f
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jgit.gpg.bc/.project b/org.eclipse.jgit.gpg.bc/.project
new file mode 100644
index 000000000..86910cf3a
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.project
@@ -0,0 +1,34 @@
+
+
+ org.eclipse.jgit.gpg.bc
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+ org.eclipse.pde.api.tools.apiAnalysisBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.pde.api.tools.apiAnalysisNature
+
+
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..15ef2aad5
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,399 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jgit.annotations.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jgit.annotations.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jgit.annotations.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..fef371382
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,66 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_JGit Format
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..3dec4d97c
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 000000000..ce7a0f047
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.description} \n\nBug\: ${task.key}
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 000000000..c0030ded7
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+changed_execution_env=Error
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Warning
+incompatible_api_component_version_report_minor_without_api_change=Ignore
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..923c37fb8
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/org.eclipse.jgit.gpg.bc/BUILD b/org.eclipse.jgit.gpg.bc/BUILD
new file mode 100644
index 000000000..4fe1e478c
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/BUILD
@@ -0,0 +1,21 @@
+load("@rules_java//java:defs.bzl", "java_library")
+
+package(default_visibility = ["//visibility:public"])
+
+SRCS = glob(["src/**/*.java"])
+
+RESOURCES = glob(["resources/**"])
+
+java_library(
+ name = "gpg-bc",
+ srcs = SRCS,
+ resource_strip_prefix = "org.eclipse.jgit.gpg.bc/resources",
+ resources = RESOURCES,
+ deps = [
+ "//lib:bcpg",
+ "//lib:bcpkix",
+ "//lib:bcprov",
+ "//lib:slf4j-api",
+ "//org.eclipse.jgit:jgit",
+ ],
+)
diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..574bbcf46
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Automatic-Module-Name: org.eclipse.jgit.gpg.bc
+Bundle-SymbolicName: org.eclipse.jgit.gpg.bc;singleton:=true
+Fragment-Host: org.eclipse.jgit;bundle-version="5.8.0.qualifier"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Bundle-Version: 5.8.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: org.assertj.core.annotations;version="3.14.0",
+ org.bouncycastle.bcpg;version="[1.65.0,2.0.0)",
+ org.bouncycastle.gpg;version="[1.65.0,2.0.0)",
+ org.bouncycastle.gpg.keybox;version="[1.65.0,2.0.0)",
+ org.bouncycastle.gpg.keybox.jcajce;version="[1.65.0,2.0.0)",
+ org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)",
+ org.bouncycastle.openpgp;version="[1.65.0,2.0.0)",
+ org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)",
+ org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)",
+ org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)",
+ org.eclipse.jgit.annotations;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.api.errors;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.errors;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.lib;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.nls;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.transport;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.util;version="[5.8.0,5.9.0)",
+ org.slf4j;version="[1.7.0,2.0.0)"
+Export-Package: org.eclipse.jgit.gpg.bc.internal;version="5.8.0";
+ x-friends:="org.eclipse.jgit.gpg.bc.test"
diff --git a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
new file mode 100644
index 000000000..49081f826
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.jgit.gpg.bc - Sources
+Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.source
+Bundle-Vendor: Eclipse.org - JGit
+Bundle-Version: 5.8.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="5.8.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.gpg.bc/about.html b/org.eclipse.jgit.gpg.bc/about.html
new file mode 100644
index 000000000..f971af18d
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/about.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+Eclipse Distribution License - Version 1.0
+
+
+
+
+
+
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+- Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+SHA-1 UbcCheck - MIT
+
+Copyright (c) 2017:
+
+Marc Stevens
+Cryptology Group
+Centrum Wiskunde & Informatica
+P.O. Box 94079, 1090 GB Amsterdam, Netherlands
+marc@marc-stevens.nl
+
+
+Dan Shumow
+Microsoft Research
+danshu@microsoft.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+- The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+
+
diff --git a/org.eclipse.jgit.gpg.bc/build.properties b/org.eclipse.jgit.gpg.bc/build.properties
new file mode 100644
index 000000000..8148271ef
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/build.properties
@@ -0,0 +1,7 @@
+source.. = src/,\
+ resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
diff --git a/org.eclipse.jgit.gpg.bc/plugin.properties b/org.eclipse.jgit.gpg.bc/plugin.properties
new file mode 100644
index 000000000..b0914927b
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/plugin.properties
@@ -0,0 +1,2 @@
+Bundle-Name=JGit GPG support based on bouncycastle
+Bundle-Vendor=Eclipse JGit
diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml
new file mode 100644
index 000000000..ab0bc2ea8
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/pom.xml
@@ -0,0 +1,223 @@
+
+
+
+
+ 4.0.0
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit-parent
+ 5.8.0-SNAPSHOT
+
+
+ org.eclipse.jgit.gpg.bc
+ JGit - BouncyCastle-based GPG support
+
+
+ GPG support for JGit based on BouncyCastle
+
+
+
+
+ ${project.build.directory}/META-INF/SOURCE-MANIFEST.MF
+
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit
+ ${project.version}
+
+
+
+ org.bouncycastle
+ bcpg-jdk15on
+
+
+
+ org.bouncycastle
+ bcprov-jdk15on
+
+
+
+ org.bouncycastle
+ bcpkix-jdk15on
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ src/
+
+
+
+ .
+
+ plugin.properties
+ about.html
+
+
+
+ resources/
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+
+
+ translate-source-qualifier
+ generate-resources
+
+
+
+
+
+
+
+
+
+ run
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ true
+
+
+ attach-sources
+ process-classes
+
+ jar
+
+
+
+ ${source-bundle-manifest}
+
+
+
+
+
+
+
+ maven-jar-plugin
+
+
+ ${bundle-manifest}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.gpg.bc/resources/META-INF/services/org.eclipse.jgit.lib.GpgSigner b/org.eclipse.jgit.gpg.bc/resources/META-INF/services/org.eclipse.jgit.lib.GpgSigner
new file mode 100644
index 000000000..6752b64dd
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/resources/META-INF/services/org.eclipse.jgit.lib.GpgSigner
@@ -0,0 +1 @@
+org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgSigner
diff --git a/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties b/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties
new file mode 100644
index 000000000..1441c63e8
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties
@@ -0,0 +1,11 @@
+credentialPassphrase=Passphrase
+gpgFailedToParseSecretKey=Failed to parse secret key file in directory: {0}. Is the entered passphrase correct?
+gpgNoCredentialsProvider=missing credentials provider
+gpgNoKeyring=neither pubring.kbx nor secring.gpg files found
+gpgNoKeyInLegacySecring=no matching secret key found in legacy secring.gpg for key or user id: {0}
+gpgNoPublicKeyFound=Unable to find a public-key with key or user id: {0}
+gpgNoSecretKeyForPublicKey=unable to find associated secret key for public key: {0}
+gpgNotASigningKey=Secret key ({0}) is not suitable for signing
+gpgKeyInfo=GPG Key (fingerprint {0})
+gpgSigningCancelled=Signing was cancelled
+unableToSignCommitNoSecretKey=Unable to sign commit. Signing key not available.
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java
new file mode 100644
index 000000000..1a00b0fc7
--- /dev/null
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java
@@ -0,0 +1,33 @@
+package org.eclipse.jgit.gpg.bc.internal;
+
+import org.eclipse.jgit.nls.NLS;
+import org.eclipse.jgit.nls.TranslationBundle;
+
+/**
+ * Externalized text messages for localization.
+ */
+public final class BCText extends TranslationBundle {
+
+ /**
+ * Get an instance of this translation bundle.
+ *
+ * @return an instance of this translation bundle
+ */
+ public static BCText get() {
+ return NLS.getBundleFor(BCText.class);
+ }
+
+ // @formatter:off
+ /***/ public String credentialPassphrase;
+ /***/ public String gpgFailedToParseSecretKey;
+ /***/ public String gpgNoCredentialsProvider;
+ /***/ public String gpgNoKeyring;
+ /***/ public String gpgNoKeyInLegacySecring;
+ /***/ public String gpgNoPublicKeyFound;
+ /***/ public String gpgNoSecretKeyForPublicKey;
+ /***/ public String gpgNotASigningKey;
+ /***/ public String gpgKeyInfo;
+ /***/ public String gpgSigningCancelled;
+ /***/ public String unableToSignCommitNoSecretKey;
+
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKey.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKey.java
similarity index 95%
rename from org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKey.java
rename to org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKey.java
index 8601d7c94..bc26cb98a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKey.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKey.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.lib.internal;
+package org.eclipse.jgit.gpg.bc.internal;
import java.nio.file.Path;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocator.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
similarity index 96%
rename from org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocator.java
rename to org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
index 8a32299dd..e6a48f859 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocator.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.lib.internal;
+package org.eclipse.jgit.gpg.bc.internal;
import static java.nio.file.Files.exists;
import static java.nio.file.Files.newInputStream;
@@ -57,7 +57,6 @@ import org.bouncycastle.util.encoders.Hex;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.errors.UnsupportedCredentialItem;
-import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.StringUtils;
import org.eclipse.jgit.util.SystemReader;
@@ -68,7 +67,7 @@ import org.slf4j.LoggerFactory;
* Locates GPG keys from either ~/.gnupg/private-keys-v1.d
or
* ~/.gnupg/secring.gpg
*/
-class BouncyCastleGpgKeyLocator {
+public class BouncyCastleGpgKeyLocator {
/** Thrown if a keybox file exists but doesn't contain an OpenPGP key. */
private static class NoOpenPgpKeyException extends Exception {
@@ -338,11 +337,11 @@ class BouncyCastleGpgKeyLocator {
return key;
}
throw new PGPException(MessageFormat.format(
- JGitText.get().gpgNoSecretKeyForPublicKey,
+ BCText.get().gpgNoSecretKeyForPublicKey,
Long.toHexString(publicKey.getKeyID())));
}
throw new PGPException(MessageFormat.format(
- JGitText.get().gpgNoPublicKeyFound, signingKey));
+ BCText.get().gpgNoPublicKeyFound, signingKey));
} catch (NoOpenPgpKeyException e) {
// There are no OpenPGP keys in the keybox at all: try the
// pubring.gpg, if it exists.
@@ -370,7 +369,7 @@ class BouncyCastleGpgKeyLocator {
}
if (publicKey == null) {
throw new PGPException(MessageFormat.format(
- JGitText.get().gpgNoPublicKeyFound, signingKey));
+ BCText.get().gpgNoPublicKeyFound, signingKey));
}
// We found a public key, but didn't find the secret key in the
// private key directory. Go try the secring.gpg.
@@ -385,14 +384,14 @@ class BouncyCastleGpgKeyLocator {
}
if (publicKey != null) {
throw new PGPException(MessageFormat.format(
- JGitText.get().gpgNoSecretKeyForPublicKey,
+ BCText.get().gpgNoSecretKeyForPublicKey,
Long.toHexString(publicKey.getKeyID())));
} else if (hasSecring) {
// publicKey == null: user has _only_ pubring.gpg/secring.gpg.
throw new PGPException(MessageFormat.format(
- JGitText.get().gpgNoKeyInLegacySecring, signingKey));
+ BCText.get().gpgNoKeyInLegacySecring, signingKey));
} else {
- throw new PGPException(JGitText.get().gpgNoKeyring);
+ throw new PGPException(BCText.get().gpgNoKeyring);
}
}
@@ -414,7 +413,7 @@ class BouncyCastleGpgKeyLocator {
if (secretKey != null) {
if (!secretKey.isSigningKey()) {
throw new PGPException(MessageFormat
- .format(JGitText.get().gpgNotASigningKey, signingKey));
+ .format(BCText.get().gpgNotASigningKey, signingKey));
}
return new BouncyCastleGpgKey(secretKey, secring);
}
@@ -446,7 +445,7 @@ class BouncyCastleGpgKeyLocator {
if (secretKey != null) {
if (!secretKey.isSigningKey()) {
throw new PGPException(MessageFormat.format(
- JGitText.get().gpgNotASigningKey, signingKey));
+ BCText.get().gpgNotASigningKey, signingKey));
}
return new BouncyCastleGpgKey(secretKey, userKeyboxPath);
}
@@ -460,7 +459,7 @@ class BouncyCastleGpgKeyLocator {
} catch (IOException e) {
passphrasePrompt.clear();
throw new PGPException(MessageFormat.format(
- JGitText.get().gpgFailedToParseSecretKey,
+ BCText.get().gpgFailedToParseSecretKey,
USER_SECRET_KEY_DIR.toAbsolutePath()), e);
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyPassphrasePrompt.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java
similarity index 88%
rename from org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyPassphrasePrompt.java
rename to org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java
index 6e29af51d..740f597a9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyPassphrasePrompt.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.lib.internal;
+package org.eclipse.jgit.gpg.bc.internal;
import java.net.URISyntaxException;
import java.nio.file.Path;
@@ -17,7 +17,6 @@ import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.util.encoders.Hex;
import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.errors.UnsupportedCredentialItem;
-import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.transport.CredentialItem.CharArrayType;
import org.eclipse.jgit.transport.CredentialItem.InformationalMessage;
import org.eclipse.jgit.transport.CredentialsProvider;
@@ -79,21 +78,21 @@ class BouncyCastleGpgKeyPassphrasePrompt implements AutoCloseable {
throws PGPException, CanceledException, UnsupportedCredentialItem,
URISyntaxException {
if (passphrase == null) {
- passphrase = new CharArrayType(JGitText.get().credentialPassphrase,
+ passphrase = new CharArrayType(BCText.get().credentialPassphrase,
true);
}
if (credentialsProvider == null) {
- throw new PGPException(JGitText.get().gpgNoCredentialsProvider);
+ throw new PGPException(BCText.get().gpgNoCredentialsProvider);
}
if (passphrase.getValue() == null
&& !credentialsProvider.get(createURI(keyLocation),
new InformationalMessage(
- MessageFormat.format(JGitText.get().gpgKeyInfo,
+ MessageFormat.format(BCText.get().gpgKeyInfo,
Hex.toHexString(keyFingerprint))),
passphrase)) {
- throw new CanceledException(JGitText.get().gpgSigningCancelled);
+ throw new CanceledException(BCText.get().gpgSigningCancelled);
}
return passphrase.getValue();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java
similarity index 97%
rename from org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java
rename to org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java
index dfcfdab11..fc6c156d4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.lib.internal;
+package org.eclipse.jgit.gpg.bc.internal;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -33,7 +33,6 @@ import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.errors.UnsupportedCredentialItem;
-import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.CommitBuilder;
import org.eclipse.jgit.lib.GpgSignature;
import org.eclipse.jgit.lib.GpgSigner;
@@ -103,7 +102,7 @@ public class BouncyCastleGpgSigner extends GpgSigner {
PGPSecretKey secretKey = gpgKey.getSecretKey();
if (secretKey == null) {
throw new JGitInternalException(
- JGitText.get().unableToSignCommitNoSecretKey);
+ BCText.get().unableToSignCommitNoSecretKey);
}
char[] passphrase = passphrasePrompt.getPassphrase(
secretKey.getPublicKey().getFingerprint(),
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.gitignore b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.gitignore
new file mode 100644
index 000000000..2f7896d1d
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.gitignore
@@ -0,0 +1 @@
+target/
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.project
new file mode 100644
index 000000000..76a6f7b9f
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.project
@@ -0,0 +1,17 @@
+
+
+ org.eclipse.jgit.gpg.bc.feature
+
+
+
+
+
+ org.eclipse.pde.FeatureBuilder
+
+
+
+
+
+ org.eclipse.pde.FeatureNature
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 000000000..f897a7f1c
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..3dec4d97c
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 000000000..984263dd9
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.description}\n\nBug\: ${task.key}
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/build.properties
new file mode 100644
index 000000000..b4a8dde9e
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/build.properties
@@ -0,0 +1,4 @@
+bin.includes = feature.xml,\
+ edl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/edl-v10.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/edl-v10.html
new file mode 100644
index 000000000..1826b47af
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/edl-v10.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+Eclipse Distribution License - Version 1.0
+
+
+
+
+
+
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+- Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.properties
new file mode 100644
index 000000000..b14f0defe
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.properties
@@ -0,0 +1,176 @@
+###############################################################################
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+###############################################################################
+
+featureName=Java implementation of Git - GPG support using BouncyCastle
+providerName=Eclipse JGit
+
+updateSiteName=Eclipse JGit Update Site
+
+# description property - text of the "Feature Description"
+description=\
+GPG support using BouncyCastle.\n
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2020 Matthias Sohn and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Distribution License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/org/documents/edl-v10.html\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+\n\
+November 22, 2017\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\
+AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\
+THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\
+TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\
+BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\
+AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\
+APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\
+MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public License\n\
+Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\
+available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\
+"Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code, documentation\n\
+and other files maintained in the Eclipse Foundation source code repository\n\
+("Repository") in software modules ("Modules") and made available as\n\
+downloadable archives ("Downloads").\n\
+\n\
+- Content may be structured and packaged into modules to facilitate\n\
+ delivering, extending, and upgrading the Content. Typical modules may\n\
+ include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\
+ features ("Features").\n\
+- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\
+ (Java\u2122 ARchive) in a directory named "plugins".\n\
+- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\
+ associated material. Each Feature may be packaged as a sub-directory in a\n\
+ directory named "features". Within a Feature, files named "feature.xml" may\n\
+ contain a list of the names and version numbers of the Plug-ins and/or\n\
+ Fragments associated with that Feature.\n\
+- Features may also include other Features ("Included Features"). Within a\n\
+ Feature, files named "feature.xml" may contain a list of the names and\n\
+ version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be contained in\n\
+files named "about.html" ("Abouts"). The terms and conditions governing Features\n\
+and Included Features should be contained in files named "license.html"\n\
+("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\
+directory of a Download or Module including, but not limited to the following\n\
+locations:\n\
+\n\
+- The top-level (root) directory\n\
+- Plug-in and Fragment directories\n\
+- Inside Plug-ins and Fragments packaged as JARs\n\
+- Sub-directories of the directory named "src" of certain Plug-ins\n\
+- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using\n\
+the Provisioning Technology (as defined below), you must agree to a license\n\
+("Feature Update License") during the installation process. If the Feature\n\
+contains Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform you\n\
+where you can locate them. Feature Update Licenses may be found in the "license"\n\
+property of files named "feature.properties" found within a Feature. Such\n\
+Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your use of\n\
+the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\
+OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+- Eclipse Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/epl-v10.html)\n\
+- Eclipse Distribution License Version 1.0 (available at\n\
+ http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+- Common Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/cpl-v10.html)\n\
+- Apache Software License 1.1 (available at\n\
+ http://www.apache.org/licenses/LICENSE)\n\
+- Apache Software License 2.0 (available at\n\
+ http://www.apache.org/licenses/LICENSE-2.0)\n\
+- Mozilla Public License Version 1.1 (available at\n\
+ http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\
+USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\
+provided, please contact the Eclipse Foundation to determine what terms and\n\
+conditions govern that particular Content.\n\
+\n\
+Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which\n\
+include, but are not limited to, p2 and the Eclipse Update Manager\n\
+("Provisioning Technology") for the purpose of allowing users to install\n\
+software, documentation, information and/or other materials (collectively\n\
+"Installable Software"). This capability is provided with the intent of allowing\n\
+such users to install, extend and update Eclipse-based products. Information\n\
+about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install\n\
+Installable Software. You shall be responsible for enabling the applicable\n\
+license agreements relating to the Installable Software to be presented to, and\n\
+accepted by, the users of the Provisioning Technology in accordance with the\n\
+Specification. By using Provisioning Technology in such a manner and making it\n\
+available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the\n\
+following:\n\
+\n\
+1. A series of actions may occur ("Provisioning Process") in which a user may\n\
+ execute the Provisioning Technology on a machine ("Target Machine") with the\n\
+ intent of installing, extending or updating the functionality of an\n\
+ Eclipse-based product.\n\
+2. During the Provisioning Process, the Provisioning Technology may cause third\n\
+ party Installable Software or a portion thereof to be accessed and copied to\n\
+ the Target Machine.\n\
+3. Pursuant to the Specification, you will provide to the user the terms and\n\
+ conditions that govern the use of the Installable Software ("Installable\n\
+ Software Agreement") and such Installable Software Agreement shall be\n\
+ accessed from the Target Machine in accordance with the Specification. Such\n\
+ Installable Software Agreement must inform the user of the terms and\n\
+ conditions that govern the Installable Software and must solicit acceptance\n\
+ by the end user in the manner prescribed in such Installable\n\
+ Software Agreement. Upon such indication of agreement by the user, the\n\
+ provisioning Technology will complete installation of the\n\
+ Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are currently\n\
+may have restrictions on the import, possession, and use, and/or re-export to\n\
+another country, of encryption software. BEFORE using any encryption software,\n\
+please check the country's laws, regulations and policies concerning the import,\n\
+possession, or use, and re-export of encryption software, to see if this is\n\
+permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\
+United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
new file mode 100644
index 000000000..9b8b824ab
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
@@ -0,0 +1,57 @@
+
+
+
+
+ %description
+
+
+
+ %copyright
+
+
+
+ %license
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/license.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/license.html
new file mode 100644
index 000000000..004b6dec6
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/license.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+Eclipse Foundation Software User Agreement
+
+
+ Eclipse Foundation Software User Agreement
+ November 22, 2017
+ Usage Of Content
+ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
+ INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY
+ THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS
+ GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY
+ APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
+ AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
+ AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
+ USE THE CONTENT.
+ Applicable Licenses
+
+ Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+ Eclipse Public License Version 2.0 ("EPL"). A copy of the
+ EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-2.0.
+ For purposes of the EPL, "Program" will mean the Content.
+
+ Content includes, but is not limited to, source code, object
+ code, documentation and other files maintained in the Eclipse
+ Foundation source code repository ("Repository") in software
+ modules ("Modules") and made available as downloadable
+ archives ("Downloads").
+
+ - Content may be structured and packaged into modules to
+ facilitate delivering, extending, and upgrading the Content. Typical
+ modules may include plug-ins ("Plug-ins"), plug-in
+ fragments ("Fragments"), and features
+ ("Features").
+ - Each Plug-in or Fragment may be packaged as a sub-directory
+ or JAR (Java™ ARchive) in a directory named
+ "plugins".
+ - A Feature is a bundle of one or more Plug-ins and/or
+ Fragments and associated material. Each Feature may be packaged as a
+ sub-directory in a directory named "features". Within a
+ Feature, files named "feature.xml" may contain a list of
+ the names and version numbers of the Plug-ins and/or Fragments
+ associated with that Feature.
+ - Features may also include other Features ("Included
+ Features"). Within a Feature, files named
+ "feature.xml" may contain a list of the names and version
+ numbers of Included Features.
+
+ The terms and conditions governing Plug-ins and Fragments should
+ be contained in files named "about.html"
+ ("Abouts"). The terms and conditions governing Features and
+ Included Features should be contained in files named
+ "license.html" ("Feature Licenses"). Abouts and
+ Feature Licenses may be located in any directory of a Download or
+ Module including, but not limited to the following locations:
+
+ - The top-level (root) directory
+ - Plug-in and Fragment directories
+ - Inside Plug-ins and Fragments packaged as JARs
+ - Sub-directories of the directory named "src" of
+ certain Plug-ins
+ - Feature directories
+
+ Note: if a Feature made available by the Eclipse Foundation is
+ installed using the Provisioning Technology (as defined below), you
+ must agree to a license ("Feature Update License") during
+ the installation process. If the Feature contains Included Features,
+ the Feature Update License should either provide you with the terms
+ and conditions governing the Included Features or inform you where you
+ can locate them. Feature Update Licenses may be found in the
+ "license" property of files named
+ "feature.properties" found within a Feature. Such Abouts,
+ Feature Licenses, and Feature Update Licenses contain the terms and
+ conditions (or references to such terms and conditions) that govern
+ your use of the associated Content in that directory.
+ THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY
+ REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+ CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT
+ ARE NOT LIMITED TO):
+
+ IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+ CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+ or Feature Update License is provided, please contact the Eclipse
+ Foundation to determine what terms and conditions govern that
+ particular Content.
+ Use of Provisioning Technology
+
+ The Eclipse Foundation makes available provisioning software, examples
+ of which include, but are not limited to, p2 and the Eclipse Update
+ Manager ("Provisioning Technology") for the purpose of
+ allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+ capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+ packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html
+ ("Specification").
+
+ You may use Provisioning Technology to allow other parties to
+ install Installable Software. You shall be responsible for enabling
+ the applicable license agreements relating to the Installable Software
+ to be presented to, and accepted by, the users of the Provisioning
+ Technology in accordance with the Specification. By using Provisioning
+ Technology in such a manner and making it available in accordance with
+ the Specification, you further acknowledge your agreement to, and the
+ acquisition of all necessary rights to permit the following:
+
+ - A series of actions may occur ("Provisioning
+ Process") in which a user may execute the Provisioning
+ Technology on a machine ("Target Machine") with the intent
+ of installing, extending or updating the functionality of an
+ Eclipse-based product.
+ - During the Provisioning Process, the Provisioning Technology
+ may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.
+ - Pursuant to the Specification, you will provide to the user
+ the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such
+ Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+ Software Agreement must inform the user of the terms and conditions
+ that govern the Installable Software and must solicit acceptance by
+ the end user in the manner prescribed in such Installable Software
+ Agreement. Upon such indication of agreement by the user, the
+ provisioning Technology will complete installation of the Installable
+ Software.
+
+ Cryptography
+ Content may contain encryption software. The country in which
+ you are currently may have restrictions on the import, possession, and
+ use, and/or re-export to another country, of encryption software.
+ BEFORE using any encryption software, please check the country's laws,
+ regulations and policies concerning the import, possession, or use,
+ and re-export of encryption software, to see if this is permitted.
+
+ Java and all Java-based trademarks are trademarks of
+ Oracle Corporation in the United States, other countries, or both.
+
+
+
\ No newline at end of file
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml
new file mode 100644
index 000000000..c9ada739e
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml
@@ -0,0 +1,44 @@
+
+
+
+
+ 4.0.0
+
+
+ org.eclipse.jgit
+ jgit.tycho.parent
+ 5.8.0-SNAPSHOT
+
+
+ org.eclipse.jgit.feature
+ org.eclipse.jgit.gpg.bc
+ eclipse-feature
+
+ JGit - GPG support using bouncycastle
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.gpg.bc
+ ${project.version}
+
+
+
+
+
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 e2aeee38c..7aa5c5b05 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
@@ -30,6 +30,9 @@
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
index 67d1eda22..b71afc5cd 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
@@ -41,6 +41,11 @@
org.eclipse.jgit.archive
${project.version}
+
+ org.eclipse.jgit
+ org.eclipse.jgit.gpg.bc
+ ${project.version}
+
org.eclipse.jgit
org.eclipse.jgit.http.apache
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
index e58d40b32..8ac2c631c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
@@ -117,4 +117,11 @@
version="0.0.0"
unpack="false"/>
+
+
diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml
index 5cbf2aab0..2f12b50e6 100644
--- a/org.eclipse.jgit.packaging/pom.xml
+++ b/org.eclipse.jgit.packaging/pom.xml
@@ -41,6 +41,7 @@
org.eclipse.jgit.target
org.eclipse.jgit.feature
+ org.eclipse.jgit.gpg.bc.feature
org.eclipse.jgit.http.apache.feature
org.eclipse.jgit.ssh.apache.feature
org.eclipse.jgit.lfs.feature
@@ -84,6 +85,12 @@
${project.version}
sources
+
+ org.eclipse.jgit
+ org.eclipse.jgit.gpg.bc
+ ${project.version}
+ sources
+
org.eclipse.jgit
org.eclipse.jgit.http.apache
diff --git a/org.eclipse.jgit.pgm/BUILD b/org.eclipse.jgit.pgm/BUILD
index 3ff55e43c..490f1c2ea 100644
--- a/org.eclipse.jgit.pgm/BUILD
+++ b/org.eclipse.jgit.pgm/BUILD
@@ -6,7 +6,10 @@ java_library(
resource_strip_prefix = "org.eclipse.jgit.pgm/resources",
resources = glob(["resources/**"]),
visibility = ["//visibility:public"],
- runtime_deps = [":services"],
+ runtime_deps = [
+ ":services",
+ "//org.eclipse.jgit.gpg.bc:gpg-bc",
+ ],
deps = [
"//lib:args4j",
"//lib:commons-logging",
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index 87baa396c..fb2958478 100644
--- a/org.eclipse.jgit.pgm/pom.xml
+++ b/org.eclipse.jgit.pgm/pom.xml
@@ -61,6 +61,12 @@
${project.version}
+
+ org.eclipse.jgit
+ org.eclipse.jgit.gpg.bc
+ ${project.version}
+
+
org.eclipse.jgit
org.eclipse.jgit.http.apache
diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD
index b04ac553d..cd6195e28 100644
--- a/org.eclipse.jgit.test/BUILD
+++ b/org.eclipse.jgit.test/BUILD
@@ -74,6 +74,7 @@ java_library(
resource_strip_prefix = "org.eclipse.jgit.test/resources",
resources = RESOURCES,
visibility = [
+ "//org.eclipse.jgit.gpg.bc.test:__pkg__",
"//org.eclipse.jgit.ssh.apache.test:__pkg__",
],
deps = [
diff --git a/org.eclipse.jgit/BUILD b/org.eclipse.jgit/BUILD
index dcfeb1702..19aba5254 100644
--- a/org.eclipse.jgit/BUILD
+++ b/org.eclipse.jgit/BUILD
@@ -20,9 +20,6 @@ java_library(
resources = RESOURCES,
deps = [
":insecure_cipher_factory",
- "//lib:bcpg",
- "//lib:bcpkix",
- "//lib:bcprov",
"//lib:javaewah",
"//lib:jsch",
"//lib:jzlib",
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index 1cdb6417b..1479cf99a 100644
--- a/org.eclipse.jgit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/MANIFEST.MF
@@ -6,54 +6,56 @@ Bundle-SymbolicName: org.eclipse.jgit
Bundle-Version: 5.8.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
+Eclipse-ExtensibleAPI: true
Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.api;version="5.8.0";
- uses:="org.eclipse.jgit.revwalk,
- org.eclipse.jgit.treewalk.filter,
- org.eclipse.jgit.diff,
- org.eclipse.jgit.util,
+ uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.notes,
org.eclipse.jgit.dircache,
- org.eclipse.jgit.api.errors,
org.eclipse.jgit.lib,
+ org.eclipse.jgit.revwalk,
+ org.eclipse.jgit.treewalk.filter,
+ org.eclipse.jgit.diff,
org.eclipse.jgit.treewalk,
- org.eclipse.jgit.blame,
+ org.eclipse.jgit.util,
org.eclipse.jgit.submodule,
- org.eclipse.jgit.transport,
+ org.eclipse.jgit.api.errors,
+ org.eclipse.jgit.revwalk.filter,
+ org.eclipse.jgit.blame,
org.eclipse.jgit.merge",
org.eclipse.jgit.api.errors;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.errors",
- org.eclipse.jgit.attributes;version="5.8.0",
+ org.eclipse.jgit.attributes;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk",
org.eclipse.jgit.blame;version="5.8.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff",
org.eclipse.jgit.diff;version="5.8.0";
- uses:="org.eclipse.jgit.patch,
- org.eclipse.jgit.lib,
- org.eclipse.jgit.treewalk,
+ uses:="org.eclipse.jgit.lib,
+ org.eclipse.jgit.attributes,
org.eclipse.jgit.revwalk,
+ org.eclipse.jgit.patch,
org.eclipse.jgit.treewalk.filter,
+ org.eclipse.jgit.treewalk,
org.eclipse.jgit.util",
org.eclipse.jgit.dircache;version="5.8.0";
- uses:="org.eclipse.jgit.lib,
+ uses:="org.eclipse.jgit.events,
+ org.eclipse.jgit.lib,
+ org.eclipse.jgit.attributes,
org.eclipse.jgit.treewalk,
- org.eclipse.jgit.util,
- org.eclipse.jgit.events,
- org.eclipse.jgit.attributes",
+ org.eclipse.jgit.util",
org.eclipse.jgit.errors;version="5.8.0";
- uses:="org.eclipse.jgit.lib,
- org.eclipse.jgit.internal.storage.pack,
- org.eclipse.jgit.transport,
- org.eclipse.jgit.dircache",
+ uses:="org.eclipse.jgit.transport,
+ org.eclipse.jgit.dircache,
+ org.eclipse.jgit.lib,
+ org.eclipse.jgit.internal.storage.pack",
org.eclipse.jgit.events;version="5.8.0";uses:="org.eclipse.jgit.lib",
org.eclipse.jgit.fnmatch;version="5.8.0",
org.eclipse.jgit.gitrepo;version="5.8.0";
- uses:="org.eclipse.jgit.api,
+ uses:="org.xml.sax.helpers,
+ org.eclipse.jgit.api,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
- org.xml.sax.helpers,
org.xml.sax",
org.eclipse.jgit.gitrepo.internal;version="5.8.0";x-internal:=true,
org.eclipse.jgit.hooks;version="5.8.0";uses:="org.eclipse.jgit.lib",
@@ -91,70 +93,91 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.internal.transport.parser;version="5.8.0";x-friends:="org.eclipse.jgit.http.server,org.eclipse.jgit.test",
org.eclipse.jgit.internal.transport.ssh;version="5.8.0";x-friends:="org.eclipse.jgit.ssh.apache",
org.eclipse.jgit.lib;version="5.8.0";
- uses:="org.eclipse.jgit.revwalk,
- org.eclipse.jgit.treewalk.filter,
- org.eclipse.jgit.util,
- org.eclipse.jgit.events,
+ uses:="org.eclipse.jgit.transport,
+ org.eclipse.jgit.util.sha1,
org.eclipse.jgit.dircache,
+ org.eclipse.jgit.revwalk,
org.eclipse.jgit.internal.storage.file,
+ org.eclipse.jgit.attributes,
+ org.eclipse.jgit.events,
+ com.googlecode.javaewah,
+ org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.treewalk,
- org.eclipse.jgit.transport,
- org.eclipse.jgit.submodule",
+ org.eclipse.jgit.util,
+ org.eclipse.jgit.submodule,
+ org.eclipse.jgit.util.time",
org.eclipse.jgit.lib.internal;version="5.8.0";x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.merge;version="5.8.0";
- uses:="org.eclipse.jgit.lib,
- org.eclipse.jgit.treewalk,
+ uses:="org.eclipse.jgit.dircache,
+ org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.diff,
- org.eclipse.jgit.dircache,
- org.eclipse.jgit.api",
+ org.eclipse.jgit.treewalk,
+ org.eclipse.jgit.util,
+ org.eclipse.jgit.api,
+ org.eclipse.jgit.attributes",
org.eclipse.jgit.nls;version="5.8.0",
org.eclipse.jgit.notes;version="5.8.0";
uses:="org.eclipse.jgit.lib,
- org.eclipse.jgit.treewalk,
org.eclipse.jgit.revwalk,
+ org.eclipse.jgit.treewalk,
org.eclipse.jgit.merge",
org.eclipse.jgit.patch;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.diff",
org.eclipse.jgit.revplot;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.revwalk",
org.eclipse.jgit.revwalk;version="5.8.0";
uses:="org.eclipse.jgit.lib,
- org.eclipse.jgit.treewalk,
- org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff,
- org.eclipse.jgit.revwalk.filter",
+ org.eclipse.jgit.treewalk.filter,
+ org.eclipse.jgit.revwalk.filter,
+ org.eclipse.jgit.treewalk",
org.eclipse.jgit.revwalk.filter;version="5.8.0";uses:="org.eclipse.jgit.revwalk,org.eclipse.jgit.lib,org.eclipse.jgit.util",
org.eclipse.jgit.storage.file;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.util",
org.eclipse.jgit.storage.pack;version="5.8.0";uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.submodule;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk.filter,org.eclipse.jgit.treewalk",
+ org.eclipse.jgit.submodule;version="5.8.0";
+ uses:="org.eclipse.jgit.lib,
+ org.eclipse.jgit.diff,
+ org.eclipse.jgit.treewalk.filter,
+ org.eclipse.jgit.treewalk,
+ org.eclipse.jgit.util",
org.eclipse.jgit.transport;version="5.8.0";
- uses:="org.eclipse.jgit.transport.resolver,
- org.eclipse.jgit.revwalk,
- org.eclipse.jgit.internal.storage.pack,
- com.jcraft.jsch,
- org.eclipse.jgit.util,
+ uses:="javax.crypto,
org.eclipse.jgit.util.io,
- org.eclipse.jgit.internal.storage.file,
- org.eclipse.jgit.internal.transport.parser,
org.eclipse.jgit.lib,
+ org.eclipse.jgit.revwalk,
org.eclipse.jgit.transport.http,
+ org.eclipse.jgit.internal.storage.file,
+ org.eclipse.jgit.treewalk,
+ org.eclipse.jgit.internal.transport.ssh,
+ org.eclipse.jgit.util,
+ org.eclipse.jgit.internal.storage.pack,
+ org.eclipse.jgit.transport.resolver,
+ org.eclipse.jgit.storage.pack,
org.eclipse.jgit.errors,
- org.eclipse.jgit.storage.pack",
+ com.jcraft.jsch",
org.eclipse.jgit.transport.http;version="5.8.0";uses:="javax.net.ssl",
- org.eclipse.jgit.transport.resolver;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport",
+ org.eclipse.jgit.transport.resolver;version="5.8.0";uses:="org.eclipse.jgit.transport,org.eclipse.jgit.lib",
org.eclipse.jgit.treewalk;version="5.8.0";
- uses:="org.eclipse.jgit.lib,
- org.eclipse.jgit.revwalk,
+ uses:="org.eclipse.jgit.dircache,
+ org.eclipse.jgit.lib,
org.eclipse.jgit.attributes,
+ org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
- org.eclipse.jgit.util,
- org.eclipse.jgit.dircache",
+ org.eclipse.jgit.util",
org.eclipse.jgit.treewalk.filter;version="5.8.0";uses:="org.eclipse.jgit.treewalk",
org.eclipse.jgit.util;version="5.8.0";
- uses:="org.eclipse.jgit.lib,
- org.eclipse.jgit.transport.http,
+ uses:="org.eclipse.jgit.transport,
+ org.eclipse.jgit.hooks,
+ org.eclipse.jgit.revwalk,
org.eclipse.jgit.storage.file,
- org.ietf.jgss",
- org.eclipse.jgit.util.io;version="5.8.0",
+ org.ietf.jgss,
+ org.eclipse.jgit.attributes,
+ javax.management,
+ org.eclipse.jgit.lib,
+ org.eclipse.jgit.transport.http,
+ org.eclipse.jgit.treewalk,
+ javax.net.ssl,
+ org.eclipse.jgit.util.time",
+ org.eclipse.jgit.util.io;version="5.8.0";uses:="org.eclipse.jgit.attributes,org.eclipse.jgit.lib,org.eclipse.jgit.treewalk",
org.eclipse.jgit.util.sha1;version="5.8.0",
org.eclipse.jgit.util.time;version="5.8.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -162,17 +185,6 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
com.jcraft.jsch;version="[0.1.37,0.2.0)",
javax.crypto,
javax.net.ssl,
- org.bouncycastle;version="[1.65.0,2.0.0)",
- org.bouncycastle.bcpg;version="[1.65.0,2.0.0)",
- org.bouncycastle.gpg;version="[1.65.0,2.0.0)",
- org.bouncycastle.gpg.keybox;version="[1.65.0,2.0.0)",
- org.bouncycastle.gpg.keybox.jcajce;version="[1.65.0,2.0.0)",
- org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)",
- org.bouncycastle.openpgp;version="[1.65.0,2.0.0)",
- org.bouncycastle.openpgp.jcajce;version="[1.65.0,2.0.0)",
- org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)",
- org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)",
- org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)",
org.slf4j;version="[1.7.0,2.0.0)",
org.xml.sax,
org.xml.sax.helpers
diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml
index e87fa2ed7..025ab82a0 100644
--- a/org.eclipse.jgit/pom.xml
+++ b/org.eclipse.jgit/pom.xml
@@ -56,21 +56,6 @@
slf4j-api
-
- org.bouncycastle
- bcpg-jdk15on
-
-
-
- org.bouncycastle
- bcprov-jdk15on
-
-
-
- org.bouncycastle
- bcpkix-jdk15on
-
-
@@ -169,7 +154,7 @@
false
false
false
- false
+ true
true
false
@@ -235,7 +220,7 @@
false
false
false
- false
+ true
true
false
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index 9dd632093..c6e62b440 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -305,15 +305,6 @@ flagsAlreadyCreated={0} flags already created.
funnyRefname=funny refname
gcFailed=Garbage collection failed.
gcTooManyUnpruned=Too many loose, unpruneable objects after garbage collection. Consider adjusting gc.auto or gc.pruneExpire.
-gpgFailedToParseSecretKey=Failed to parse secret key file in directory: {0}. Is the entered passphrase correct?
-gpgNoCredentialsProvider=missing credentials provider
-gpgNoKeyring=neither pubring.kbx nor secring.gpg files found
-gpgNoKeyInLegacySecring=no matching secret key found in legacy secring.gpg for key or user id: {0}
-gpgNoPublicKeyFound=Unable to find a public-key with key or user id: {0}
-gpgNoSecretKeyForPublicKey=unable to find associated secret key for public key: {0}
-gpgNotASigningKey=Secret key ({0}) is not suitable for signing
-gpgKeyInfo=GPG Key (fingerprint {0})
-gpgSigningCancelled=Signing was cancelled
headRequiredToStash=HEAD required to stash local changes
hoursAgo={0} hours ago
httpConfigCannotNormalizeURL=Cannot normalize URL path {0}: too many .. segments
@@ -619,6 +610,7 @@ shortReadOfBlock=Short read of block.
shortReadOfOptionalDIRCExtensionExpectedAnotherBytes=Short read of optional DIRC extension {0}; expected another {1} bytes within the section.
shortSkipOfBlock=Short skip of block.
signingNotSupportedOnTag=Signing isn't supported on tag operations yet.
+signingServiceUnavailable=Signing service is not available
similarityScoreMustBeWithinBounds=Similarity score must be between 0 and 100.
skipMustBeNonNegative=skip must be >= 0
skipNotAccessiblePath=The path ''{0}'' isn't accessible. Skip it.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
index 4e18b5994..b4f717503 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -27,6 +27,7 @@ import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.api.errors.NoFilepatternException;
import org.eclipse.jgit.api.errors.NoHeadException;
import org.eclipse.jgit.api.errors.NoMessageException;
+import org.eclipse.jgit.api.errors.ServiceUnavailableException;
import org.eclipse.jgit.api.errors.UnmergedPathsException;
import org.eclipse.jgit.api.errors.UnsupportedSigningFormatException;
import org.eclipse.jgit.api.errors.WrongRepositoryStateException;
@@ -55,7 +56,6 @@ import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RefUpdate.Result;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryState;
-import org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevTag;
@@ -140,12 +140,16 @@ public class CommitCommand extends GitCommand {
* collected by the setter methods of this class. Each instance of this
* class should only be used for one invocation of the command (means: one
* call to {@link #call()})
+ *
+ * @throws ServiceUnavailableException
+ * if signing service is not available e.g. since it isn't
+ * installed
*/
@Override
- public RevCommit call() throws GitAPIException, NoHeadException,
- NoMessageException, UnmergedPathsException,
- ConcurrentRefUpdateException, WrongRepositoryStateException,
- AbortedByHookException {
+ public RevCommit call() throws GitAPIException, AbortedByHookException,
+ ConcurrentRefUpdateException, NoHeadException, NoMessageException,
+ ServiceUnavailableException, UnmergedPathsException,
+ WrongRepositoryStateException {
checkCallable();
Collections.sort(only);
@@ -239,6 +243,10 @@ public class CommitCommand extends GitCommand {
commit.setTreeId(indexTreeId);
if (signCommit.booleanValue()) {
+ if (gpgSigner == null) {
+ throw new ServiceUnavailableException(
+ JGitText.get().signingServiceUnavailable);
+ }
gpgSigner.sign(commit, signingKey, committer,
credentialsProvider);
}
@@ -510,7 +518,8 @@ public class CommitCommand extends GitCommand {
*
* @throws NoMessageException
* if the commit message has not been specified
- * @throws UnsupportedSigningFormatException if the configured gpg.format is not supported
+ * @throws UnsupportedSigningFormatException
+ * if the configured gpg.format is not supported
*/
private void processOptions(RepositoryState state, RevWalk rw)
throws NoMessageException, UnsupportedSigningFormatException {
@@ -581,9 +590,6 @@ public class CommitCommand extends GitCommand {
JGitText.get().onlyOpenPgpSupportedForSigning);
}
gpgSigner = GpgSigner.getDefault();
- if (gpgSigner == null) {
- gpgSigner = new BouncyCastleGpgSigner();
- }
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ServiceUnavailableException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ServiceUnavailableException.java
new file mode 100644
index 000000000..207ded026
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ServiceUnavailableException.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2020, Matthias Sohn and
+ * other copyright owners as documented in the project's IP log.
+ *
+ * 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.api.errors;
+
+/**
+ * Exception thrown when an optional service is not available
+ *
+ * @since 5.8
+ */
+public class ServiceUnavailableException extends GitAPIException {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor for ServiceUnavailableException
+ *
+ * @param message
+ * error message
+ * @param cause
+ * a {@link java.lang.Throwable}
+ */
+ public ServiceUnavailableException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Constructor for ServiceUnavailableException
+ *
+ * @param message
+ * error message
+ */
+ public ServiceUnavailableException(String message) {
+ super(message);
+ }
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index f18ecb921..9d122ba12 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -333,15 +333,6 @@ public class JGitText extends TranslationBundle {
/***/ public String funnyRefname;
/***/ public String gcFailed;
/***/ public String gcTooManyUnpruned;
- /***/ public String gpgFailedToParseSecretKey;
- /***/ public String gpgNoCredentialsProvider;
- /***/ public String gpgNoKeyring;
- /***/ public String gpgNoKeyInLegacySecring;
- /***/ public String gpgNoPublicKeyFound;
- /***/ public String gpgNoSecretKeyForPublicKey;
- /***/ public String gpgNotASigningKey;
- /***/ public String gpgKeyInfo;
- /***/ public String gpgSigningCancelled;
/***/ public String headRequiredToStash;
/***/ public String hoursAgo;
/***/ public String httpConfigCannotNormalizeURL;
@@ -647,6 +638,7 @@ public class JGitText extends TranslationBundle {
/***/ public String shortReadOfOptionalDIRCExtensionExpectedAnotherBytes;
/***/ public String shortSkipOfBlock;
/***/ public String signingNotSupportedOnTag;
+ /***/ public String signingServiceUnavailable;
/***/ public String similarityScoreMustBeWithinBounds;
/***/ public String skipMustBeNonNegative;
/***/ public String skipNotAccessiblePath;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java
index d953a0194..5b32cf0b5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java
@@ -9,11 +9,16 @@
*/
package org.eclipse.jgit.lib;
+import java.util.Iterator;
+import java.util.ServiceConfigurationError;
+import java.util.ServiceLoader;
+
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.api.errors.CanceledException;
-import org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner;
import org.eclipse.jgit.transport.CredentialsProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Creates GPG signatures for Git objects.
@@ -21,8 +26,23 @@ import org.eclipse.jgit.transport.CredentialsProvider;
* @since 5.3
*/
public abstract class GpgSigner {
+ private static final Logger LOG = LoggerFactory.getLogger(GpgSigner.class);
+
+ private static GpgSigner defaultSigner = loadGpgSigner();
- private static GpgSigner defaultSigner = new BouncyCastleGpgSigner();
+ private static GpgSigner loadGpgSigner() {
+ try {
+ ServiceLoader loader = ServiceLoader
+ .load(GpgSigner.class);
+ Iterator iter = loader.iterator();
+ if (iter.hasNext()) {
+ return iter.next();
+ }
+ } catch (ServiceConfigurationError e) {
+ LOG.error(e.getMessage(), e);
+ }
+ return null;
+ }
/**
* Get the default signer, or null
.
diff --git a/pom.xml b/pom.xml
index ec5cbc5aa..eddb040a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -766,7 +766,7 @@
org.bouncycastle
bcprov-jdk15on
- ${bouncycastle-version}
+ 1.65.01
@@ -988,6 +988,7 @@
org.eclipse.jgit.ant
org.eclipse.jgit.archive
org.eclipse.jgit.ui
+ org.eclipse.jgit.gpg.bc
org.eclipse.jgit.http.apache
org.eclipse.jgit.http.server
org.eclipse.jgit.ssh.apache
@@ -1000,6 +1001,7 @@
org.eclipse.jgit.test
org.eclipse.jgit.ant.test
+ org.eclipse.jgit.gpg.bc.test
org.eclipse.jgit.http.test
org.eclipse.jgit.pgm.test
org.eclipse.jgit.lfs.test
From 8d2d683655e2de17cf465fa46af10e0e56b3aaed Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Fri, 24 Apr 2020 22:41:39 +0200
Subject: [PATCH 33/55] Decouple JSch from JGit Core
Motivation: JSch serves as 'default' implementations of the SSH
transport. If a client application does not use it then there is no need
to pull in this dependency.
Move the classes depending on JSch to an OSGi fragment extending the
org.eclipse.jgit bundle and keep them in the same package as before
since moving them to another package would break API. Defer moving them
to a separate package to the next major release.
Add a new feature org.eclipse.jgit.ssh.jsch feature to enable
installation. With that users can now decide which of the ssh client
integrations (JCraft JSch or Apache Mina SSHD) they want to install.
We will remove the JCraft JSch integration in a later step due to the
reasons discussed in bug 520927.
Bug: 553625
Change-Id: I5979c8a9dbbe878a2e8ac0fbfde7230059d74dc2
Also-by: Michael Dardis
Signed-off-by: Michael Dardis
Signed-off-by: Matthias Sohn
Signed-off-by: David Ostrovsky
---
lib/BUILD | 6 +-
org.eclipse.jgit.junit.ssh/.classpath | 1 +
org.eclipse.jgit.junit.ssh/BUILD | 7 +
.../META-INF/MANIFEST.MF | 11 +-
org.eclipse.jgit.junit.ssh/build.properties | 3 +-
org.eclipse.jgit.junit.ssh/pom.xml | 19 +
.../org/eclipse/jgit/junit}/ssh/id_dsa | 0
.../org/eclipse/jgit/junit}/ssh/id_dsa.pub | 0
.../eclipse/jgit/junit}/ssh/id_dsa_testpass | 0
.../jgit/junit}/ssh/id_dsa_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_ecdsa_256 | 0
.../eclipse/jgit/junit}/ssh/id_ecdsa_256.pub | 0
.../jgit/junit}/ssh/id_ecdsa_256_testpass | 0
.../jgit/junit}/ssh/id_ecdsa_256_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_ecdsa_384 | 0
.../eclipse/jgit/junit}/ssh/id_ecdsa_384.pub | 0
.../jgit/junit}/ssh/id_ecdsa_384_testpass | 0
.../jgit/junit}/ssh/id_ecdsa_384_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_ecdsa_521 | 0
.../eclipse/jgit/junit}/ssh/id_ecdsa_521.pub | 0
.../jgit/junit}/ssh/id_ecdsa_521_testpass | 0
.../jgit/junit}/ssh/id_ecdsa_521_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_ed25519 | 0
.../eclipse/jgit/junit}/ssh/id_ed25519.pub | 0
.../junit}/ssh/id_ed25519_expensive_testpass | 0
.../ssh/id_ed25519_expensive_testpass.pub | 0
.../jgit/junit}/ssh/id_ed25519_testpass | 0
.../jgit/junit}/ssh/id_ed25519_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_rsa_1024 | 0
.../eclipse/jgit/junit}/ssh/id_rsa_1024.pub | 0
.../jgit/junit}/ssh/id_rsa_1024_testpass | 0
.../jgit/junit}/ssh/id_rsa_1024_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_rsa_2048 | 0
.../eclipse/jgit/junit}/ssh/id_rsa_2048.pub | 0
.../jgit/junit}/ssh/id_rsa_2048_testpass | 0
.../jgit/junit}/ssh/id_rsa_2048_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_rsa_3072 | 0
.../eclipse/jgit/junit}/ssh/id_rsa_3072.pub | 0
.../jgit/junit}/ssh/id_rsa_3072_testpass | 0
.../jgit/junit}/ssh/id_rsa_3072_testpass.pub | 0
.../org/eclipse/jgit/junit}/ssh/id_rsa_4096 | 0
.../eclipse/jgit/junit}/ssh/id_rsa_4096.pub | 0
.../jgit/junit}/ssh/id_rsa_4096_testpass | 0
.../jgit/junit}/ssh/id_rsa_4096_testpass.pub | 0
.../eclipse/jgit/junit}/ssh/SshTestBase.java | 20 +-
.../jgit/junit}/ssh/SshTestHarness.java | 3 +-
.../org.eclipse.jgit.feature/feature.xml | 14 -
.../org.eclipse.jgit.repository/category.xml | 3 +
.../org.eclipse.jgit.repository/pom.xml | 5 +
.../feature.xml | 7 +
.../.gitignore | 1 +
.../.project | 17 +
.../.settings/org.eclipse.core.runtime.prefs | 2 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../org.eclipse.mylyn.tasks.ui.prefs | 3 +
.../.settings/org.eclipse.mylyn.team.ui.prefs | 2 +
.../build.properties | 4 +
.../edl-v10.html | 59 +++
.../feature.properties | 176 ++++++++
.../feature.xml | 50 +++
.../license.html | 168 ++++++++
.../org.eclipse.jgit.ssh.jsch.feature/pom.xml | 44 ++
org.eclipse.jgit.packaging/pom.xml | 7 +
org.eclipse.jgit.pgm.test/pom.xml | 6 +
org.eclipse.jgit.pgm/BUILD | 1 +
org.eclipse.jgit.pgm/pom.xml | 6 +
.../src/org/eclipse/jgit/pgm/TextBuiltin.java | 4 +
org.eclipse.jgit.ssh.apache.test/BUILD | 2 +-
.../META-INF/MANIFEST.MF | 2 +-
org.eclipse.jgit.ssh.apache.test/pom.xml | 6 +
.../jgit/transport/sshd/ApacheSshTest.java | 2 +-
.../transport/sshd/NoFilesSshBuilderTest.java | 2 +-
.../jgit/transport/sshd/NoFilesSshTest.java | 2 +-
...g.eclipse.jgit.transport.SshSessionFactory | 1 +
.../transport/sshd/SshdSessionFactory.java | 7 +
org.eclipse.jgit.ssh.jsch.test/.classpath | 11 +
org.eclipse.jgit.ssh.jsch.test/.gitignore | 2 +
org.eclipse.jgit.ssh.jsch.test/.project | 28 ++
.../org.eclipse.core.resources.prefs | 3 +
.../.settings/org.eclipse.core.runtime.prefs | 2 +
.../.settings/org.eclipse.jdt.apt.core.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 403 ++++++++++++++++++
.../.settings/org.eclipse.jdt.ui.prefs | 66 +++
.../org.eclipse.mylyn.tasks.ui.prefs | 3 +
.../.settings/org.eclipse.mylyn.team.ui.prefs | 2 +
.../.settings/org.eclipse.pde.api.tools.prefs | 104 +++++
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.pde.prefs | 34 ++
org.eclipse.jgit.ssh.jsch.test/BUILD | 19 +
.../META-INF/MANIFEST.MF | 24 ++
org.eclipse.jgit.ssh.jsch.test/about.html | 96 +++++
.../build.properties | 5 +
.../plugin.properties | 2 +
org.eclipse.jgit.ssh.jsch.test/pom.xml | 118 +++++
.../eclipse/jgit/transport/JSchSshTest.java | 4 +-
.../JschConfigSessionFactoryTest.java | 4 +-
.../jgit/transport/OpenSshConfigTest.java | 1 +
org.eclipse.jgit.ssh.jsch/.classpath | 8 +
org.eclipse.jgit.ssh.jsch/.fbprefs | 125 ++++++
org.eclipse.jgit.ssh.jsch/.gitignore | 2 +
org.eclipse.jgit.ssh.jsch/.project | 34 ++
.../org.eclipse.core.resources.prefs | 2 +
.../.settings/org.eclipse.core.runtime.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 399 +++++++++++++++++
.../.settings/org.eclipse.jdt.ui.prefs | 66 +++
.../org.eclipse.mylyn.tasks.ui.prefs | 3 +
.../.settings/org.eclipse.mylyn.team.ui.prefs | 2 +
.../.settings/org.eclipse.pde.api.tools.prefs | 104 +++++
.../.settings/org.eclipse.pde.core.prefs | 2 +
org.eclipse.jgit.ssh.jsch/BUILD | 20 +
.../META-INF/MANIFEST.MF | 26 ++
.../META-INF/SOURCE-MANIFEST.MF | 7 +
org.eclipse.jgit.ssh.jsch/about.html | 96 +++++
org.eclipse.jgit.ssh.jsch/build.properties | 7 +
org.eclipse.jgit.ssh.jsch/plugin.properties | 2 +
org.eclipse.jgit.ssh.jsch/pom.xml | 218 ++++++++++
...g.eclipse.jgit.transport.SshSessionFactory | 1 +
.../transport/jsch/JSchText.properties | 4 +
.../internal/transport/jsch/JSchText.java | 35 ++
.../CredentialsProviderUserInfo.java | 1 +
.../transport/JschConfigSessionFactory.java | 23 +-
.../eclipse/jgit/transport/JschSession.java | 5 +-
.../eclipse/jgit/transport/OpenSshConfig.java | 5 +-
org.eclipse.jgit.test/.classpath | 7 +-
org.eclipse.jgit.test/BUILD | 22 -
org.eclipse.jgit.test/META-INF/MANIFEST.MF | 4 -
org.eclipse.jgit.test/build.properties | 3 +-
org.eclipse.jgit.test/pom.xml | 3 -
org.eclipse.jgit.test/tests.bzl | 16 -
org.eclipse.jgit/.settings/.api_filters | 48 +++
org.eclipse.jgit/BUILD | 2 -
org.eclipse.jgit/META-INF/MANIFEST.MF | 98 +++--
org.eclipse.jgit/pom.xml | 10 -
...g.eclipse.jgit.transport.SshSessionFactory | 1 -
.../eclipse/jgit/internal/JGitText.properties | 2 -
.../org/eclipse/jgit/internal/JGitText.java | 2 -
.../transport/DefaultSshSessionFactory.java | 36 --
.../jgit/transport/SshSessionFactory.java | 16 +-
.../jgit/transport/TransportGitSsh.java | 7 +
pom.xml | 2 +
140 files changed, 2910 insertions(+), 180 deletions(-)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_dsa (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_dsa.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_dsa_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_dsa_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_256 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_256.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_256_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_256_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_384 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_384.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_384_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_384_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_521 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_521.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_521_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ecdsa_521_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ed25519 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ed25519.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ed25519_expensive_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ed25519_expensive_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ed25519_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_ed25519_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_1024 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_1024.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_1024_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_1024_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_2048 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_2048.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_2048_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_2048_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_3072 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_3072.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_3072_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_3072_testpass.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_4096 (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_4096.pub (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_4096_testpass (100%)
rename {org.eclipse.jgit.test/resources/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit}/ssh/id_rsa_4096_testpass.pub (100%)
rename {org.eclipse.jgit.test/src/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit}/ssh/SshTestBase.java (98%)
rename {org.eclipse.jgit.test/src/org/eclipse/jgit/transport => org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit}/ssh/SshTestHarness.java (99%)
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.gitignore
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.project
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.core.runtime.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.m2e.core.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.team.ui.prefs
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/build.properties
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/edl-v10.html
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.properties
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/license.html
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml
create mode 100644 org.eclipse.jgit.ssh.apache/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.classpath
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.gitignore
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.project
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.resources.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.runtime.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.apt.core.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.ui.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.tasks.ui.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.team.ui.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.api.tools.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.core.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch.test/BUILD
create mode 100644 org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
create mode 100644 org.eclipse.jgit.ssh.jsch.test/about.html
create mode 100644 org.eclipse.jgit.ssh.jsch.test/build.properties
create mode 100644 org.eclipse.jgit.ssh.jsch.test/plugin.properties
create mode 100644 org.eclipse.jgit.ssh.jsch.test/pom.xml
rename {org.eclipse.jgit.test => org.eclipse.jgit.ssh.jsch.test}/tst/org/eclipse/jgit/transport/JSchSshTest.java (95%)
rename {org.eclipse.jgit.test => org.eclipse.jgit.ssh.jsch.test}/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java (98%)
rename {org.eclipse.jgit.test => org.eclipse.jgit.ssh.jsch.test}/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java (99%)
create mode 100644 org.eclipse.jgit.ssh.jsch/.classpath
create mode 100644 org.eclipse.jgit.ssh.jsch/.fbprefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.gitignore
create mode 100644 org.eclipse.jgit.ssh.jsch/.project
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.resources.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.runtime.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.ui.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.tasks.ui.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.team.ui.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.api.tools.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.core.prefs
create mode 100644 org.eclipse.jgit.ssh.jsch/BUILD
create mode 100644 org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
create mode 100644 org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
create mode 100644 org.eclipse.jgit.ssh.jsch/about.html
create mode 100644 org.eclipse.jgit.ssh.jsch/build.properties
create mode 100644 org.eclipse.jgit.ssh.jsch/plugin.properties
create mode 100644 org.eclipse.jgit.ssh.jsch/pom.xml
create mode 100644 org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
create mode 100644 org.eclipse.jgit.ssh.jsch/resources/org/eclipse/jgit/internal/transport/jsch/JSchText.properties
create mode 100644 org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/jsch/JSchText.java
rename {org.eclipse.jgit => org.eclipse.jgit.ssh.jsch}/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java (98%)
rename {org.eclipse.jgit => org.eclipse.jgit.ssh.jsch}/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java (96%)
rename {org.eclipse.jgit => org.eclipse.jgit.ssh.jsch}/src/org/eclipse/jgit/transport/JschSession.java (98%)
rename {org.eclipse.jgit => org.eclipse.jgit.ssh.jsch}/src/org/eclipse/jgit/transport/OpenSshConfig.java (98%)
delete mode 100644 org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
delete mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java
diff --git a/lib/BUILD b/lib/BUILD
index a6864fa36..7720696b3 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -35,6 +35,7 @@ java_library(
visibility = [
"//org.eclipse.jgit.ssh.apache:__pkg__",
"//org.eclipse.jgit.ssh.apache.test:__pkg__",
+ "//org.eclipse.jgit.ssh.jsch.test:__pkg__",
],
exports = ["@eddsa//jar"],
)
@@ -145,7 +146,9 @@ java_library(
name = "jsch",
visibility = [
"//org.eclipse.jgit:__pkg__",
- "//org.eclipse.jgit.test:__pkg__",
+ "//org.eclipse.jgit.junit.ssh:__pkg__",
+ "//org.eclipse.jgit.ssh.jsch:__pkg__",
+ "//org.eclipse.jgit.ssh.jsch.test:__pkg__",
],
exports = ["@jsch//jar"],
)
@@ -184,6 +187,7 @@ java_library(
name = "jzlib",
visibility = [
"//org.eclipse.jgit:__pkg__",
+ "//org.eclipse.jgit.ssh.jsch:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
exports = ["@jzlib//jar"],
diff --git a/org.eclipse.jgit.junit.ssh/.classpath b/org.eclipse.jgit.junit.ssh/.classpath
index eca7bdba8..110168ffa 100644
--- a/org.eclipse.jgit.junit.ssh/.classpath
+++ b/org.eclipse.jgit.junit.ssh/.classpath
@@ -3,5 +3,6 @@
+
diff --git a/org.eclipse.jgit.junit.ssh/BUILD b/org.eclipse.jgit.junit.ssh/BUILD
index 906053e39..61b5ce78c 100644
--- a/org.eclipse.jgit.junit.ssh/BUILD
+++ b/org.eclipse.jgit.junit.ssh/BUILD
@@ -8,10 +8,17 @@ java_library(
srcs = glob(["src/**/*.java"]),
resource_strip_prefix = "org.eclipse.jgit.junit.ssh/resources",
resources = glob(["resources/**"]),
+ visibility = [
+ "//org.eclipse.jgit.ssh.apache.test:__pkg__",
+ "//org.eclipse.jgit.ssh.jsch.test:__pkg__",
+ ],
deps = [
+ "//lib:jsch",
+ "//lib:junit",
"//lib:sshd-osgi",
"//lib:sshd-sftp",
# We want these deps to be provided_deps
"//org.eclipse.jgit:jgit",
+ "//org.eclipse.jgit.junit:junit",
],
)
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
index 27223b2de..9a34eff44 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.apache.sshd.common;version="[2.4.0,2.5.0)",
+Import-Package: com.jcraft.jsch;version="0.1.55",
+ org.apache.sshd.common;version="[2.4.0,2.5.0)",
org.apache.sshd.common.config.keys;version="[2.4.0,2.5.0)",
org.apache.sshd.common.file.virtualfs;version="[2.4.0,2.5.0)",
org.apache.sshd.common.helpers;version="[2.4.0,2.5.0)",
@@ -31,7 +32,15 @@ Import-Package: org.apache.sshd.common;version="[2.4.0,2.5.0)",
org.apache.sshd.server.subsystem;version="[2.4.0,2.5.0)",
org.apache.sshd.server.subsystem.sftp;version="[2.4.0,2.5.0)",
org.eclipse.jgit.annotations;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.api;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.api.errors;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.errors;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.junit;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lib;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.revwalk;version="[5.8.0,5.9.0)",
org.eclipse.jgit.transport;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.util;version="[5.8.0,5.9.0)",
+ org.junit;version="[4.13,5.0.0)",
+ org.junit.experimental.theories;version="[4.13,5.0.0)",
org.slf4j;version="[1.7.0,2.0.0)"
Export-Package: org.eclipse.jgit.junit.ssh;version="5.8.0"
diff --git a/org.eclipse.jgit.junit.ssh/build.properties b/org.eclipse.jgit.junit.ssh/build.properties
index aa1a00826..84f1c95cf 100644
--- a/org.eclipse.jgit.junit.ssh/build.properties
+++ b/org.eclipse.jgit.junit.ssh/build.properties
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ resources/
output.. = bin/
bin.includes = META-INF/,\
.,\
diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml
index 9f9dc26e6..6eaea83ee 100644
--- a/org.eclipse.jgit.junit.ssh/pom.xml
+++ b/org.eclipse.jgit.junit.ssh/pom.xml
@@ -39,6 +39,12 @@
${project.version}
+
+ org.eclipse.jgit
+ org.eclipse.jgit.junit
+ ${project.version}
+
+
org.apache.sshd
sshd-osgi
@@ -51,6 +57,16 @@
${apache-sshd-version}
+
+ com.jcraft
+ jsch
+
+
+
+ com.jcraft
+ jzlib
+
+
junit
junit
@@ -68,6 +84,9 @@
plugin.properties
+
+ resources/
+
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096.pub
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass.pub
similarity index 100%
rename from org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass.pub
rename to org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass.pub
diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestBase.java
similarity index 98%
rename from org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
rename to org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestBase.java
index c22c10cb7..2d284cf1d 100644
--- a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
+++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestBase.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.transport.ssh;
+package org.eclipse.jgit.junit.ssh;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertArrayEquals;
@@ -25,7 +25,6 @@ import java.util.Locale;
import org.eclipse.jgit.api.errors.TransportException;
import org.eclipse.jgit.transport.CredentialItem;
-import org.eclipse.jgit.transport.JschConfigSessionFactory;
import org.junit.Test;
import org.junit.experimental.theories.DataPoints;
import org.junit.experimental.theories.Theory;
@@ -140,6 +139,10 @@ public abstract class SshTestBase extends SshTestHarness {
provider.getLog().size());
}
+ private boolean isJsch() {
+ return getSessionFactory().getType().equals("jsch");
+ }
+
@Test
public void testSshWithConfigEncryptedUnusedKeyInConfigFirst()
throws Exception {
@@ -148,7 +151,7 @@ public abstract class SshTestBase extends SshTestHarness {
// JschConfigSessionFactory)); gives in bazel a failure with "Never
// found parameters that satisfied method assumptions."
// In maven it's fine!?
- if (getSessionFactory() instanceof JschConfigSessionFactory) {
+ if (isJsch()) {
return;
}
// Copy the encrypted test key from the bundle.
@@ -258,7 +261,7 @@ public abstract class SshTestBase extends SshTestHarness {
"IdentityFile " + privateKey1.getAbsolutePath());
List messages = provider.getLog();
assertFalse("Expected user interaction", messages.isEmpty());
- if (getSessionFactory() instanceof JschConfigSessionFactory) {
+ if (isJsch()) {
// JSch doesn't create a non-existing file.
assertEquals("Expected to be asked about the key", 1,
messages.size());
@@ -295,7 +298,7 @@ public abstract class SshTestBase extends SshTestHarness {
"User " + TEST_USER, //
"StrictHostKeyChecking accept-new", //
"IdentityFile " + privateKey1.getAbsolutePath());
- if (getSessionFactory() instanceof JschConfigSessionFactory) {
+ if (isJsch()) {
// JSch doesn't create new files.
assertTrue("CredentialsProvider not called",
provider.getLog().isEmpty());
@@ -772,10 +775,9 @@ public abstract class SshTestBase extends SshTestHarness {
public void testSshKeys(String keyName) throws Exception {
// JSch fails on ECDSA 384/521 keys. Compare
// https://sourceforge.net/p/jsch/patches/10/
- assumeTrue(!(getSessionFactory() instanceof JschConfigSessionFactory
- && (keyName.contains("ed25519")
- || keyName.startsWith("id_ecdsa_384")
- || keyName.startsWith("id_ecdsa_521"))));
+ assumeTrue(!(isJsch() && (keyName.contains("ed25519")
+ || keyName.startsWith("id_ecdsa_384")
+ || keyName.startsWith("id_ecdsa_521"))));
File cloned = new File(getTemporaryDirectory(), "cloned");
String keyFileName = keyName + "_key";
File privateKey = new File(sshDir, keyFileName);
diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestHarness.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java
similarity index 99%
rename from org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestHarness.java
rename to org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java
index 632c24b89..43f9dc4b2 100644
--- a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestHarness.java
+++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java
@@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-package org.eclipse.jgit.transport.ssh;
+package org.eclipse.jgit.junit.ssh;
import static java.nio.charset.StandardCharsets.US_ASCII;
import static java.nio.charset.StandardCharsets.UTF_8;
@@ -36,7 +36,6 @@ import org.eclipse.jgit.api.PushCommand;
import org.eclipse.jgit.api.ResetCommand.ResetType;
import org.eclipse.jgit.errors.UnsupportedCredentialItem;
import org.eclipse.jgit.junit.RepositoryTestCase;
-import org.eclipse.jgit.junit.ssh.SshTestGitServer;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
index 0026a98c0..9ffc6c235 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
@@ -36,13 +36,6 @@
version="0.0.0"
unpack="false"/>
-
-
-
-
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
index b71afc5cd..2907995b5 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
@@ -91,6 +91,11 @@
org.eclipse.jgit.ssh.apache
${project.version}
+
+ org.eclipse.jgit
+ org.eclipse.jgit.ssh.jsch
+ ${project.version}
+
org.eclipse.jgit
org.eclipse.jgit.ui
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
index 8ac2c631c..44d2129a8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
@@ -110,6 +110,13 @@
version="0.0.0"
unpack="false"/>
+
+
+
+ org.eclipse.jgit.ssh.jsch.feature
+
+
+
+
+
+ org.eclipse.pde.FeatureBuilder
+
+
+
+
+
+ org.eclipse.pde.FeatureNature
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 000000000..f897a7f1c
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..3dec4d97c
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 000000000..984263dd9
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.description}\n\nBug\: ${task.key}
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/build.properties
new file mode 100644
index 000000000..b4a8dde9e
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/build.properties
@@ -0,0 +1,4 @@
+bin.includes = feature.xml,\
+ edl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/edl-v10.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/edl-v10.html
new file mode 100644
index 000000000..1826b47af
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/edl-v10.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+Eclipse Distribution License - Version 1.0
+
+
+
+
+
+
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+- Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.properties
new file mode 100644
index 000000000..dc79b3230
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.properties
@@ -0,0 +1,176 @@
+###############################################################################
+# Copyright (c) 2020 Matthias Sohn and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+###############################################################################
+
+featureName=Java implementation of Git - ssh support using JCraft jsch
+providerName=Eclipse JGit
+
+updateSiteName=Eclipse JGit Update Site
+
+# description property - text of the "Feature Description"
+description=\
+Ssh support using JCraft jsch.\n
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2020 Matthias Sohn and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Distribution License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/org/documents/edl-v10.html\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+\n\
+November 22, 2017\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\
+AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\
+THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\
+TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\
+BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\
+AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\
+APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\
+MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public License\n\
+Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\
+available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\
+"Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code, documentation\n\
+and other files maintained in the Eclipse Foundation source code repository\n\
+("Repository") in software modules ("Modules") and made available as\n\
+downloadable archives ("Downloads").\n\
+\n\
+- Content may be structured and packaged into modules to facilitate\n\
+ delivering, extending, and upgrading the Content. Typical modules may\n\
+ include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\
+ features ("Features").\n\
+- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\
+ (Java\u2122 ARchive) in a directory named "plugins".\n\
+- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\
+ associated material. Each Feature may be packaged as a sub-directory in a\n\
+ directory named "features". Within a Feature, files named "feature.xml" may\n\
+ contain a list of the names and version numbers of the Plug-ins and/or\n\
+ Fragments associated with that Feature.\n\
+- Features may also include other Features ("Included Features"). Within a\n\
+ Feature, files named "feature.xml" may contain a list of the names and\n\
+ version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be contained in\n\
+files named "about.html" ("Abouts"). The terms and conditions governing Features\n\
+and Included Features should be contained in files named "license.html"\n\
+("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\
+directory of a Download or Module including, but not limited to the following\n\
+locations:\n\
+\n\
+- The top-level (root) directory\n\
+- Plug-in and Fragment directories\n\
+- Inside Plug-ins and Fragments packaged as JARs\n\
+- Sub-directories of the directory named "src" of certain Plug-ins\n\
+- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using\n\
+the Provisioning Technology (as defined below), you must agree to a license\n\
+("Feature Update License") during the installation process. If the Feature\n\
+contains Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform you\n\
+where you can locate them. Feature Update Licenses may be found in the "license"\n\
+property of files named "feature.properties" found within a Feature. Such\n\
+Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your use of\n\
+the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\
+OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+- Eclipse Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/epl-v10.html)\n\
+- Eclipse Distribution License Version 1.0 (available at\n\
+ http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+- Common Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/cpl-v10.html)\n\
+- Apache Software License 1.1 (available at\n\
+ http://www.apache.org/licenses/LICENSE)\n\
+- Apache Software License 2.0 (available at\n\
+ http://www.apache.org/licenses/LICENSE-2.0)\n\
+- Mozilla Public License Version 1.1 (available at\n\
+ http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\
+USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\
+provided, please contact the Eclipse Foundation to determine what terms and\n\
+conditions govern that particular Content.\n\
+\n\
+Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which\n\
+include, but are not limited to, p2 and the Eclipse Update Manager\n\
+("Provisioning Technology") for the purpose of allowing users to install\n\
+software, documentation, information and/or other materials (collectively\n\
+"Installable Software"). This capability is provided with the intent of allowing\n\
+such users to install, extend and update Eclipse-based products. Information\n\
+about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install\n\
+Installable Software. You shall be responsible for enabling the applicable\n\
+license agreements relating to the Installable Software to be presented to, and\n\
+accepted by, the users of the Provisioning Technology in accordance with the\n\
+Specification. By using Provisioning Technology in such a manner and making it\n\
+available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the\n\
+following:\n\
+\n\
+1. A series of actions may occur ("Provisioning Process") in which a user may\n\
+ execute the Provisioning Technology on a machine ("Target Machine") with the\n\
+ intent of installing, extending or updating the functionality of an\n\
+ Eclipse-based product.\n\
+2. During the Provisioning Process, the Provisioning Technology may cause third\n\
+ party Installable Software or a portion thereof to be accessed and copied to\n\
+ the Target Machine.\n\
+3. Pursuant to the Specification, you will provide to the user the terms and\n\
+ conditions that govern the use of the Installable Software ("Installable\n\
+ Software Agreement") and such Installable Software Agreement shall be\n\
+ accessed from the Target Machine in accordance with the Specification. Such\n\
+ Installable Software Agreement must inform the user of the terms and\n\
+ conditions that govern the Installable Software and must solicit acceptance\n\
+ by the end user in the manner prescribed in such Installable\n\
+ Software Agreement. Upon such indication of agreement by the user, the\n\
+ provisioning Technology will complete installation of the\n\
+ Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are currently\n\
+may have restrictions on the import, possession, and use, and/or re-export to\n\
+another country, of encryption software. BEFORE using any encryption software,\n\
+please check the country's laws, regulations and policies concerning the import,\n\
+possession, or use, and re-export of encryption software, to see if this is\n\
+permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\
+United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
new file mode 100644
index 000000000..7dbf71f07
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
@@ -0,0 +1,50 @@
+
+
+
+
+ %description
+
+
+
+ %copyright
+
+
+
+ %license
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/license.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/license.html
new file mode 100644
index 000000000..004b6dec6
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/license.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+Eclipse Foundation Software User Agreement
+
+
+ Eclipse Foundation Software User Agreement
+ November 22, 2017
+ Usage Of Content
+ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
+ INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY
+ THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS
+ GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY
+ APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
+ AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
+ AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
+ USE THE CONTENT.
+ Applicable Licenses
+
+ Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+ Eclipse Public License Version 2.0 ("EPL"). A copy of the
+ EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-2.0.
+ For purposes of the EPL, "Program" will mean the Content.
+
+ Content includes, but is not limited to, source code, object
+ code, documentation and other files maintained in the Eclipse
+ Foundation source code repository ("Repository") in software
+ modules ("Modules") and made available as downloadable
+ archives ("Downloads").
+
+ - Content may be structured and packaged into modules to
+ facilitate delivering, extending, and upgrading the Content. Typical
+ modules may include plug-ins ("Plug-ins"), plug-in
+ fragments ("Fragments"), and features
+ ("Features").
+ - Each Plug-in or Fragment may be packaged as a sub-directory
+ or JAR (Java™ ARchive) in a directory named
+ "plugins".
+ - A Feature is a bundle of one or more Plug-ins and/or
+ Fragments and associated material. Each Feature may be packaged as a
+ sub-directory in a directory named "features". Within a
+ Feature, files named "feature.xml" may contain a list of
+ the names and version numbers of the Plug-ins and/or Fragments
+ associated with that Feature.
+ - Features may also include other Features ("Included
+ Features"). Within a Feature, files named
+ "feature.xml" may contain a list of the names and version
+ numbers of Included Features.
+
+ The terms and conditions governing Plug-ins and Fragments should
+ be contained in files named "about.html"
+ ("Abouts"). The terms and conditions governing Features and
+ Included Features should be contained in files named
+ "license.html" ("Feature Licenses"). Abouts and
+ Feature Licenses may be located in any directory of a Download or
+ Module including, but not limited to the following locations:
+
+ - The top-level (root) directory
+ - Plug-in and Fragment directories
+ - Inside Plug-ins and Fragments packaged as JARs
+ - Sub-directories of the directory named "src" of
+ certain Plug-ins
+ - Feature directories
+
+ Note: if a Feature made available by the Eclipse Foundation is
+ installed using the Provisioning Technology (as defined below), you
+ must agree to a license ("Feature Update License") during
+ the installation process. If the Feature contains Included Features,
+ the Feature Update License should either provide you with the terms
+ and conditions governing the Included Features or inform you where you
+ can locate them. Feature Update Licenses may be found in the
+ "license" property of files named
+ "feature.properties" found within a Feature. Such Abouts,
+ Feature Licenses, and Feature Update Licenses contain the terms and
+ conditions (or references to such terms and conditions) that govern
+ your use of the associated Content in that directory.
+ THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY
+ REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+ CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT
+ ARE NOT LIMITED TO):
+
+ IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+ CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+ or Feature Update License is provided, please contact the Eclipse
+ Foundation to determine what terms and conditions govern that
+ particular Content.
+ Use of Provisioning Technology
+
+ The Eclipse Foundation makes available provisioning software, examples
+ of which include, but are not limited to, p2 and the Eclipse Update
+ Manager ("Provisioning Technology") for the purpose of
+ allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+ capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+ packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html
+ ("Specification").
+
+ You may use Provisioning Technology to allow other parties to
+ install Installable Software. You shall be responsible for enabling
+ the applicable license agreements relating to the Installable Software
+ to be presented to, and accepted by, the users of the Provisioning
+ Technology in accordance with the Specification. By using Provisioning
+ Technology in such a manner and making it available in accordance with
+ the Specification, you further acknowledge your agreement to, and the
+ acquisition of all necessary rights to permit the following:
+
+ - A series of actions may occur ("Provisioning
+ Process") in which a user may execute the Provisioning
+ Technology on a machine ("Target Machine") with the intent
+ of installing, extending or updating the functionality of an
+ Eclipse-based product.
+ - During the Provisioning Process, the Provisioning Technology
+ may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.
+ - Pursuant to the Specification, you will provide to the user
+ the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such
+ Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+ Software Agreement must inform the user of the terms and conditions
+ that govern the Installable Software and must solicit acceptance by
+ the end user in the manner prescribed in such Installable Software
+ Agreement. Upon such indication of agreement by the user, the
+ provisioning Technology will complete installation of the Installable
+ Software.
+
+ Cryptography
+ Content may contain encryption software. The country in which
+ you are currently may have restrictions on the import, possession, and
+ use, and/or re-export to another country, of encryption software.
+ BEFORE using any encryption software, please check the country's laws,
+ regulations and policies concerning the import, possession, or use,
+ and re-export of encryption software, to see if this is permitted.
+
+ Java and all Java-based trademarks are trademarks of
+ Oracle Corporation in the United States, other countries, or both.
+
+
+
\ No newline at end of file
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml
new file mode 100644
index 000000000..19905b625
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml
@@ -0,0 +1,44 @@
+
+
+
+
+ 4.0.0
+
+
+ org.eclipse.jgit
+ jgit.tycho.parent
+ 5.8.0-SNAPSHOT
+
+
+ org.eclipse.jgit.feature
+ org.eclipse.jgit.ssh.jsch
+ eclipse-feature
+
+ JGit - Ssh support using JCraft jsch
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.ssh.jsch
+ ${project.version}
+
+
+
+
+
diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml
index 2f12b50e6..b066b12c2 100644
--- a/org.eclipse.jgit.packaging/pom.xml
+++ b/org.eclipse.jgit.packaging/pom.xml
@@ -44,6 +44,7 @@
org.eclipse.jgit.gpg.bc.feature
org.eclipse.jgit.http.apache.feature
org.eclipse.jgit.ssh.apache.feature
+ org.eclipse.jgit.ssh.jsch.feature
org.eclipse.jgit.lfs.feature
org.eclipse.jgit.pgm.feature
org.eclipse.jgit.source.feature
@@ -145,6 +146,12 @@
${project.version}
sources
+
+ org.eclipse.jgit
+ org.eclipse.jgit.ssh.jsch
+ ${project.version}
+ sources
+
org.eclipse.jgit
org.eclipse.jgit.ui
diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml
index 9ef8a4aed..86ec1f1bf 100644
--- a/org.eclipse.jgit.pgm.test/pom.xml
+++ b/org.eclipse.jgit.pgm.test/pom.xml
@@ -51,6 +51,12 @@
${project.version}
+
+ org.eclipse.jgit
+ org.eclipse.jgit.ssh.jsch
+ ${project.version}
+
+
org.tukaani
xz
diff --git a/org.eclipse.jgit.pgm/BUILD b/org.eclipse.jgit.pgm/BUILD
index 490f1c2ea..2593122f4 100644
--- a/org.eclipse.jgit.pgm/BUILD
+++ b/org.eclipse.jgit.pgm/BUILD
@@ -28,6 +28,7 @@ java_library(
"//org.eclipse.jgit.lfs:jgit-lfs",
"//org.eclipse.jgit.lfs.server:jgit-lfs-server",
"//org.eclipse.jgit.ssh.apache:ssh-apache",
+ "//org.eclipse.jgit.ssh.jsch:ssh-jsch",
"//org.eclipse.jgit.ui:ui",
],
)
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index fb2958478..bc8d8c19b 100644
--- a/org.eclipse.jgit.pgm/pom.xml
+++ b/org.eclipse.jgit.pgm/pom.xml
@@ -79,6 +79,12 @@
${project.version}
+
+ org.eclipse.jgit
+ org.eclipse.jgit.ssh.jsch
+ ${project.version}
+
+
org.apache.httpcomponents
httpclient
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
index 58825f284..0b02dd148 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
@@ -36,6 +36,7 @@ import org.eclipse.jgit.pgm.internal.CLIText;
import org.eclipse.jgit.pgm.internal.SshDriver;
import org.eclipse.jgit.pgm.opt.CmdLineParser;
import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.transport.JschConfigSessionFactory;
import org.eclipse.jgit.transport.SshSessionFactory;
import org.eclipse.jgit.transport.sshd.DefaultProxyDataFactory;
import org.eclipse.jgit.transport.sshd.JGitKeyCache;
@@ -224,6 +225,9 @@ public abstract class TextBuiltin {
break;
}
case JSCH:
+ JschConfigSessionFactory factory = new JschConfigSessionFactory();
+ SshSessionFactory.setInstance(factory);
+ break;
default:
SshSessionFactory.setInstance(null);
break;
diff --git a/org.eclipse.jgit.ssh.apache.test/BUILD b/org.eclipse.jgit.ssh.apache.test/BUILD
index 18a48dca0..b38446448 100644
--- a/org.eclipse.jgit.ssh.apache.test/BUILD
+++ b/org.eclipse.jgit.ssh.apache.test/BUILD
@@ -13,7 +13,7 @@ junit_tests(
"//lib:sshd-osgi",
"//lib:sshd-sftp",
"//org.eclipse.jgit:jgit",
+ "//org.eclipse.jgit.junit.ssh:junit-ssh",
"//org.eclipse.jgit.ssh.apache:ssh-apache",
- "//org.eclipse.jgit.test:sshd-helpers",
],
)
diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
index 0d00e18d1..62470b131 100644
--- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
@@ -21,9 +21,9 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.4.0,2.5.0)",
org.eclipse.jgit.junit.ssh;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lib;version="[5.8.0,5.9.0)",
org.eclipse.jgit.transport;version="[5.8.0,5.9.0)",
- org.eclipse.jgit.transport.ssh;version="[5.8.0,5.9.0)",
org.eclipse.jgit.transport.sshd;version="[5.8.0,5.9.0)",
org.eclipse.jgit.util;version="[5.8.0,5.9.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.experimental.theories;version="[4.13,5.0.0)",
org.junit.runner;version="[4.13,5.0.0)"
+Require-Bundle: org.hamcrest.core;bundle-version="[1.3.0,2.0.0)"
diff --git a/org.eclipse.jgit.ssh.apache.test/pom.xml b/org.eclipse.jgit.ssh.apache.test/pom.xml
index fc2a2525b..c951e32d3 100644
--- a/org.eclipse.jgit.ssh.apache.test/pom.xml
+++ b/org.eclipse.jgit.ssh.apache.test/pom.xml
@@ -49,6 +49,12 @@
${project.version}
+
+ org.eclipse.jgit
+ org.eclipse.jgit.junit.ssh
+ ${project.version}
+
+
org.eclipse.jgit
org.eclipse.jgit.ssh.apache
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
index fa6450ef4..bfee04219 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java
@@ -22,9 +22,9 @@ import java.util.List;
import java.util.stream.Collectors;
import org.apache.sshd.client.config.hosts.KnownHostEntry;
import org.eclipse.jgit.api.errors.TransportException;
+import org.eclipse.jgit.junit.ssh.SshTestBase;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.SshSessionFactory;
-import org.eclipse.jgit.transport.ssh.SshTestBase;
import org.eclipse.jgit.util.FS;
import org.junit.Test;
import org.junit.experimental.theories.Theories;
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
index e35f45690..9d64adc95 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java
@@ -32,7 +32,7 @@ import org.apache.sshd.common.util.net.SshdSocketAddress;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.CredentialsProvider;
import org.eclipse.jgit.transport.SshSessionFactory;
-import org.eclipse.jgit.transport.ssh.SshTestHarness;
+import org.eclipse.jgit.junit.ssh.SshTestHarness;
import org.eclipse.jgit.util.FS;
import org.junit.After;
import org.junit.Test;
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
index d9352051a..7b6e508c3 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java
@@ -29,10 +29,10 @@ import org.apache.sshd.common.config.keys.KeyUtils;
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
import org.apache.sshd.common.session.SessionContext;
import org.apache.sshd.common.util.net.SshdSocketAddress;
+import org.eclipse.jgit.junit.ssh.SshTestHarness;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.CredentialsProvider;
import org.eclipse.jgit.transport.SshSessionFactory;
-import org.eclipse.jgit.transport.ssh.SshTestHarness;
import org.eclipse.jgit.util.FS;
import org.junit.After;
import org.junit.Test;
diff --git a/org.eclipse.jgit.ssh.apache/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory b/org.eclipse.jgit.ssh.apache/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
new file mode 100644
index 000000000..828941114
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
@@ -0,0 +1 @@
+org.eclipse.jgit.transport.sshd.SshdSessionFactory
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
index cb6b7d674..bb4e49be8 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
@@ -66,6 +66,8 @@ import org.eclipse.jgit.util.FS;
*/
public class SshdSessionFactory extends SshSessionFactory implements Closeable {
+ private static final String MINA_SSHD = "mina-sshd"; //$NON-NLS-1$
+
private final AtomicBoolean closing = new AtomicBoolean();
private final Set sessions = new HashSet<>();
@@ -133,6 +135,11 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
BCryptKdfOptions.setMaxAllowedRounds(16384);
}
+ @Override
+ public String getType() {
+ return MINA_SSHD;
+ }
+
/** A simple general map key. */
private static final class Tuple {
private Object[] objects;
diff --git a/org.eclipse.jgit.ssh.jsch.test/.classpath b/org.eclipse.jgit.ssh.jsch.test/.classpath
new file mode 100644
index 000000000..f08af0a4e
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.classpath
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.ssh.jsch.test/.gitignore b/org.eclipse.jgit.ssh.jsch.test/.gitignore
new file mode 100644
index 000000000..934e0e06f
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jgit.ssh.jsch.test/.project b/org.eclipse.jgit.ssh.jsch.test/.project
new file mode 100644
index 000000000..ad4fefec1
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.project
@@ -0,0 +1,28 @@
+
+
+ org.eclipse.jgit.ssh.jsch.test
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..689aec866
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
+encoding/tst=UTF-8
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.apt.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.apt.core.prefs
new file mode 100644
index 000000000..d4313d4b2
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.apt.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.apt.aptEnabled=false
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..2bc2cf30d
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,403 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.processAnnotations=disabled
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..fef371382
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,66 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_JGit Format
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..3dec4d97c
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 000000000..ce7a0f047
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.description} \n\nBug\: ${task.key}
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 000000000..c0030ded7
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+changed_execution_env=Error
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Warning
+incompatible_api_component_version_report_minor_without_api_change=Ignore
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..923c37fb8
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..2174e4fd5
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.ssh.jsch.test/BUILD b/org.eclipse.jgit.ssh.jsch.test/BUILD
new file mode 100644
index 000000000..4a8b92518
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/BUILD
@@ -0,0 +1,19 @@
+load(
+ "@com_googlesource_gerrit_bazlets//tools:junit.bzl",
+ "junit_tests",
+)
+
+junit_tests(
+ name = "jsch",
+ srcs = glob(["tst/**/*.java"]),
+ tags = ["jsch"],
+ deps = [
+ "//lib:eddsa",
+ "//lib:jsch",
+ "//lib:junit",
+ "//org.eclipse.jgit:jgit",
+ "//org.eclipse.jgit.junit:junit",
+ "//org.eclipse.jgit.junit.ssh:junit-ssh",
+ "//org.eclipse.jgit.ssh.jsch:ssh-jsch",
+ ],
+)
diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..d9cb832fa
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+ssssssssssManifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Automatic-Module-Name: org.eclipse.jgit.ssh.jsch.test
+Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.test
+Bundle-Version: 5.8.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)",
+ org.eclipse.jgit.errors;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.junit;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.lib;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.transport;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.util;version="[5.8.0,5.9.0)",
+ org.junit;version="[4.13,5.0.0)",
+ org.junit.experimental.theories;version="[4.13,5.0.0)",
+ org.junit.runner;version="[4.13,5.0.0)"
+Export-Package: org.eclipse.jgit.transport;version="5.8.0";
+ uses:="org.eclipse.jgit.transport,
+ org.eclipse.jgit.junit,
+ org.eclipse.jgit.junit.ssh"
+Require-Bundle: org.hamcrest.core;bundle-version="[1.3.0,2.0.0)"
diff --git a/org.eclipse.jgit.ssh.jsch.test/about.html b/org.eclipse.jgit.ssh.jsch.test/about.html
new file mode 100644
index 000000000..f971af18d
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/about.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+Eclipse Distribution License - Version 1.0
+
+
+
+
+
+
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+- Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+SHA-1 UbcCheck - MIT
+
+Copyright (c) 2017:
+
+Marc Stevens
+Cryptology Group
+Centrum Wiskunde & Informatica
+P.O. Box 94079, 1090 GB Amsterdam, Netherlands
+marc@marc-stevens.nl
+
+
+Dan Shumow
+Microsoft Research
+danshu@microsoft.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+- The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+
+
diff --git a/org.eclipse.jgit.ssh.jsch.test/build.properties b/org.eclipse.jgit.ssh.jsch.test/build.properties
new file mode 100644
index 000000000..9ffa0caf7
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/build.properties
@@ -0,0 +1,5 @@
+source.. = tst/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/org.eclipse.jgit.ssh.jsch.test/plugin.properties b/org.eclipse.jgit.ssh.jsch.test/plugin.properties
new file mode 100644
index 000000000..463fd4ab3
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/plugin.properties
@@ -0,0 +1,2 @@
+Bundle-Name=JGit Tests for SSH with JSch
+Bundle-Vendor=Eclipse JGit
diff --git a/org.eclipse.jgit.ssh.jsch.test/pom.xml b/org.eclipse.jgit.ssh.jsch.test/pom.xml
new file mode 100644
index 000000000..92b4176da
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/pom.xml
@@ -0,0 +1,118 @@
+
+
+
+
+ 4.0.0
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit-parent
+ 5.8.0-SNAPSHOT
+
+
+ org.eclipse.jgit.ssh.jsch.test
+ JGit - JSch sshd SSH Tests
+
+
+ JUnit tests for the JGit SSH support based on JSch.
+
+
+
+ true
+
+
+
+
+ junit
+ junit
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.junit
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.junit.ssh
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.ssh.jsch
+ ${project.version}
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit.test
+ ${project.version}
+
+
+
+
+
+
+
+ test.long
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ @{argLine} -Djgit.test.long=true
+
+
+
+
+
+
+
+
+ src/
+ tst/
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ test-jar
+
+
+
+
+
+ maven-surefire-plugin
+
+ @{argLine} -Xmx1024m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}
+
+ **/*Test.java
+ **/*Tests.java
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JSchSshTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JSchSshTest.java
similarity index 95%
rename from org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JSchSshTest.java
rename to org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JSchSshTest.java
index 52d21d355..22caebdac 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JSchSshTest.java
+++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JSchSshTest.java
@@ -7,6 +7,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
+//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0
package org.eclipse.jgit.transport;
import static org.junit.Assert.assertTrue;
@@ -18,9 +20,9 @@ import java.nio.file.Files;
import java.util.Arrays;
import org.eclipse.jgit.errors.TransportException;
+import org.eclipse.jgit.junit.ssh.SshTestBase;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.OpenSshConfig.Host;
-import org.eclipse.jgit.transport.ssh.SshTestBase;
import org.eclipse.jgit.util.FS;
import org.junit.experimental.theories.Theories;
import org.junit.runner.RunWith;
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java
similarity index 98%
rename from org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java
rename to org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java
index 5618be079..4efeae190 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java
+++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java
@@ -7,6 +7,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
+//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0
package org.eclipse.jgit.transport;
import static org.junit.Assert.assertEquals;
@@ -35,7 +37,7 @@ public class JschConfigSessionFactoryTest {
OpenSshConfig tmpConfig;
- DefaultSshSessionFactory factory = new DefaultSshSessionFactory();
+ JschConfigSessionFactory factory = new JschConfigSessionFactory();
@Before
public void setup() {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
similarity index 99%
rename from org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
rename to org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
index d3cfacfbf..af09f499f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
+++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
@@ -8,6 +8,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0
package org.eclipse.jgit.transport;
import static java.nio.charset.StandardCharsets.UTF_8;
diff --git a/org.eclipse.jgit.ssh.jsch/.classpath b/org.eclipse.jgit.ssh.jsch/.classpath
new file mode 100644
index 000000000..110168ffa
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.ssh.jsch/.fbprefs b/org.eclipse.jgit.ssh.jsch/.fbprefs
new file mode 100644
index 000000000..81a0767ff
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.fbprefs
@@ -0,0 +1,125 @@
+#FindBugs User Preferences
+#Mon May 04 16:24:13 PDT 2009
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|false
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindCircularDependencies=FindCircularDependencies|false
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
+detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|true
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
+detectorFindUnreleasedLock=FindUnreleasedLock|true
+detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
+detectorFindUnsyncGet=FindUnsyncGet|true
+detectorFindUselessControlFlow=FindUselessControlFlow|true
+detectorFormatStringChecker=FormatStringChecker|true
+detectorHugeSharedStringConstants=HugeSharedStringConstants|true
+detectorIDivResultCastToDouble=IDivResultCastToDouble|true
+detectorIncompatMask=IncompatMask|true
+detectorInconsistentAnnotations=InconsistentAnnotations|true
+detectorInefficientMemberAccess=InefficientMemberAccess|false
+detectorInefficientToArray=InefficientToArray|true
+detectorInfiniteLoop=InfiniteLoop|true
+detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
+detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
+detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
+detectorInitializationChain=InitializationChain|true
+detectorInstantiateStaticClass=InstantiateStaticClass|true
+detectorInvalidJUnitTest=InvalidJUnitTest|true
+detectorIteratorIdioms=IteratorIdioms|true
+detectorLazyInit=LazyInit|true
+detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
+detectorMethodReturnCheck=MethodReturnCheck|true
+detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
+detectorMutableLock=MutableLock|true
+detectorMutableStaticFields=MutableStaticFields|true
+detectorNaming=Naming|true
+detectorNumberConstructor=NumberConstructor|true
+detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
+detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
+detectorPublicSemaphores=PublicSemaphores|false
+detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
+detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
+detectorRedundantInterfaces=RedundantInterfaces|true
+detectorRepeatedConditionals=RepeatedConditionals|true
+detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
+detectorSerializableIdiom=SerializableIdiom|true
+detectorStartInConstructor=StartInConstructor|true
+detectorStaticCalendarDetector=StaticCalendarDetector|true
+detectorStringConcatenation=StringConcatenation|true
+detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
+detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
+detectorSwitchFallthrough=SwitchFallthrough|true
+detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
+detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
+detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
+detectorURLProblems=URLProblems|true
+detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
+detectorUnnecessaryMath=UnnecessaryMath|true
+detectorUnreadFields=UnreadFields|true
+detectorUseObjectEquals=UseObjectEquals|false
+detectorUselessSubclassMethod=UselessSubclassMethod|false
+detectorVarArgsProblems=VarArgsProblems|true
+detectorVolatileUsage=VolatileUsage|true
+detectorWaitInLoop=WaitInLoop|true
+detectorWrongMapIterator=WrongMapIterator|true
+detectorXMLFactoryBypass=XMLFactoryBypass|true
+detector_threshold=2
+effort=default
+excludefilter0=findBugs/FindBugsExcludeFilter.xml
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false
+filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL|
+run_at_full_build=true
diff --git a/org.eclipse.jgit.ssh.jsch/.gitignore b/org.eclipse.jgit.ssh.jsch/.gitignore
new file mode 100644
index 000000000..934e0e06f
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jgit.ssh.jsch/.project b/org.eclipse.jgit.ssh.jsch/.project
new file mode 100644
index 000000000..c29a38cb5
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.project
@@ -0,0 +1,34 @@
+
+
+ org.eclipse.jgit.ssh.jsch
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+ org.eclipse.pde.api.tools.apiAnalysisBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.pde.api.tools.apiAnalysisNature
+
+
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..15ef2aad5
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,399 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jgit.annotations.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jgit.annotations.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jgit.annotations.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..fef371382
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,66 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_JGit Format
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..3dec4d97c
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 000000000..ce7a0f047
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.description} \n\nBug\: ${task.key}
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 000000000..c0030ded7
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Warning
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+changed_execution_env=Error
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Warning
+incompatible_api_component_version_report_minor_without_api_change=Ignore
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..923c37fb8
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/org.eclipse.jgit.ssh.jsch/BUILD b/org.eclipse.jgit.ssh.jsch/BUILD
new file mode 100644
index 000000000..4917e28e0
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/BUILD
@@ -0,0 +1,20 @@
+load("@rules_java//java:defs.bzl", "java_library")
+
+package(default_visibility = ["//visibility:public"])
+
+SRCS = glob(["src/**/*.java"])
+
+RESOURCES = glob(["resources/**"])
+
+java_library(
+ name = "ssh-jsch",
+ srcs = SRCS,
+ resource_strip_prefix = "org.eclipse.jgit.ssh.jsch/resources",
+ resources = RESOURCES,
+ deps = [
+ "//lib:jsch",
+ "//lib:jzlib",
+ "//lib:slf4j-api",
+ "//org.eclipse.jgit:jgit",
+ ],
+)
diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5ae5d4b30
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Automatic-Module-Name: org.eclipse.jgit.ssh.jsch
+Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch;singleton:=true
+Fragment-Host: org.eclipse.jgit;bundle-version="5.8.0.qualifier"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 5.8.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.jgit.internal.transport.jsch;version="5.8.0";x-friends:="org.eclipse.egit.core",
+ org.eclipse.jgit.transport;version="5.8.0";
+ uses:="org.eclipse.jgit.transport,
+ org.eclipse.jgit.internal.transport.ssh,
+ org.eclipse.jgit.util,
+ com.jcraft.jsch"
+Import-Package: com.jcraft.jsch;version="[0.1.37,0.2.0)",
+ org.eclipse.jgit.errors;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.internal;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.nls;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.transport;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.util;version="[5.8.0,5.9.0)",
+ org.eclipse.jgit.util.io;version="[5.8.0,5.9.0)",
+ org.slf4j;version="[1.7.0,2.0.0)"
diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
new file mode 100644
index 000000000..35b27810c
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.jgit.ssh.jsch - Sources
+Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.source
+Bundle-Vendor: Eclipse.org - JGit
+Bundle-Version: 5.8.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="5.8.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.jsch/about.html b/org.eclipse.jgit.ssh.jsch/about.html
new file mode 100644
index 000000000..f971af18d
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/about.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+Eclipse Distribution License - Version 1.0
+
+
+
+
+
+
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+- Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+SHA-1 UbcCheck - MIT
+
+Copyright (c) 2017:
+
+Marc Stevens
+Cryptology Group
+Centrum Wiskunde & Informatica
+P.O. Box 94079, 1090 GB Amsterdam, Netherlands
+marc@marc-stevens.nl
+
+
+Dan Shumow
+Microsoft Research
+danshu@microsoft.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+- The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+
+
diff --git a/org.eclipse.jgit.ssh.jsch/build.properties b/org.eclipse.jgit.ssh.jsch/build.properties
new file mode 100644
index 000000000..8148271ef
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/build.properties
@@ -0,0 +1,7 @@
+source.. = src/,\
+ resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
diff --git a/org.eclipse.jgit.ssh.jsch/plugin.properties b/org.eclipse.jgit.ssh.jsch/plugin.properties
new file mode 100644
index 000000000..126709b96
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/plugin.properties
@@ -0,0 +1,2 @@
+Bundle-Name=JGit SSH support based on JSch
+Bundle-Vendor=Eclipse JGit
diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml
new file mode 100644
index 000000000..142ea28b1
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/pom.xml
@@ -0,0 +1,218 @@
+
+
+
+
+ 4.0.0
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit-parent
+ 5.8.0-SNAPSHOT
+
+
+ org.eclipse.jgit.ssh.jsch
+ JGit - JSch-based SSH support
+
+
+ SSH support for JGit based on JSch
+
+
+
+
+ ${project.build.directory}/META-INF/SOURCE-MANIFEST.MF
+
+
+
+
+ org.eclipse.jgit
+ org.eclipse.jgit
+ ${project.version}
+
+
+
+ com.jcraft
+ jsch
+
+
+
+ com.jcraft
+ jzlib
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ src/
+
+
+
+ .
+
+ plugin.properties
+ about.html
+
+
+
+ resources/
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+
+
+ translate-source-qualifier
+ generate-resources
+
+
+
+
+
+
+
+
+
+ run
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ true
+
+
+ attach-sources
+ process-classes
+
+ jar
+
+
+
+ ${source-bundle-manifest}
+
+
+
+
+
+
+
+ maven-jar-plugin
+
+
+ ${bundle-manifest}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory b/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
new file mode 100644
index 000000000..81927466b
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
@@ -0,0 +1 @@
+org.eclipse.jgit.transport.JschConfigSessionFactory
diff --git a/org.eclipse.jgit.ssh.jsch/resources/org/eclipse/jgit/internal/transport/jsch/JSchText.properties b/org.eclipse.jgit.ssh.jsch/resources/org/eclipse/jgit/internal/transport/jsch/JSchText.properties
new file mode 100644
index 000000000..529e9f488
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/resources/org/eclipse/jgit/internal/transport/jsch/JSchText.properties
@@ -0,0 +1,4 @@
+connectionFailed=connection failed
+sshUserNameError=Jsch error: failed to set SSH user name correctly to ''{0}''; using ''{1}'' picked up from SSH config file.
+transportSSHRetryInterrupt=Interrupted while waiting for retry
+unknownHost=unknown host
diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/jsch/JSchText.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/jsch/JSchText.java
new file mode 100644
index 000000000..4d4c9cb25
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/jsch/JSchText.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2020, Michael Dardis 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.internal.transport.jsch;
+
+import org.eclipse.jgit.nls.NLS;
+import org.eclipse.jgit.nls.TranslationBundle;
+
+/**
+ * Externalized text messages for localization.
+ */
+public final class JSchText extends TranslationBundle {
+
+ /**
+ * Get an instance of this translation bundle.
+ *
+ * @return an instance of this translation bundle
+ */
+ public static JSchText get() {
+ return NLS.getBundleFor(JSchText.class);
+ }
+
+ // @formatter:off
+ /***/ public String connectionFailed;
+ /***/ public String sshUserNameError;
+ /***/ public String transportSSHRetryInterrupt;
+ /***/ public String unknownHost;
+
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
similarity index 98%
rename from org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
rename to org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
index 10646b9e7..01adcf30b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
+++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
@@ -8,6 +8,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0
package org.eclipse.jgit.transport;
import java.util.ArrayList;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
similarity index 96%
rename from org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
rename to org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
index 718c8f611..88202dd2d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
+++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
@@ -15,6 +15,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0
package org.eclipse.jgit.transport;
import static java.util.stream.Collectors.joining;
@@ -37,7 +38,7 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
import org.eclipse.jgit.errors.TransportException;
-import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.internal.transport.jsch.JSchText;
import org.eclipse.jgit.util.FS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,7 +63,9 @@ import com.jcraft.jsch.Session;
* {@link #configure(org.eclipse.jgit.transport.OpenSshConfig.Host, Session)} to
* supply appropriate {@link com.jcraft.jsch.UserInfo} to the session.
*/
-public abstract class JschConfigSessionFactory extends SshSessionFactory {
+public class JschConfigSessionFactory extends SshSessionFactory {
+
+ private static final String JSCH = "jsch"; //$NON-NLS-1$
private static final Logger LOG = LoggerFactory
.getLogger(JschConfigSessionFactory.class);
@@ -137,7 +140,7 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
user, pass, host, port, hc);
} catch (InterruptedException e1) {
throw new TransportException(
- JGitText.get().transportSSHRetryInterrupt,
+ JSchText.get().transportSSHRetryInterrupt,
e1);
}
}
@@ -149,7 +152,8 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
} catch (JSchException je) {
final Throwable c = je.getCause();
if (c instanceof UnknownHostException) {
- throw new TransportException(uri, JGitText.get().unknownHost,
+ throw new TransportException(uri,
+ JSchText.get().unknownHost,
je);
}
if (c instanceof ConnectException) {
@@ -160,6 +164,11 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
}
+ @Override
+ public String getType() {
+ return JSCH;
+ }
+
private static boolean isAuthenticationFailed(JSchException e) {
return e.getCause() == null && e.getMessage().equals("Auth fail"); //$NON-NLS-1$
}
@@ -279,7 +288,7 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
} catch (NullPointerException | IllegalAccessException
| IllegalArgumentException | InvocationTargetException
| NoSuchMethodException | SecurityException e) {
- LOG.error(MessageFormat.format(JGitText.get().sshUserNameError,
+ LOG.error(MessageFormat.format(JSchText.get().sshUserNameError,
userName, session.getUserName()), e);
}
}
@@ -331,7 +340,9 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
* @param session
* session to configure
*/
- protected abstract void configure(OpenSshConfig.Host hc, Session session);
+ protected void configure(OpenSshConfig.Host hc, Session session) {
+ // No additional configuration required.
+ }
/**
* Obtain the JSch used to create new sessions.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschSession.java
similarity index 98%
rename from org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
rename to org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschSession.java
index d7270343c..300e03d79 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
+++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschSession.java
@@ -13,6 +13,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0
package org.eclipse.jgit.transport;
import java.io.BufferedOutputStream;
@@ -26,7 +27,7 @@ import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.errors.TransportException;
-import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.internal.transport.jsch.JSchText;
import org.eclipse.jgit.util.io.IsolatedOutputStream;
import com.jcraft.jsch.Channel;
@@ -142,7 +143,7 @@ public class JschSession implements RemoteSession {
if (!channel.isConnected()) {
closeOutputStream();
throw new TransportException(uri,
- JGitText.get().connectionFailed);
+ JSchText.get().connectionFailed);
}
} catch (JSchException e) {
closeOutputStream();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/OpenSshConfig.java
similarity index 98%
rename from org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
rename to org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/OpenSshConfig.java
index a628897a5..5c6c80c76 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
+++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/OpenSshConfig.java
@@ -8,6 +8,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0
package org.eclipse.jgit.transport;
import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.positive;
@@ -39,8 +40,8 @@ import com.jcraft.jsch.ConfigRepository;
*
* This parser makes the critical options available to
* {@link org.eclipse.jgit.transport.SshSessionFactory} via
- * {@link org.eclipse.jgit.transport.OpenSshConfig.Host} objects returned by
- * {@link #lookup(String)}, and implements a fully conforming
+ * {@link org.eclipse.jgit.transport.OpenSshConfig.Host} objects returned
+ * by {@link #lookup(String)}, and implements a fully conforming
* {@link com.jcraft.jsch.ConfigRepository} providing
* {@link com.jcraft.jsch.ConfigRepository.Config}s via
* {@link #getConfig(String)}.
diff --git a/org.eclipse.jgit.test/.classpath b/org.eclipse.jgit.test/.classpath
index 7cc18cca3..c99a7b0d3 100644
--- a/org.eclipse.jgit.test/.classpath
+++ b/org.eclipse.jgit.test/.classpath
@@ -1,22 +1,21 @@
-
+
-
+
-
+
-
diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD
index cd6195e28..f12646e85 100644
--- a/org.eclipse.jgit.test/BUILD
+++ b/org.eclipse.jgit.test/BUILD
@@ -58,7 +58,6 @@ java_library(
resources = DATA,
deps = [
"//lib:assertj-core",
- "//lib:jsch",
"//lib:junit",
"//lib:mockito",
"//lib:slf4j-simple",
@@ -67,27 +66,6 @@ java_library(
],
)
-java_library(
- name = "sshd-helpers",
- testonly = 1,
- srcs = glob(["src/org/eclipse/jgit/transport/ssh/*.java"]),
- resource_strip_prefix = "org.eclipse.jgit.test/resources",
- resources = RESOURCES,
- visibility = [
- "//org.eclipse.jgit.gpg.bc.test:__pkg__",
- "//org.eclipse.jgit.ssh.apache.test:__pkg__",
- ],
- deps = [
- "//lib:jsch",
- "//lib:junit",
- "//lib:sshd-osgi",
- "//lib:sshd-sftp",
- "//org.eclipse.jgit:jgit",
- "//org.eclipse.jgit.junit:junit",
- "//org.eclipse.jgit.junit.ssh:junit-ssh",
- ],
-)
-
java_import(
name = "tst_rsrc",
jars = [":tst_rsrc_jar"],
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index eda450526..be3897ff6 100644
--- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
@@ -6,10 +6,8 @@ Bundle-SymbolicName: org.eclipse.jgit.test
Bundle-Version: 5.8.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
- com.jcraft.jsch;version="[0.1.54,0.2.0)",
net.bytebuddy.dynamic.loading;version="[1.9.0,2.0.0)",
org.apache.commons.compress.archivers;version="[1.15.0,2.0)",
org.apache.commons.compress.archivers.tar;version="[1.15.0,2.0)",
@@ -46,7 +44,6 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.eclipse.jgit.internal.transport.http;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.transport.parser;version="[5.8.0,5.9.0)",
org.eclipse.jgit.junit;version="[5.8.0,5.9.0)",
- org.eclipse.jgit.junit.ssh;version="[5.8.0,5.9.0)",
org.eclipse.jgit.junit.time;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lfs;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lib;version="[5.8.0,5.9.0)",
@@ -86,4 +83,3 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.tukaani.xz;version="[1.6.0,2.0)"
Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)",
org.hamcrest.library;bundle-version="[1.1.0,2.0.0)"
-Export-Package: org.eclipse.jgit.transport.ssh;version="5.8.0";x-friends:="org.eclipse.jgit.ssh.apache.test"
diff --git a/org.eclipse.jgit.test/build.properties b/org.eclipse.jgit.test/build.properties
index 78c8f55f3..7dc26c0b0 100644
--- a/org.eclipse.jgit.test/build.properties
+++ b/org.eclipse.jgit.test/build.properties
@@ -1,8 +1,7 @@
source.. = tst/,\
tst-rsrc/,\
exttst/,\
- src/,\
- resources/
+ src/
bin.includes = META-INF/,\
.,\
plugin.properties,\
diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml
index 377938b46..fa9bac850 100644
--- a/org.eclipse.jgit.test/pom.xml
+++ b/org.eclipse.jgit.test/pom.xml
@@ -149,9 +149,6 @@
plugin.properties
-
- resources/
-
diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl
index d03031645..34df07d5e 100644
--- a/org.eclipse.jgit.test/tests.bzl
+++ b/org.eclipse.jgit.test/tests.bzl
@@ -34,26 +34,10 @@ def tests(tests):
additional_deps = [
"//org.eclipse.jgit:insecure_cipher_factory",
]
- if src.endswith("OpenSshConfigTest.java"):
- additional_deps = [
- "//lib:jsch",
- ]
- if src.endswith("JschConfigSessionFactoryTest.java"):
- additional_deps = [
- "//lib:jsch",
- ]
if src.endswith("SecurityManagerMissingPermissionsTest.java"):
additional_deps = [
"//lib:log4j",
]
- if src.endswith("JSchSshTest.java"):
- additional_deps = [
- "//lib:jsch",
- "//lib:jzlib",
- "//lib:sshd-osgi",
- "//lib:sshd-sftp",
- ":sshd-helpers",
- ]
if src.endswith("JDKHttpConnectionTest.java"):
additional_deps = [
"//lib:mockito",
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index be1d521aa..e2565bd6b 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -1,5 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -8,6 +48,14 @@
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.jgit/BUILD b/org.eclipse.jgit/BUILD
index 19aba5254..f7970976b 100644
--- a/org.eclipse.jgit/BUILD
+++ b/org.eclipse.jgit/BUILD
@@ -21,8 +21,6 @@ java_library(
deps = [
":insecure_cipher_factory",
"//lib:javaewah",
- "//lib:jsch",
- "//lib:jzlib",
"//lib:slf4j-api",
],
)
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index 1479cf99a..22454bad4 100644
--- a/org.eclipse.jgit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/MANIFEST.MF
@@ -23,8 +23,12 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.revwalk.filter,
org.eclipse.jgit.blame,
org.eclipse.jgit.merge",
- org.eclipse.jgit.api.errors;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.errors",
- org.eclipse.jgit.attributes;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk",
+ org.eclipse.jgit.api.errors;version="5.8.0";
+ uses:="org.eclipse.jgit.lib,
+ org.eclipse.jgit.errors",
+ org.eclipse.jgit.attributes;version="5.8.0";
+ uses:="org.eclipse.jgit.lib,
+ org.eclipse.jgit.treewalk",
org.eclipse.jgit.blame;version="5.8.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
@@ -49,7 +53,8 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
org.eclipse.jgit.internal.storage.pack",
- org.eclipse.jgit.events;version="5.8.0";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.events;version="5.8.0";
+ uses:="org.eclipse.jgit.lib",
org.eclipse.jgit.fnmatch;version="5.8.0",
org.eclipse.jgit.gitrepo;version="5.8.0";
uses:="org.xml.sax.helpers,
@@ -60,10 +65,17 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.gitrepo.internal;version="5.8.0";x-internal:=true,
org.eclipse.jgit.hooks;version="5.8.0";uses:="org.eclipse.jgit.lib",
org.eclipse.jgit.ignore;version="5.8.0",
- org.eclipse.jgit.ignore.internal;version="5.8.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal;version="5.8.0";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test",
- org.eclipse.jgit.internal.fsck;version="5.8.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.ketch;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
+ org.eclipse.jgit.ignore.internal;version="5.8.0";
+ x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.internal;version="5.8.0";
+ x-friends:="org.eclipse.jgit.test,
+ org.eclipse.jgit.http.test",
+ org.eclipse.jgit.internal.fsck;version="5.8.0";
+ x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.internal.ketch;version="5.8.0";
+ x-friends:="org.eclipse.jgit.junit,
+ org.eclipse.jgit.test,
+ org.eclipse.jgit.pgm",
org.eclipse.jgit.internal.revwalk;version="5.8.0";x-internal:=true,
org.eclipse.jgit.internal.storage.dfs;version="5.8.0";
x-friends:="org.eclipse.jgit.test,
@@ -79,19 +91,34 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.pgm,
org.eclipse.jgit.pgm.test,
org.eclipse.jgit.ssh.apache",
- org.eclipse.jgit.internal.storage.io;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.pack;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.storage.io;version="5.8.0";
+ x-friends:="org.eclipse.jgit.junit,
+ org.eclipse.jgit.test,
+ org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.storage.pack;version="5.8.0";
+ x-friends:="org.eclipse.jgit.junit,
+ org.eclipse.jgit.test,
+ org.eclipse.jgit.pgm",
org.eclipse.jgit.internal.storage.reftable;version="5.8.0";
x-friends:="org.eclipse.jgit.http.test,
org.eclipse.jgit.junit,
org.eclipse.jgit.test,
org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.reftree;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.storage.reftree;version="5.8.0";
+ x-friends:="org.eclipse.jgit.junit,
+ org.eclipse.jgit.test,
+ org.eclipse.jgit.pgm",
org.eclipse.jgit.internal.submodule;version="5.8.0";x-internal:=true,
- org.eclipse.jgit.internal.transport.connectivity;version="5.8.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.http;version="5.8.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.parser;version="5.8.0";x-friends:="org.eclipse.jgit.http.server,org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.ssh;version="5.8.0";x-friends:="org.eclipse.jgit.ssh.apache",
+ org.eclipse.jgit.internal.transport.connectivity;version="5.8.0";
+ x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.internal.transport.http;version="5.8.0";
+ x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.internal.transport.parser;version="5.8.0";
+ x-friends:="org.eclipse.jgit.http.server,
+ org.eclipse.jgit.test",
+ org.eclipse.jgit.internal.transport.ssh;version="5.8.0";
+ x-friends:="org.eclipse.jgit.ssh.apache,
+ org.eclipse.jgit.ssh.jsch",
org.eclipse.jgit.lib;version="5.8.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.util.sha1,
@@ -106,7 +133,8 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.util,
org.eclipse.jgit.submodule,
org.eclipse.jgit.util.time",
- org.eclipse.jgit.lib.internal;version="5.8.0";x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.lib.internal;version="5.8.0";
+ x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.merge;version="5.8.0";
uses:="org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
@@ -122,17 +150,27 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.merge",
- org.eclipse.jgit.patch;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.diff",
- org.eclipse.jgit.revplot;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.revwalk",
+ org.eclipse.jgit.patch;version="5.8.0";
+ uses:="org.eclipse.jgit.lib,
+ org.eclipse.jgit.diff",
+ org.eclipse.jgit.revplot;version="5.8.0";
+ uses:="org.eclipse.jgit.lib,
+ org.eclipse.jgit.revwalk",
org.eclipse.jgit.revwalk;version="5.8.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.diff,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.revwalk.filter,
org.eclipse.jgit.treewalk",
- org.eclipse.jgit.revwalk.filter;version="5.8.0";uses:="org.eclipse.jgit.revwalk,org.eclipse.jgit.lib,org.eclipse.jgit.util",
- org.eclipse.jgit.storage.file;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.util",
- org.eclipse.jgit.storage.pack;version="5.8.0";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.revwalk.filter;version="5.8.0";
+ uses:="org.eclipse.jgit.revwalk,
+ org.eclipse.jgit.lib,
+ org.eclipse.jgit.util",
+ org.eclipse.jgit.storage.file;version="5.8.0";
+ uses:="org.eclipse.jgit.lib,
+ org.eclipse.jgit.util",
+ org.eclipse.jgit.storage.pack;version="5.8.0";
+ uses:="org.eclipse.jgit.lib",
org.eclipse.jgit.submodule;version="5.8.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.diff,
@@ -147,15 +185,16 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.transport.http,
org.eclipse.jgit.internal.storage.file,
org.eclipse.jgit.treewalk,
- org.eclipse.jgit.internal.transport.ssh,
org.eclipse.jgit.util,
org.eclipse.jgit.internal.storage.pack,
org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.storage.pack,
- org.eclipse.jgit.errors,
- com.jcraft.jsch",
- org.eclipse.jgit.transport.http;version="5.8.0";uses:="javax.net.ssl",
- org.eclipse.jgit.transport.resolver;version="5.8.0";uses:="org.eclipse.jgit.transport,org.eclipse.jgit.lib",
+ org.eclipse.jgit.errors",
+ org.eclipse.jgit.transport.http;version="5.8.0";
+ uses:="javax.net.ssl",
+ org.eclipse.jgit.transport.resolver;version="5.8.0";
+ uses:="org.eclipse.jgit.transport,
+ org.eclipse.jgit.lib",
org.eclipse.jgit.treewalk;version="5.8.0";
uses:="org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
@@ -163,7 +202,8 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.util",
- org.eclipse.jgit.treewalk.filter;version="5.8.0";uses:="org.eclipse.jgit.treewalk",
+ org.eclipse.jgit.treewalk.filter;version="5.8.0";
+ uses:="org.eclipse.jgit.treewalk",
org.eclipse.jgit.util;version="5.8.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.hooks,
@@ -177,12 +217,14 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0",
org.eclipse.jgit.treewalk,
javax.net.ssl,
org.eclipse.jgit.util.time",
- org.eclipse.jgit.util.io;version="5.8.0";uses:="org.eclipse.jgit.attributes,org.eclipse.jgit.lib,org.eclipse.jgit.treewalk",
+ org.eclipse.jgit.util.io;version="5.8.0";
+ uses:="org.eclipse.jgit.attributes,
+ org.eclipse.jgit.lib,
+ org.eclipse.jgit.treewalk",
org.eclipse.jgit.util.sha1;version="5.8.0",
org.eclipse.jgit.util.time;version="5.8.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
- com.jcraft.jsch;version="[0.1.37,0.2.0)",
javax.crypto,
javax.net.ssl,
org.slf4j;version="[1.7.0,2.0.0)",
diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml
index 025ab82a0..c73eddcd6 100644
--- a/org.eclipse.jgit/pom.xml
+++ b/org.eclipse.jgit/pom.xml
@@ -36,16 +36,6 @@
-
- com.jcraft
- jsch
-
-
-
- com.jcraft
- jzlib
-
-
com.googlecode.javaewah
JavaEWAH
diff --git a/org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory b/org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
deleted file mode 100644
index 1f8828457..000000000
--- a/org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.jgit.transport.DefaultSshSessionFactory
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index c6e62b440..e6da551bb 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -621,7 +621,6 @@ sourceRefDoesntResolveToAnyObject=Source ref {0} doesn''t resolve to any object.
sourceRefNotSpecifiedForRefspec=Source ref not specified for refspec: {0}
squashCommitNotUpdatingHEAD=Squash commit -- not updating HEAD
sshCommandFailed=Execution of ssh command ''{0}'' failed with error ''{1}''
-sshUserNameError=Jsch error: failed to set SSH user name correctly to ''{0}''; using ''{1}'' picked up from SSH config file.
sslFailureExceptionMessage=Secure connection to {0} could not be established because of SSL problems
sslFailureInfo=A secure connection to {0} could not be established because the server''s certificate could not be validated.
sslFailureCause=SSL reported: {0}
@@ -682,7 +681,6 @@ transportProtoLocal=Local Git Repository
transportProtoSFTP=SFTP
transportProtoSSH=SSH
transportProtoTest=Test
-transportSSHRetryInterrupt=Interrupted while waiting for retry
treeEntryAlreadyExists=Tree entry "{0}" already exists.
treeFilterMarkerTooManyFilters=Too many markTreeFilters passed, maximum number is {0} (passed {1})
treeWalkMustHaveExactlyTwoTrees=TreeWalk should have exactly two trees.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index 9d122ba12..782a3f872 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -649,7 +649,6 @@ public class JGitText extends TranslationBundle {
/***/ public String sourceRefNotSpecifiedForRefspec;
/***/ public String squashCommitNotUpdatingHEAD;
/***/ public String sshCommandFailed;
- /***/ public String sshUserNameError;
/***/ public String sslFailureExceptionMessage;
/***/ public String sslFailureInfo;
/***/ public String sslFailureCause;
@@ -710,7 +709,6 @@ public class JGitText extends TranslationBundle {
/***/ public String transportProtoSSH;
/***/ public String transportProtoTest;
/***/ public String transportProvidedRefWithNoObjectId;
- /***/ public String transportSSHRetryInterrupt;
/***/ public String treeEntryAlreadyExists;
/***/ public String treeFilterMarkerTooManyFilters;
/***/ public String treeWalkMustHaveExactlyTwoTrees;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java
deleted file mode 100644
index afa0a11c2..000000000
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2009, Constantine Plotnikov
- * Copyright (C) 2009, Google Inc.
- * Copyright (C) 2008, Robin Rosenberg
- * Copyright (C) 2008, Shawn O. Pearce 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 com.jcraft.jsch.Session;
-
-/**
- * Loads known hosts and private keys from $HOME/.ssh
.
- *
- * This is the default implementation used by JGit and provides most of the
- * compatibility necessary to match OpenSSH, a popular implementation of SSH
- * used by C Git.
- *
- * If user interactivity is required by SSH (e.g. to obtain a password), the
- * connection will immediately fail.
- *
- * @since 5.7
- */
-public class DefaultSshSessionFactory extends JschConfigSessionFactory {
- /** {@inheritDoc} */
- @Override
- protected void configure(OpenSshConfig.Host hc, Session session) {
- // No additional configuration required.
- }
-}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java
index e6d204242..ef845f4dc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java
@@ -43,11 +43,12 @@ public abstract class SshSessionFactory {
}
return null;
}
+
/**
* Get the currently configured JVM-wide factory.
*
- * A factory is always available. By default the factory will read from the
- * user's $HOME/.ssh
and assume OpenSSH compatibility.
+ * By default the factory will read from the user's $HOME/.ssh
+ * and assume OpenSSH compatibility.
*
* @return factory the current factory for this JVM.
*/
@@ -60,7 +61,7 @@ public abstract class SshSessionFactory {
*
* @param newFactory
* factory for future sessions to be created through. If null the
- * default factory will be restored.s
+ * default factory will be restored.
*/
public static void setInstance(SshSessionFactory newFactory) {
if (newFactory != null) {
@@ -109,6 +110,15 @@ public abstract class SshSessionFactory {
CredentialsProvider credentialsProvider, FS fs, int tms)
throws TransportException;
+ /**
+ * The name of the type of session factory.
+ *
+ * @return the name of the type of session factory.
+ *
+ * @since 5.8
+ */
+ public abstract String getType();
+
/**
* Close (or recycle) a session to a host.
*
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
index 947c4c322..b9cb2484d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
@@ -50,6 +50,8 @@ import org.eclipse.jgit.util.io.StreamCopyThread;
* enumeration, save file modification and hook execution.
*/
public class TransportGitSsh extends SshTransport implements PackTransport {
+ private static final String EXT = "ext"; //$NON-NLS-1$
+
static final TransportProtocol PROTO_SSH = new TransportProtocol() {
private final String[] schemeNames = { "ssh", "ssh+git", "git+ssh" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -127,6 +129,11 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
throws TransportException {
return new ExtSession();
}
+
+ @Override
+ public String getType() {
+ return EXT;
+ }
});
}
}
diff --git a/pom.xml b/pom.xml
index eddb040a5..a0f6d7732 100644
--- a/pom.xml
+++ b/pom.xml
@@ -992,6 +992,7 @@
org.eclipse.jgit.http.apache
org.eclipse.jgit.http.server
org.eclipse.jgit.ssh.apache
+ org.eclipse.jgit.ssh.jsch
org.eclipse.jgit.pgm
org.eclipse.jgit.lfs
org.eclipse.jgit.lfs.server
@@ -1007,6 +1008,7 @@
org.eclipse.jgit.lfs.test
org.eclipse.jgit.lfs.server.test
org.eclipse.jgit.ssh.apache.test
+ org.eclipse.jgit.ssh.jsch.test
org.eclipse.jgit.coverage
org.eclipse.jgit.benchmarks
From 166c85e0cf4087297e14d9192e2c3cfcccf225b2 Mon Sep 17 00:00:00 2001
From: Michael Keppler
Date: Mon, 3 Dec 2018 17:25:51 +0100
Subject: [PATCH 34/55] Do not include log4j implementation in jgit
As discussed in the bug, jgit should not include a logging
implementation, and instead rely on the product containing jgit to
configure the logging.
We have recently run into the situation, that installing egit in a (non
eclipse.org) RCP application breaks all the logging due to incompatible
logging implementations. Removal of the jgit logging implementation
should fix this.
Following further changes have been done for jgit command line:
* added log4j.properties to binary build of jgit.pgm. That file existed
in the git repository, but was not included in the eclipse binary build.
(maybe it is in the bazel build)
* removed apache.commons.logging package import from jgit.pgm. That
import is not used, and makes the logging even more confusing.
Bug: 514326
Change-Id: I6dc7d1462f0acfca9e2b1ac87e705617179ffdda
Signed-off-by: Michael Keppler
Signed-off-by: Matthias Sohn
---
.../org.eclipse.jgit.feature/feature.xml | 15 ---------------
org.eclipse.jgit.pgm/META-INF/MANIFEST.MF | 1 -
org.eclipse.jgit.pgm/build.properties | 3 ++-
3 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
index 9ffc6c235..8d2e8c82d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
@@ -57,21 +57,6 @@
version="0.0.0"
unpack="false"/>
-
-
-
-
Date: Sun, 31 May 2020 23:33:09 +0200
Subject: [PATCH 35/55] Organize manifest of org.eclipse.jgit.pgm
Use "organize manifest" to auto-cleanup the manifest of
org.eclipse.jgit.pgm. This removes some unused imports and unnecessary
manifest headers and updates use clauses.
Change-Id: Iacbd6d3b184c6fa8db28d9f06cbf56e57cc8ef5d
Signed-off-by: Matthias Sohn
---
org.eclipse.jgit.pgm/META-INF/MANIFEST.MF | 48 +++++++++--------------
1 file changed, 18 insertions(+), 30 deletions(-)
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index ad7d8e3ef..afe2da94d 100644
--- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
@@ -5,28 +5,14 @@ Automatic-Module-Name: org.eclipse.jgit.pgm
Bundle-SymbolicName: org.eclipse.jgit.pgm
Bundle-Version: 5.8.0.qualifier
Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
- javax.servlet.http;version="[3.1.0,4.0.0)",
- org.apache.commons.compress.archivers;version="[1.3,2.0)",
- org.apache.commons.compress.archivers.tar;version="[1.3,2.0)",
- org.apache.commons.compress.archivers.zip;version="[1.3,2.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.jgit.api;version="[5.8.0,5.9.0)",
org.eclipse.jgit.api.errors;version="[5.8.0,5.9.0)",
org.eclipse.jgit.archive;version="[5.8.0,5.9.0)",
@@ -37,14 +23,12 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
org.eclipse.jgit.errors;version="[5.8.0,5.9.0)",
org.eclipse.jgit.gitrepo;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.ketch;version="[5.8.0,5.9.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.storage.file;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.storage.io;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.storage.pack;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.storage.reftable;version="[5.8.0,5.9.0)",
org.eclipse.jgit.internal.storage.reftree;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lfs;version="[5.8.0,5.9.0)",
- org.eclipse.jgit.lfs.lib;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lfs.server;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lfs.server.fs;version="[5.8.0,5.9.0)",
org.eclipse.jgit.lfs.server.s3;version="[5.8.0,5.9.0)",
@@ -68,27 +52,31 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
org.kohsuke.args4j;version="[2.33.0,3.0.0)",
org.kohsuke.args4j.spi;version="[2.33.0,3.0.0)"
Export-Package: org.eclipse.jgit.console;version="5.8.0";
- uses:="org.eclipse.jgit.transport,
- org.eclipse.jgit.util",
+ uses:="org.eclipse.jgit.transport,
+ org.eclipse.jgit.util",
org.eclipse.jgit.pgm;version="5.8.0";
- uses:="org.eclipse.jgit.revwalk,
- org.eclipse.jgit.treewalk.filter,
- org.eclipse.jgit.pgm.opt,
- org.eclipse.jgit.diff,
- org.eclipse.jgit.awtui,
+ uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.util.io,
+ org.eclipse.jgit.awtui,
org.eclipse.jgit.lib,
+ org.eclipse.jgit.revwalk,
+ org.eclipse.jgit.pgm.opt,
+ org.eclipse.jgit.treewalk.filter,
+ org.eclipse.jgit.diff,
org.eclipse.jgit.treewalk,
- javax.swing,
- org.eclipse.jgit.transport",
+ org.eclipse.jgit.api,
+ javax.swing",
org.eclipse.jgit.pgm.debug;version="5.8.0";
uses:="org.eclipse.jgit.util.io,
- org.eclipse.jgit.pgm",
- org.eclipse.jgit.pgm.internal;version="5.8.0";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test",
+ org.eclipse.jgit.pgm,
+ org.eclipse.jetty.servlet",
+ org.eclipse.jgit.pgm.internal;version="5.8.0";
+ x-friends:="org.eclipse.jgit.pgm.test,
+ org.eclipse.jgit.test",
org.eclipse.jgit.pgm.opt;version="5.8.0";
- uses:="org.eclipse.jgit.lib,
+ uses:="org.kohsuke.args4j,
+ org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
- org.kohsuke.args4j.spi,
- org.kohsuke.args4j"
+ org.kohsuke.args4j.spi"
Main-Class: org.eclipse.jgit.pgm.Main
Implementation-Title: JGit Command Line Interface
From ae2e12d584374a226b4839b042f64f8f95b43328 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Sun, 31 May 2020 16:43:41 +0200
Subject: [PATCH 36/55] Update Orbit to R20200529191137 for final Eclipse
release 2020-06
This includes org.bouncycastle.bcprov 1.65.1 in the p2 repository.
Leave the maven and bazel dependencies for Bouncy Castle at 1.65.
Change-Id: I1fb39bd79e7339315f64f8b5dda89cb81dd035af
Signed-off-by: Thomas Wolf
---
.../org.eclipse.jgit.target/jgit-4.10.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.10.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.11.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.11.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.12.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.12.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.13.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.13.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.14.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.14.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.15.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.15.tpd | 2 +-
.../jgit-4.16-staging.target | 16 ++---
.../jgit-4.16-staging.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.6.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.7.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.8.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.8.tpd | 2 +-
.../org.eclipse.jgit.target/jgit-4.9.target | 16 ++---
.../org.eclipse.jgit.target/jgit-4.9.tpd | 2 +-
.../orbit/R20200529191137-2020-06.tpd | 66 +++++++++++++++++++
23 files changed, 165 insertions(+), 99 deletions(-)
create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20200529191137-2020-06.tpd
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
index f42e3f37f..452503a33 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
index 3f1cbe11d..717bc0a09 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
@@ -1,7 +1,7 @@
target "jgit-4.10" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2018-12/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
index fb95c1b02..03e3641d6 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
index faf51ad8a..9abd9b2d3 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
@@ -1,7 +1,7 @@
target "jgit-4.11" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2019-03/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
index 0a5a4b3cb..2c09a1770 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
index 5ce5fb7f1..e668a9df8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
@@ -1,7 +1,7 @@
target "jgit-4.12" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2019-06/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
index 39cea039f..b92beb48b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
index 2aaae751f..0499e3f16 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
@@ -1,7 +1,7 @@
target "jgit-4.13" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2019-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
index 2b5938cb0..6ab40f042 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
index 224c35439..c2fa119d1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
@@ -1,7 +1,7 @@
target "jgit-4.14-staging" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2019-12/201912181000/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
index d71cd42ab..a7ca0dc72 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
index 93e1faf62..ff55a7d96 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
@@ -1,7 +1,7 @@
target "jgit-4.15" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2020-03/202003181000/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
index f0609c594..0aff7968e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd
index 7c5f0d6f2..777aaf3ce 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd
@@ -1,7 +1,7 @@
target "jgit-4.15" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/staging/2020-06/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
index 9145c15c0..b07ddd005 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
index 2477408dc..d0c3c1bcf 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
@@ -1,7 +1,7 @@
target "jgit-4.6" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/neon/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
index 6d985312b..351b0fc0e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
index 941f354f8..19790ff0a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
@@ -1,7 +1,7 @@
target "jgit-4.7" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/oxygen/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
index 4ad96015e..be6108d48 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
index 20ade8676..5fe27fcf6 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
@@ -1,7 +1,7 @@
target "jgit-4.8" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/photon/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
index 69eacd41b..b9ad2cbac 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
@@ -1,7 +1,7 @@
-
+
@@ -59,12 +59,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -84,7 +84,7 @@
-
+
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
index 3b082331a..4e39322b1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
@@ -1,7 +1,7 @@
target "jgit-4.9" with source configurePhase
include "projects/jetty-9.4.x.tpd"
-include "orbit/S20200519202422.tpd"
+include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2018-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20200529191137-2020-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20200529191137-2020-06.tpd
new file mode 100644
index 000000000..b012ecdc5
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20200529191137-2020-06.tpd
@@ -0,0 +1,66 @@
+target "R20200529191137-2020-06" with source configurePhase
+// see https://download.eclipse.org/tools/orbit/downloads/
+
+location "https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository" {
+ com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
+ com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
+ com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
+ com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
+ com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305]
+ com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305]
+ javaewah [1.1.7.v20200107-0831,1.1.7.v20200107-0831]
+ javaewah.source [1.1.7.v20200107-0831,1.1.7.v20200107-0831]
+ 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]
+ net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
+ net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
+ net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
+ org.apache.ant [1.10.8.v20200515-1239,1.10.8.v20200515-1239]
+ org.apache.ant.source [1.10.8.v20200515-1239,1.10.8.v20200515-1239]
+ org.apache.commons.codec [1.13.0.v20200108-0001,1.13.0.v20200108-0001]
+ org.apache.commons.codec.source [1.13.0.v20200108-0001,1.13.0.v20200108-0001]
+ org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343]
+ org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343]
+ org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
+ org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
+ org.apache.httpcomponents.httpclient [4.5.10.v20200114-1512,4.5.10.v20200114-1512]
+ org.apache.httpcomponents.httpclient.source [4.5.10.v20200114-1512,4.5.10.v20200114-1512]
+ org.apache.httpcomponents.httpcore [4.4.12.v20200108-1212,4.4.12.v20200108-1212]
+ org.apache.httpcomponents.httpcore.source [4.4.12.v20200108-1212,4.4.12.v20200108-1212]
+ org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815]
+ org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815]
+ org.apache.sshd.osgi [2.4.0.v20200318-1614,2.4.0.v20200318-1614]
+ org.apache.sshd.osgi.source [2.4.0.v20200318-1614,2.4.0.v20200318-1614]
+ org.apache.sshd.sftp [2.4.0.v20200319-1547,2.4.0.v20200319-1547]
+ org.apache.sshd.sftp.source [2.4.0.v20200319-1547,2.4.0.v20200319-1547]
+ org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926]
+ org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926]
+ org.bouncycastle.bcpg [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+ org.bouncycastle.bcpg.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+ org.bouncycastle.bcpkix [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+ org.bouncycastle.bcpkix.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+ org.bouncycastle.bcprov [1.65.1.v20200529-1514,1.65.1.v20200529-1514]
+ org.bouncycastle.bcprov.source [1.65.1.v20200529-1514,1.65.1.v20200529-1514]
+ org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000]
+ org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
+ org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
+ org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
+ org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
+ org.junit [4.13.0.v20200204-1500,4.13.0.v20200204-1500]
+ org.junit.source [4.13.0.v20200204-1500,4.13.0.v20200204-1500]
+ org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
+ org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
+ org.mockito [2.23.0.v20200310-1642,2.23.0.v20200310-1642]
+ org.mockito.source [2.23.0.v20200310-1642,2.23.0.v20200310-1642]
+ org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
+ org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
+ org.slf4j.api [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
+ org.slf4j.api.source [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
+ org.slf4j.impl.log4j12 [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
+ org.slf4j.impl.log4j12.source [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
+ org.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
+ org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
+}
From 55371c5f063370aeca85acab16f867734ff4226c Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Thu, 28 May 2020 19:40:01 +0200
Subject: [PATCH 37/55] Add tests for RawTextComparator.WS_IGNORE_CHANGE.hash()
Change-Id: I1ed4df789094e09c39b3c2054fe5b9bd0c1a8f9b
Signed-off-by: Thomas Wolf
---
.../RawTextIgnoreWhitespaceChangeTest.java | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
index 73b2a72ac..c2b8641eb 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
@@ -13,6 +13,7 @@ package org.eclipse.jgit.diff;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import org.eclipse.jgit.lib.Constants;
@@ -103,4 +104,47 @@ public class RawTextIgnoreWhitespaceChangeTest {
assertTrue(cmp.equals(a, 4, b, 4));
assertTrue(cmp.equals(b, 4, a, 4));
}
+
+ @Test
+ public void testHashCode() {
+ RawText a = new RawText(Constants
+ .encodeASCII("a b c\n\nab c d \n\ta bc d\nxyz\na b c"));
+ RawText b = new RawText(Constants.encodeASCII(
+ "a b c\na b c\nab c d\na bc d\n \t a bc d\na b c\n"));
+
+ // Same line gives equal hash
+ assertEquals(cmp.hash(a, 0), cmp.hash(a, 0));
+
+ // Empty lines produce the same hash
+ assertEquals(cmp.hash(a, 1), cmp.hash(a, 1));
+
+ // Equal lines from different RawTexts get the same hash (RawText
+ // instance is not part of the hash)
+ assertEquals(cmp.hash(a, 0), cmp.hash(b, 0));
+
+ // A blank produces the same hash as a TAB
+ assertEquals(cmp.hash(new RawText(Constants.encodeASCII(" ")), 0),
+ cmp.hash(new RawText(Constants.encodeASCII("\t")), 0));
+
+ // Lines with only differing whitespace produce same hash
+ assertEquals(cmp.hash(a, 0), cmp.hash(b, 1));
+
+ // Lines with different trailing whitespace produce the same hash
+ assertEquals(cmp.hash(a, 2), cmp.hash(b, 2));
+
+ // A line with leading whitespace produces a hash different from the
+ // same line without leading whitespace
+ assertNotEquals(cmp.hash(a, 3), cmp.hash(b, 3));
+
+ // Lines with different leading whitespace produce equal hashes
+ assertEquals(cmp.hash(a, 3), cmp.hash(b, 4));
+
+ // While different lines _should_ produce different hashes, that may not
+ // always be the case. But for these two lines, it is.
+ assertNotEquals(cmp.hash(a, 4), cmp.hash(b, 4));
+
+ // A line without trailing \n produces the same hash as one without
+ assertEquals(cmp.hash(a, 5), cmp.hash(b, 5));
+
+ }
}
From 3e2ec7e5e81a489a326d872aa0670119ff2c1152 Mon Sep 17 00:00:00 2001
From: David Ostrovsky
Date: Fri, 22 May 2020 07:49:49 +0200
Subject: [PATCH 38/55] Fix BadComparable error flagged by error prone
Running recent error prone version complaining on that code:
LfsPointer.java:171: error: [BadComparable] Possible sign flip from
narrowing conversion
return (int) (getSize() - o.getSize());
^
(see https://errorprone.info/bugpattern/BadComparable)
Did you mean 'return Long.compare(getSize(), o.getSize());'?
Bug: 562756
Change-Id: I0522f1025319a9290c448a064fbafdb4b16d1d59
Signed-off-by: David Ostrovsky
---
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
index 55d2cfa6e..4e2d8a998 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
@@ -168,7 +168,7 @@ public class LfsPointer implements Comparable {
return x;
}
- return (int) (getSize() - o.getSize());
+ return Long.compare(getSize(), o.getSize());
}
}
From 7861f82029100641742c623404fd9b3d12d0eeb4 Mon Sep 17 00:00:00 2001
From: David Ostrovsky
Date: Fri, 22 May 2020 07:53:59 +0200
Subject: [PATCH 39/55] Fix InvalidInlineTag error flagged by error prone
Running recent error prone version complaining on that code:
RefDatabase.java:444: error: [InvalidInlineTag] Tag name `linkObjectId`
is unknown.
* Includes peeled {@linkObjectId}s. This is the inverse lookup of
^
(see https://errorprone.info/bugpattern/InvalidInlineTag)
Bug: 562756
Change-Id: If91da51d5138fb753c0550eeeb9e3883a394123d
Signed-off-by: David Ostrovsky
---
.../jgit/internal/storage/reftable/ReftableDatabase.java | 2 +-
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java
index 4de6c2870..4747be354 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java
@@ -280,7 +280,7 @@ public abstract class ReftableDatabase {
/**
* Returns all refs that resolve directly to the given {@link ObjectId}.
- * Includes peeled {@linkObjectId}s.
+ * Includes peeled {@link ObjectId}s.
*
* @param id
* {@link ObjectId} to resolve
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
index ff5a84ca6..6832c9cd8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
@@ -441,7 +441,7 @@ public abstract class RefDatabase {
/**
* Returns all refs that resolve directly to the given {@link ObjectId}.
- * Includes peeled {@linkObjectId}s. This is the inverse lookup of
+ * Includes peeled {@link ObjectId}s. This is the inverse lookup of
* {@link #exactRef(String...)}.
*
*
From e9f4cb1cbad3f8e1d6980507688f2ab0a823e08c Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Wed, 3 Jun 2020 13:51:46 +0200
Subject: [PATCH 40/55] Fix jgit packaging
- new jsch and gpg.bc fragments need to be included in their features
as fragments and require only the jgit bundle (not the jgit feature)
- feature org.eclipse.jgit should no longer include bouncycastle
- add missing url for gpg.bc feature in category.xml
- don't mark features as patch features
Change-Id: I4a46e3fed319221a704b754347a6798b4b199fe4
---
.../org.eclipse.jgit.feature/feature.xml | 21 ------------------
.../feature.xml | 3 ++-
.../org.eclipse.jgit.repository/category.xml | 22 +++++++++----------
.../feature.xml | 3 ++-
4 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
index 8d2e8c82d..49932139f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
@@ -57,25 +57,4 @@
version="0.0.0"
unpack="false"/>
-
-
-
-
-
-
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
index 9b8b824ab..c99b62e34 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
@@ -23,7 +23,7 @@
-
+
This is a pure Java implementation of the Git version control system. The native Git version is also required in this version.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
@@ -33,9 +36,6 @@
-
-
-
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
index 7dbf71f07..d6dbf01b8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
@@ -23,7 +23,7 @@
-
+
Date: Thu, 4 Jun 2020 13:51:17 +0900
Subject: [PATCH 41/55] ObjectDirectory: Fail immediately when atomic move is
not supported
If atomic move is not supported, AtomicMoveNotSupportedException will
be thrown on the first attempt to move the temp file. There is no
point attempting the move operation a second time because it will only
fail for the same reason.
Add an immediate return of FAILURE on the first occasion. Remove the
unnecessary handling of the exception in the second block.
Change-Id: I4658a8b37cfec2d7ef0217c8346e512968d0964c
Signed-off-by: David Pursehouse
---
.../eclipse/jgit/internal/storage/file/ObjectDirectory.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index 6a822d570..651cf1911 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -693,6 +693,8 @@ public class ObjectDirectory extends FileObjectDatabase {
return InsertLooseObjectResult.INSERTED;
} catch (AtomicMoveNotSupportedException e) {
LOG.error(e.getMessage(), e);
+ FileUtils.delete(tmp, FileUtils.RETRY);
+ return InsertLooseObjectResult.FAILURE;
} catch (IOException e) {
// ignore
}
@@ -708,8 +710,6 @@ public class ObjectDirectory extends FileObjectDatabase {
dst.setReadOnly();
unpackedObjectCache.add(id);
return InsertLooseObjectResult.INSERTED;
- } catch (AtomicMoveNotSupportedException e) {
- LOG.error(e.getMessage(), e);
} catch (IOException e) {
LOG.debug(e.getMessage(), e);
}
From 949ee670c6a0cdb7b0ecaaaa751799148899c709 Mon Sep 17 00:00:00 2001
From: David Pursehouse
Date: Thu, 4 Jun 2020 14:07:34 +0900
Subject: [PATCH 42/55] ObjectDirectory: Explicitly handle NoSuchFileException
On the first attempt to move the temp file, NoSuchFileException can
be raised if the destination folder does not exist. Instead of handling
this implicitly in the catch of IOException and then continuing to
create the destination folder and try again, explicitly catch it and
create the destination folder. If any other IOException occurs, treat
it as an unexpected error and return FAILURE.
Subsequently, on the second attempt to move the temp file, if ANY kind
of IOException occurs, also consider this an unexpected error and
return FAILURE.
In both catch blocks for IOException, add logging at ERROR level.
Change-Id: I9de9ee3d2b368be36e02ee1c0daf8e844f7e46c8
Signed-off-by: David Pursehouse
---
.../storage/file/ObjectDirectory.java | 32 ++++++++-----------
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index 651cf1911..33f7853ab 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -21,6 +21,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.AtomicMoveNotSupportedException;
import java.nio.file.Files;
+import java.nio.file.NoSuchFileException;
import java.nio.file.StandardCopyOption;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -695,15 +696,19 @@ public class ObjectDirectory extends FileObjectDatabase {
LOG.error(e.getMessage(), e);
FileUtils.delete(tmp, FileUtils.RETRY);
return InsertLooseObjectResult.FAILURE;
+ } catch (NoSuchFileException e) {
+ // It's possible the directory doesn't exist yet as the object
+ // directories are always lazily created. Note that we try the
+ // rename/move first as the directory likely does exist.
+
+ // Create the directory
+ FileUtils.mkdir(dst.getParentFile(), true);
} catch (IOException e) {
- // ignore
+ LOG.error(e.getMessage(), e);
+ FileUtils.delete(tmp, FileUtils.RETRY);
+ return InsertLooseObjectResult.FAILURE;
}
- // Maybe the directory doesn't exist yet as the object
- // directories are always lazily created. Note that we
- // try the rename first as the directory likely does exist.
- //
- FileUtils.mkdir(dst.getParentFile(), true);
try {
Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst),
StandardCopyOption.ATOMIC_MOVE);
@@ -711,21 +716,10 @@ public class ObjectDirectory extends FileObjectDatabase {
unpackedObjectCache.add(id);
return InsertLooseObjectResult.INSERTED;
} catch (IOException e) {
- LOG.debug(e.getMessage(), e);
- }
-
- if (!createDuplicate && has(id)) {
+ LOG.error(e.getMessage(), e);
FileUtils.delete(tmp, FileUtils.RETRY);
- return InsertLooseObjectResult.EXISTS_PACKED;
+ return InsertLooseObjectResult.FAILURE;
}
-
- // The object failed to be renamed into its proper
- // location and it doesn't exist in the repository
- // either. We really don't know what went wrong, so
- // fail.
- //
- FileUtils.delete(tmp, FileUtils.RETRY);
- return InsertLooseObjectResult.FAILURE;
}
boolean searchPacksAgain(PackList old) {
From cd1023cf453db935ea7d25121cde7800df6dfdb7 Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Thu, 4 Jun 2020 14:15:08 +0200
Subject: [PATCH 43/55] Use version range to define fragment host bundle
version
Change-Id: Ie877e976b20d3448fc1f12a1c775942d626a12fc
Signed-off-by: Matthias Sohn
---
org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF | 2 +-
org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
index 574bbcf46..adab40574 100644
--- a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.gpg.bc
Bundle-SymbolicName: org.eclipse.jgit.gpg.bc;singleton:=true
-Fragment-Host: org.eclipse.jgit;bundle-version="5.8.0.qualifier"
+Fragment-Host: org.eclipse.jgit;bundle-version="[5.8.0,5.9.0)"
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-Version: 5.8.0.qualifier
diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
index 5ae5d4b30..afa0d188d 100644
--- a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ssh.jsch
Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch;singleton:=true
-Fragment-Host: org.eclipse.jgit;bundle-version="5.8.0.qualifier"
+Fragment-Host: org.eclipse.jgit;bundle-version="[5.8.0,5.9.0)"
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
From 0e87f70e0e0618973c75254fa962b40d2da7cd4c Mon Sep 17 00:00:00 2001
From: David Ostrovsky
Date: Fri, 22 May 2020 08:03:41 +0200
Subject: [PATCH 44/55] Fix ProtectedMembersInFinalClass warning flagged by
error prone
Running recent error prone version complaining on that code:
CharacterHead.java:22: error: [ProtectedMembersInFinalClass] Make
members of final classes package-private:
protected CharacterHead(char expectedCharacter) {
^
(see https://errorprone.info/bugpattern/ProtectedMembersInFinalClass)
Did you mean 'CharacterHead(char expectedCharacter) {'
Bug: 562756
Change-Id: Ic46a0b07e46235592f6e63db631f583303420b73
Signed-off-by: David Ostrovsky
---
.../src/org/eclipse/jgit/fnmatch/CharacterHead.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java
index ebffa19b1..faf4ee66c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java
@@ -19,7 +19,7 @@ final class CharacterHead extends AbstractHead {
* @param expectedCharacter
* expected {@code char}
*/
- protected CharacterHead(char expectedCharacter) {
+ CharacterHead(char expectedCharacter) {
super(false);
this.expectedCharacter = expectedCharacter;
}
From c4e5dd3761f7b50854b11b8461817577ccda2516 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Thu, 4 Jun 2020 17:10:38 +0200
Subject: [PATCH 45/55] Fix typo in org.eclipse.jgit.ssh.jsch.test MANIFEST
Change-Id: I1d1484b32aa0c6464b5c38f2a2987716589ae9aa
Signed-off-by: Thomas Wolf
---
org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
index d9cb832fa..f5707a7e1 100644
--- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
@@ -1,4 +1,4 @@
-ssssssssssManifest-Version: 1.0
+Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ssh.jsch.test
From e3f7a06764b5599ae47f23005ed6dccaf38ba7c8 Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Sat, 9 Nov 2019 22:05:53 +0100
Subject: [PATCH 46/55] GPG: don't prompt for a passphrase for unprotected keys
BouncyCastle supports reading GPG keys without passphrase since 1.62.
Handle this in JGit, too, and don't prompt for a passphrase unless
it's necessary.
Make two passes over the private key files, a first pass without
passphrase provider. If that succeeds it has managed to read a
matching key without passphrase. Otherwise, ask the user for
the passphrase and make a second pass over the key files.
BouncyCastle 1.65 still has no method to get the GPG "key grip" from
a given public key, so JGit still cannot determine the correct file
to read up front. (The file name is the key grip as 40 hex digits,
upper case, with extension ".key").
Bug: 548763
Change-Id: I448181276548c08716d913c7ba1b4bc64c62f952
Signed-off-by: Thomas Wolf
---
.../internal/BouncyCastleGpgKeyLocator.java | 61 ++++++++++++++-----
.../BouncyCastleGpgKeyPassphrasePrompt.java | 11 +++-
.../bc/internal/BouncyCastleGpgSigner.java | 31 +++++++---
3 files changed, 80 insertions(+), 23 deletions(-)
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
index e6a48f859..eca45072b 100644
--- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018, Salesforce. and others
+ * Copyright (C) 2018, 2020 Salesforce 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
@@ -25,7 +25,9 @@ import java.nio.file.Paths;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import java.util.Locale;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -76,6 +78,13 @@ public class BouncyCastleGpgKeyLocator {
}
+ /** Thrown if we try to read an encrypted private key without password. */
+ private static class EncryptedPgpKeyException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ }
+
private static final Logger log = LoggerFactory
.getLogger(BouncyCastleGpgKeyLocator.class);
@@ -433,22 +442,46 @@ public class BouncyCastleGpgKeyLocator {
PGPDigestCalculatorProvider calculatorProvider = new JcaPGPDigestCalculatorProviderBuilder()
.build();
- PBEProtectionRemoverFactory passphraseProvider = new JcePBEProtectionRemoverFactory(
- passphrasePrompt.getPassphrase(publicKey.getFingerprint(),
- userKeyboxPath));
-
try (Stream keyFiles = Files.walk(USER_SECRET_KEY_DIR)) {
- for (Path keyFile : keyFiles.filter(Files::isRegularFile)
- .collect(Collectors.toList())) {
- PGPSecretKey secretKey = attemptParseSecretKey(keyFile,
- calculatorProvider, passphraseProvider, publicKey);
- if (secretKey != null) {
- if (!secretKey.isSigningKey()) {
- throw new PGPException(MessageFormat.format(
- BCText.get().gpgNotASigningKey, signingKey));
+ List allPaths = keyFiles.filter(Files::isRegularFile)
+ .collect(Collectors.toCollection(ArrayList::new));
+ if (allPaths.isEmpty()) {
+ return null;
+ }
+ PBEProtectionRemoverFactory passphraseProvider = p -> {
+ throw new EncryptedPgpKeyException();
+ };
+ for (int attempts = 0; attempts < 2; attempts++) {
+ // Second pass will traverse only the encrypted keys with a real
+ // passphrase provider.
+ Iterator pathIterator = allPaths.iterator();
+ while (pathIterator.hasNext()) {
+ Path keyFile = pathIterator.next();
+ try {
+ PGPSecretKey secretKey = attemptParseSecretKey(keyFile,
+ calculatorProvider, passphraseProvider,
+ publicKey);
+ pathIterator.remove();
+ if (secretKey != null) {
+ if (!secretKey.isSigningKey()) {
+ throw new PGPException(MessageFormat.format(
+ BCText.get().gpgNotASigningKey,
+ signingKey));
+ }
+ return new BouncyCastleGpgKey(secretKey,
+ userKeyboxPath);
+ }
+ } catch (EncryptedPgpKeyException e) {
+ // Ignore; we'll try again.
}
- return new BouncyCastleGpgKey(secretKey, userKeyboxPath);
}
+ if (attempts > 0 || allPaths.isEmpty()) {
+ break;
+ }
+ // allPaths contains only the encrypted keys now.
+ passphraseProvider = new JcePBEProtectionRemoverFactory(
+ passphrasePrompt.getPassphrase(
+ publicKey.getFingerprint(), userKeyboxPath));
}
passphrasePrompt.clear();
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java
index 740f597a9..e47f64f1a 100644
--- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java
@@ -1,5 +1,5 @@
/*-
- * Copyright (C) 2019, Salesforce. and others
+ * Copyright (C) 2019, 2020 Salesforce 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
@@ -97,4 +97,13 @@ class BouncyCastleGpgKeyPassphrasePrompt implements AutoCloseable {
return passphrase.getValue();
}
+ /**
+ * Determines whether a passphrase was already obtained.
+ *
+ * @return {@code true} if a passphrase is already set, {@code false}
+ * otherwise
+ */
+ public boolean hasPassphrase() {
+ return passphrase != null && passphrase.getValue() != null;
+ }
}
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java
index fc6c156d4..c6ecdbe6d 100644
--- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018, Salesforce. and others
+ * Copyright (C) 2018, 2020, Salesforce 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
@@ -104,13 +104,28 @@ public class BouncyCastleGpgSigner extends GpgSigner {
throw new JGitInternalException(
BCText.get().unableToSignCommitNoSecretKey);
}
- char[] passphrase = passphrasePrompt.getPassphrase(
- secretKey.getPublicKey().getFingerprint(),
- gpgKey.getOrigin());
- PGPPrivateKey privateKey = secretKey
- .extractPrivateKey(new JcePBESecretKeyDecryptorBuilder()
- .setProvider(BouncyCastleProvider.PROVIDER_NAME)
- .build(passphrase));
+ JcePBESecretKeyDecryptorBuilder decryptorBuilder = new JcePBESecretKeyDecryptorBuilder()
+ .setProvider(BouncyCastleProvider.PROVIDER_NAME);
+ PGPPrivateKey privateKey = null;
+ if (!passphrasePrompt.hasPassphrase()) {
+ // Either the key is not encrypted, or it was read from the
+ // legacy secring.gpg. Try getting the private key without
+ // passphrase first.
+ try {
+ privateKey = secretKey.extractPrivateKey(
+ decryptorBuilder.build(new char[0]));
+ } catch (PGPException e) {
+ // Ignore and try again with passphrase below
+ }
+ }
+ if (privateKey == null) {
+ // Try using a passphrase
+ char[] passphrase = passphrasePrompt.getPassphrase(
+ secretKey.getPublicKey().getFingerprint(),
+ gpgKey.getOrigin());
+ privateKey = secretKey
+ .extractPrivateKey(decryptorBuilder.build(passphrase));
+ }
PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(
new JcaPGPContentSignerBuilder(
secretKey.getPublicKey().getAlgorithm(),
From ed481f96b811c2c50d58f35200657484320621dc Mon Sep 17 00:00:00 2001
From: Thomas Wolf
Date: Fri, 24 Apr 2020 15:00:01 +0200
Subject: [PATCH 47/55] ApplyCommand: use context lines to determine hunk
location
If a hunk does not apply at the position stated in the hunk header
try to determine its position using the old lines (context and
deleted lines).
This is still a far cry from a full git apply: it doesn't do binary
patches, it doesn't handle git's whitespace options, and it's perhaps
not the fastest on big patches. C git hashes the lines and uses these
hashes to speed up matching hunks (and to do its whitespace magic).
Bug: 562348
Change-Id: Id0796bba059d84e648769d5896f497fde0b787dd
Signed-off-by: Thomas Wolf
---
.../org/eclipse/jgit/diff/ShiftDown.patch | 14 ++
.../org/eclipse/jgit/diff/ShiftDown2.patch | 24 +++
.../eclipse/jgit/diff/ShiftDown2_PostImage | 75 ++++++++
.../org/eclipse/jgit/diff/ShiftDown2_PreImage | 68 +++++++
.../org/eclipse/jgit/diff/ShiftDown_PostImage | 71 ++++++++
.../org/eclipse/jgit/diff/ShiftDown_PreImage | 68 +++++++
.../org/eclipse/jgit/diff/ShiftUp.patch | 14 ++
.../org/eclipse/jgit/diff/ShiftUp2.patch | 23 +++
.../org/eclipse/jgit/diff/ShiftUp2_PostImage | 38 ++++
.../org/eclipse/jgit/diff/ShiftUp2_PreImage | 32 ++++
.../org/eclipse/jgit/diff/ShiftUp_PostImage | 35 ++++
.../org/eclipse/jgit/diff/ShiftUp_PreImage | 32 ++++
.../eclipse/jgit/api/ApplyCommandTest.java | 42 ++++-
.../org/eclipse/jgit/api/ApplyCommand.java | 166 +++++++++++++-----
14 files changed, 659 insertions(+), 43 deletions(-)
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown.patch
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2.patch
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PostImage
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PreImage
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PostImage
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PreImage
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp.patch
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2.patch
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PostImage
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PreImage
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PostImage
create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PreImage
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown.patch
new file mode 100644
index 000000000..74c33714b
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown.patch
@@ -0,0 +1,14 @@
+diff --git a/ShiftDown b/ShiftDown
+index 8b9727b..25dc192 100644
+--- a/ShiftDown
++++ b/ShiftDown
+@@ -16,6 +16,9 @@
+ something("A.b", "bar");
+ }
+
++ public void methodC() {
++ something("A.c", "bar");
++ }
+ }
+
+ public class B {
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2.patch
new file mode 100644
index 000000000..a2b34b354
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2.patch
@@ -0,0 +1,24 @@
+diff --git a/ShiftDown2 b/ShiftDown2
+index 8b9727b..63353aa 100644
+--- a/ShiftDown2
++++ b/ShiftDown2
+@@ -16,6 +16,9 @@
+ something("A.b", "bar");
+ }
+
++ public void methodC() {
++ something("A.c", "bar");
++ }
+ }
+
+ public class B {
+@@ -28,5 +31,9 @@
+ something("B.b", "bar");
+ }
+
++ public void methodC() {
++ something("B.c", "bar");
++ }
++
+ }
+ }
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PostImage
new file mode 100644
index 000000000..738484eef
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PostImage
@@ -0,0 +1,75 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class D {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class E {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class F {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ public void methodC() {
+ something("A.c", "bar");
+ }
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ public void methodC() {
+ something("B.c", "bar");
+ }
+
+ }
+}
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PreImage
new file mode 100644
index 000000000..e1ee19c4d
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PreImage
@@ -0,0 +1,68 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class D {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class E {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class F {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ }
+}
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PostImage
new file mode 100644
index 000000000..5c6e9bccb
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PostImage
@@ -0,0 +1,71 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class D {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class E {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class F {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ public void methodC() {
+ something("A.c", "bar");
+ }
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ }
+}
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PreImage
new file mode 100644
index 000000000..e1ee19c4d
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PreImage
@@ -0,0 +1,68 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class D {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class E {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class F {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ }
+}
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp.patch
new file mode 100644
index 000000000..aa994a12e
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp.patch
@@ -0,0 +1,14 @@
+diff --git a/ShiftUp b/ShiftUp
+index e1ee19c..5c6e9bc 100644
+--- a/ShiftUp
++++ b/ShiftUp
+@@ -52,6 +52,9 @@
+ something("A.b", "bar");
+ }
+
++ public void methodC() {
++ something("A.c", "bar");
++ }
+ }
+
+ public class B {
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2.patch
new file mode 100644
index 000000000..eca99714c
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2.patch
@@ -0,0 +1,23 @@
+diff --git a/ShiftUp2 b/ShiftUp2
+index e1ee19c..f010144 100644
+--- a/ShiftUp2
++++ b/ShiftUp2
+@@ -52,6 +52,9 @@
+ something("A.b", "bar");
+ }
+
++ public void methodC() {
++ something("A.c", "bar");
++ }
+ }
+
+ public class B {
+@@ -64,5 +67,8 @@
+ something("B.b", "bar");
+ }
+
++ public void methodC() {
++ something("B.c", "bar");
++ }
+ }
+ }
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PostImage
new file mode 100644
index 000000000..e279ecedd
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PostImage
@@ -0,0 +1,38 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ public void methodC() {
+ something("A.c", "bar");
+ }
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ public void methodC() {
+ something("B.c", "bar");
+ }
+ }
+}
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PreImage
new file mode 100644
index 000000000..8b9727b01
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PreImage
@@ -0,0 +1,32 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ }
+}
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PostImage
new file mode 100644
index 000000000..25dc192b0
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PostImage
@@ -0,0 +1,35 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ public void methodC() {
+ something("A.c", "bar");
+ }
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ }
+}
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PreImage
new file mode 100644
index 000000000..8b9727b01
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PreImage
@@ -0,0 +1,32 @@
+package org.eclipse.jgit.test.apply;
+
+public class TestClass {
+
+ private void something(String prefix, String msg) {
+ System.out.println(prefix + ": " + msg);
+ }
+
+ public class A {
+
+ public void methodA() {
+ something("A.a", "foo");
+ }
+
+ public void methodB() {
+ something("A.b", "bar");
+ }
+
+ }
+
+ public class B {
+
+ public void methodA() {
+ something("B.a", "foo");
+ }
+
+ public void methodB() {
+ something("B.b", "bar");
+ }
+
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java
index 63cd21f59..055eba718 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, 2012, IBM Corporation and others. and others
+ * Copyright (C) 2011, 2020 IBM Corporation 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
@@ -280,6 +280,46 @@ public class ApplyCommandTest extends RepositoryTestCase {
b.getString(0, b.size(), false));
}
+ @Test
+ public void testShiftUp() throws Exception {
+ ApplyResult result = init("ShiftUp");
+ assertEquals(1, result.getUpdatedFiles().size());
+ assertEquals(new File(db.getWorkTree(), "ShiftUp"),
+ result.getUpdatedFiles().get(0));
+ checkFile(new File(db.getWorkTree(), "ShiftUp"),
+ b.getString(0, b.size(), false));
+ }
+
+ @Test
+ public void testShiftUp2() throws Exception {
+ ApplyResult result = init("ShiftUp2");
+ assertEquals(1, result.getUpdatedFiles().size());
+ assertEquals(new File(db.getWorkTree(), "ShiftUp2"),
+ result.getUpdatedFiles().get(0));
+ checkFile(new File(db.getWorkTree(), "ShiftUp2"),
+ b.getString(0, b.size(), false));
+ }
+
+ @Test
+ public void testShiftDown() throws Exception {
+ ApplyResult result = init("ShiftDown");
+ assertEquals(1, result.getUpdatedFiles().size());
+ assertEquals(new File(db.getWorkTree(), "ShiftDown"),
+ result.getUpdatedFiles().get(0));
+ checkFile(new File(db.getWorkTree(), "ShiftDown"),
+ b.getString(0, b.size(), false));
+ }
+
+ @Test
+ public void testShiftDown2() throws Exception {
+ ApplyResult result = init("ShiftDown2");
+ assertEquals(1, result.getUpdatedFiles().size());
+ assertEquals(new File(db.getWorkTree(), "ShiftDown2"),
+ result.getUpdatedFiles().get(0));
+ checkFile(new File(db.getWorkTree(), "ShiftDown2"),
+ b.getString(0, b.size(), false));
+ }
+
private static byte[] readFile(String patchFile) throws IOException {
final InputStream in = getTestResource(patchFile);
if (in == null) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
index 0d4b3da6a..e228e8276 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, 2012, IBM Corporation and others. and others
+ * Copyright (C) 2011, 2020 IBM Corporation 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
@@ -9,18 +9,15 @@
*/
package org.eclipse.jgit.api;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.File;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.jgit.api.errors.GitAPIException;
@@ -168,71 +165,156 @@ public class ApplyCommand extends GitCommand {
for (int i = 0; i < rt.size(); i++)
oldLines.add(rt.getString(i));
List newLines = new ArrayList<>(oldLines);
+ int afterLastHunk = 0;
+ int lineNumberShift = 0;
+ int lastHunkNewLine = -1;
for (HunkHeader hh : fh.getHunks()) {
+ // We assume hunks to be ordered
+ if (hh.getNewStartLine() <= lastHunkNewLine) {
+ throw new PatchApplyException(MessageFormat
+ .format(JGitText.get().patchApplyException, hh));
+ }
+ lastHunkNewLine = hh.getNewStartLine();
+
byte[] b = new byte[hh.getEndOffset() - hh.getStartOffset()];
System.arraycopy(hh.getBuffer(), hh.getStartOffset(), b, 0,
b.length);
RawText hrt = new RawText(b);
List hunkLines = new ArrayList<>(hrt.size());
- for (int i = 0; i < hrt.size(); i++)
+ for (int i = 0; i < hrt.size(); i++) {
hunkLines.add(hrt.getString(i));
- int pos = 0;
- for (int j = 1; j < hunkLines.size(); j++) {
+ }
+
+ if (hh.getNewStartLine() == 0) {
+ // Must be the single hunk for clearing all content
+ if (fh.getHunks().size() == 1
+ && canApplyAt(hunkLines, newLines, 0)) {
+ newLines.clear();
+ break;
+ }
+ throw new PatchApplyException(MessageFormat
+ .format(JGitText.get().patchApplyException, hh));
+ }
+ // Hunk lines as reported by the hunk may be off, so don't rely on
+ // them.
+ int applyAt = hh.getNewStartLine() - 1 + lineNumberShift;
+ // But they definitely should not go backwards.
+ if (applyAt < afterLastHunk && lineNumberShift < 0) {
+ applyAt = hh.getNewStartLine() - 1;
+ lineNumberShift = 0;
+ }
+ if (applyAt < afterLastHunk) {
+ throw new PatchApplyException(MessageFormat
+ .format(JGitText.get().patchApplyException, hh));
+ }
+ boolean applies = false;
+ int oldLinesInHunk = hh.getLinesContext()
+ + hh.getOldImage().getLinesDeleted();
+ if (oldLinesInHunk <= 1) {
+ // Don't shift hunks without context lines. Just try the
+ // position corrected by the current lineNumberShift, and if
+ // that fails, the position recorded in the hunk header.
+ applies = canApplyAt(hunkLines, newLines, applyAt);
+ if (!applies && lineNumberShift != 0) {
+ applyAt = hh.getNewStartLine() - 1;
+ applies = applyAt >= afterLastHunk
+ && canApplyAt(hunkLines, newLines, applyAt);
+ }
+ } else {
+ int maxShift = applyAt - afterLastHunk;
+ for (int shift = 0; shift <= maxShift; shift++) {
+ if (canApplyAt(hunkLines, newLines, applyAt - shift)) {
+ applies = true;
+ applyAt -= shift;
+ break;
+ }
+ }
+ if (!applies) {
+ // Try shifting the hunk downwards
+ applyAt = hh.getNewStartLine() - 1 + lineNumberShift;
+ maxShift = newLines.size() - applyAt - oldLinesInHunk;
+ for (int shift = 1; shift <= maxShift; shift++) {
+ if (canApplyAt(hunkLines, newLines, applyAt + shift)) {
+ applies = true;
+ applyAt += shift;
+ break;
+ }
+ }
+ }
+ }
+ if (!applies) {
+ throw new PatchApplyException(MessageFormat
+ .format(JGitText.get().patchApplyException, hh));
+ }
+ // Hunk applies at applyAt. Apply it, and update afterLastHunk and
+ // lineNumberShift
+ lineNumberShift = applyAt - hh.getNewStartLine() + 1;
+ int sz = hunkLines.size();
+ for (int j = 1; j < sz; j++) {
String hunkLine = hunkLines.get(j);
switch (hunkLine.charAt(0)) {
case ' ':
- if (!newLines.get(hh.getNewStartLine() - 1 + pos).equals(
- hunkLine.substring(1))) {
- throw new PatchApplyException(MessageFormat.format(
- JGitText.get().patchApplyException, hh));
- }
- pos++;
+ applyAt++;
break;
case '-':
- if (hh.getNewStartLine() == 0) {
- newLines.clear();
- } else {
- if (!newLines.get(hh.getNewStartLine() - 1 + pos)
- .equals(hunkLine.substring(1))) {
- throw new PatchApplyException(MessageFormat.format(
- JGitText.get().patchApplyException, hh));
- }
- newLines.remove(hh.getNewStartLine() - 1 + pos);
- }
+ newLines.remove(applyAt);
break;
case '+':
- newLines.add(hh.getNewStartLine() - 1 + pos,
- hunkLine.substring(1));
- pos++;
+ newLines.add(applyAt++, hunkLine.substring(1));
+ break;
+ default:
break;
}
}
+ afterLastHunk = applyAt;
}
- if (!isNoNewlineAtEndOfFile(fh))
+ if (!isNoNewlineAtEndOfFile(fh)) {
newLines.add(""); //$NON-NLS-1$
- if (!rt.isMissingNewlineAtEnd())
+ }
+ if (!rt.isMissingNewlineAtEnd()) {
oldLines.add(""); //$NON-NLS-1$
- if (!isChanged(oldLines, newLines))
- return; // don't touch the file
- StringBuilder sb = new StringBuilder();
- for (String l : newLines) {
- // don't bother handling line endings - if it was windows, the \r is
- // still there!
- sb.append(l).append('\n');
}
- if (sb.length() > 0) {
- sb.deleteCharAt(sb.length() - 1);
+ if (!isChanged(oldLines, newLines)) {
+ return; // Don't touch the file
}
- try (Writer fw = new OutputStreamWriter(new FileOutputStream(f),
- UTF_8)) {
- fw.write(sb.toString());
+ try (Writer fw = Files.newBufferedWriter(f.toPath())) {
+ for (Iterator l = newLines.iterator(); l.hasNext();) {
+ fw.write(l.next());
+ if (l.hasNext()) {
+ // Don't bother handling line endings - if it was Windows,
+ // the \r is still there!
+ fw.write('\n');
+ }
+ }
}
-
getRepository().getFS().setExecute(f, fh.getNewMode() == FileMode.EXECUTABLE_FILE);
}
+ private boolean canApplyAt(List hunkLines, List newLines,
+ int line) {
+ int sz = hunkLines.size();
+ int limit = newLines.size();
+ int pos = line;
+ for (int j = 1; j < sz; j++) {
+ String hunkLine = hunkLines.get(j);
+ switch (hunkLine.charAt(0)) {
+ case ' ':
+ case '-':
+ if (pos >= limit
+ || !newLines.get(pos).equals(hunkLine.substring(1))) {
+ return false;
+ }
+ pos++;
+ break;
+ default:
+ break;
+ }
+ }
+ return true;
+ }
+
private static boolean isChanged(List ol, List nl) {
if (ol.size() != nl.size())
return true;
From aea95b819aeac1cce43e8ad78cef413e3cebaa08 Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Fri, 20 Dec 2019 02:23:05 +0100
Subject: [PATCH 48/55] Add Git#shutdown for releasing resources held by JGit
process
The shutdown method releases
- ThreadLocal held by NLS
- GlobalBundleCache used by NLS
- Executor held by WorkQueue
Bug: 437855
Bug: 550529
Change-Id: Icfdccd63668ca90c730ee47a52a17dbd58695ada
Signed-off-by: Matthias Sohn
---
org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java | 11 +++++++++++
.../src/org/eclipse/jgit/nls/GlobalBundleCache.java | 4 ++++
org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java | 9 +++++++++
3 files changed, 24 insertions(+)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
index 01306f412..64314772b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
@@ -18,6 +18,8 @@ import java.io.IOException;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryBuilder;
import org.eclipse.jgit.lib.RepositoryCache;
+import org.eclipse.jgit.lib.internal.WorkQueue;
+import org.eclipse.jgit.nls.NLS;
import org.eclipse.jgit.util.FS;
/**
@@ -170,6 +172,15 @@ public class Git implements AutoCloseable {
return new InitCommand();
}
+ /**
+ * Shutdown JGit and release resources it holds like NLS and thread pools
+ * @since 5.8
+ */
+ public static void shutdown() {
+ WorkQueue.getExecutor().shutdownNow();
+ NLS.clear();
+ }
+
/**
* Construct a new {@link org.eclipse.jgit.api.Git} object which can
* interact with the specified git repository.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java
index 6d4437f4c..9b556393e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java
@@ -70,4 +70,8 @@ class GlobalBundleCache {
throw new Error(e);
}
}
+
+ static void clear() {
+ cachedBundles.clear();
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java
index daa039d34..d7dd3bee5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java
@@ -100,6 +100,15 @@ public class NLS {
return b.get(type);
}
+ /**
+ * Release resources held by NLS
+ * @since 5.8
+ */
+ public static void clear() {
+ local.remove();
+ GlobalBundleCache.clear();
+ }
+
private final Locale locale;
private final ConcurrentHashMap map = new ConcurrentHashMap<>();
From dac6801b47ef7924d6b265800816da1b571e6d70 Mon Sep 17 00:00:00 2001
From: David Pursehouse
Date: Fri, 5 Jun 2020 11:34:49 +0900
Subject: [PATCH 49/55] ObjectDirectory: Further clean up insertUnpackedObject
- The code to move the file is repeated. Split it out into a
utility method.
- Remove the catch block for AtomicMoveNotSupportedException which
is redundant because it's handled in exactly the same way as the
IOException further down. The only exception we need to explicitly
handle differently in this block is NoSuchFileException.
- Improve the comments.
Change-Id: Ifc5490953ffb25ecd1c48a06289eccb3f19910c6
Signed-off-by: David Pursehouse
---
.../storage/file/ObjectDirectory.java | 39 +++++++++++--------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index 33f7853ab..265b71dd2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -19,7 +19,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.nio.file.AtomicMoveNotSupportedException;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.StandardCopyOption;
@@ -686,42 +685,48 @@ public class ObjectDirectory extends FileObjectDatabase {
FileUtils.delete(tmp, FileUtils.RETRY);
return InsertLooseObjectResult.EXISTS_LOOSE;
}
+
try {
- Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst),
- StandardCopyOption.ATOMIC_MOVE);
- dst.setReadOnly();
- unpackedObjectCache.add(id);
- return InsertLooseObjectResult.INSERTED;
- } catch (AtomicMoveNotSupportedException e) {
- LOG.error(e.getMessage(), e);
- FileUtils.delete(tmp, FileUtils.RETRY);
- return InsertLooseObjectResult.FAILURE;
+ return tryMove(tmp, dst, id);
} catch (NoSuchFileException e) {
// It's possible the directory doesn't exist yet as the object
// directories are always lazily created. Note that we try the
// rename/move first as the directory likely does exist.
-
- // Create the directory
+ //
+ // Create the directory.
+ //
FileUtils.mkdir(dst.getParentFile(), true);
} catch (IOException e) {
+ // Any other IO error is considered a failure.
+ //
LOG.error(e.getMessage(), e);
FileUtils.delete(tmp, FileUtils.RETRY);
return InsertLooseObjectResult.FAILURE;
}
try {
- Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst),
- StandardCopyOption.ATOMIC_MOVE);
- dst.setReadOnly();
- unpackedObjectCache.add(id);
- return InsertLooseObjectResult.INSERTED;
+ return tryMove(tmp, dst, id);
} catch (IOException e) {
+ // The object failed to be renamed into its proper location and
+ // it doesn't exist in the repository either. We really don't
+ // know what went wrong, so fail.
+ //
LOG.error(e.getMessage(), e);
FileUtils.delete(tmp, FileUtils.RETRY);
return InsertLooseObjectResult.FAILURE;
}
}
+ private InsertLooseObjectResult tryMove(File tmp, File dst,
+ ObjectId id)
+ throws IOException {
+ Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst),
+ StandardCopyOption.ATOMIC_MOVE);
+ dst.setReadOnly();
+ unpackedObjectCache.add(id);
+ return InsertLooseObjectResult.INSERTED;
+ }
+
boolean searchPacksAgain(PackList old) {
// Whether to trust the pack folder's modification time. If set
// to false we will always scan the .git/objects/pack folder to
From f4f5d448b691c06688cb3636dc2294308b1a433f Mon Sep 17 00:00:00 2001
From: David Pursehouse
Date: Fri, 5 Jun 2020 14:46:08 +0900
Subject: [PATCH 50/55] ObjectDirectoryInserter: Remove redundant 'throws'
declarations
ObjectWritingException and FileNotFoundException are subclasses
of IOException, which is already declared. Error does not need
to be explicitly declared.
Change-Id: I879820a33e10ec3a7ef676adc9c9148d2b3c4b27
Signed-off-by: David Pursehouse
---
.../internal/storage/file/ObjectDirectoryInserter.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
index c908e6a24..2d2401b5b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
@@ -14,7 +14,6 @@ package org.eclipse.jgit.internal.storage.file;
import java.io.EOFException;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
@@ -116,7 +115,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
private ObjectId insertOneObject(
File tmp, ObjectId id, boolean createDuplicate)
- throws IOException, ObjectWritingException {
+ throws IOException {
switch (db.insertUnpackedObject(tmp, id, createDuplicate)) {
case INSERTED:
case EXISTS_PACKED:
@@ -165,8 +164,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
@SuppressWarnings("resource" /* java 7 */)
private File toTemp(final SHA1 md, final int type, long len,
- final InputStream is) throws IOException, FileNotFoundException,
- Error {
+ final InputStream is) throws IOException {
boolean delete = true;
File tmp = newTempFile();
try {
@@ -205,7 +203,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
@SuppressWarnings("resource" /* java 7 */)
private File toTemp(final int type, final byte[] buf, final int pos,
- final int len) throws IOException, FileNotFoundException {
+ final int len) throws IOException {
boolean delete = true;
File tmp = newTempFile();
try {
From c0c7f445f4e8daf2900f8735b088edb2288882b0 Mon Sep 17 00:00:00 2001
From: David Pursehouse
Date: Fri, 5 Jun 2020 14:59:54 +0900
Subject: [PATCH 51/55] ObjectDirectoryInserter: Open FileOutputStream in
try-with-resource
Change-Id: Icc569aeefdc79baee5dfb71fb34d881c561dcf52
Signed-off-by: David Pursehouse
---
.../storage/file/ObjectDirectoryInserter.java | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
index 2d2401b5b..e6b2cc12f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
@@ -162,17 +162,16 @@ class ObjectDirectoryInserter extends ObjectInserter {
}
}
- @SuppressWarnings("resource" /* java 7 */)
private File toTemp(final SHA1 md, final int type, long len,
final InputStream is) throws IOException {
boolean delete = true;
File tmp = newTempFile();
- try {
- FileOutputStream fOut = new FileOutputStream(tmp);
+ try (FileOutputStream fOut = new FileOutputStream(tmp)) {
try {
OutputStream out = fOut;
- if (config.getFSyncObjectFiles())
+ if (config.getFSyncObjectFiles()) {
out = Channels.newOutputStream(fOut.getChannel());
+ }
DeflaterOutputStream cOut = compress(out);
SHA1OutputStream dOut = new SHA1OutputStream(cOut, md);
writeHeader(dOut, type, len);
@@ -180,53 +179,54 @@ class ObjectDirectoryInserter extends ObjectInserter {
final byte[] buf = buffer();
while (len > 0) {
int n = is.read(buf, 0, (int) Math.min(len, buf.length));
- if (n <= 0)
+ if (n <= 0) {
throw shortInput(len);
+ }
dOut.write(buf, 0, n);
len -= n;
}
dOut.flush();
cOut.finish();
} finally {
- if (config.getFSyncObjectFiles())
+ if (config.getFSyncObjectFiles()) {
fOut.getChannel().force(true);
- fOut.close();
+ }
}
delete = false;
return tmp;
} finally {
- if (delete)
+ if (delete) {
FileUtils.delete(tmp, FileUtils.RETRY);
+ }
}
}
- @SuppressWarnings("resource" /* java 7 */)
private File toTemp(final int type, final byte[] buf, final int pos,
final int len) throws IOException {
boolean delete = true;
File tmp = newTempFile();
- try {
- FileOutputStream fOut = new FileOutputStream(tmp);
+ try (FileOutputStream fOut = new FileOutputStream(tmp)) {
try {
OutputStream out = fOut;
- if (config.getFSyncObjectFiles())
+ if (config.getFSyncObjectFiles()) {
out = Channels.newOutputStream(fOut.getChannel());
+ }
DeflaterOutputStream cOut = compress(out);
writeHeader(cOut, type, len);
cOut.write(buf, pos, len);
cOut.finish();
} finally {
- if (config.getFSyncObjectFiles())
+ if (config.getFSyncObjectFiles()) {
fOut.getChannel().force(true);
- fOut.close();
+ }
}
-
delete = false;
return tmp;
} finally {
- if (delete)
+ if (delete) {
FileUtils.delete(tmp, FileUtils.RETRY);
+ }
}
}
From 6e6590d27e340e62cd69457ff1ccc047ed47cc29 Mon Sep 17 00:00:00 2001
From: David Pursehouse
Date: Thu, 4 Jun 2020 22:36:58 +0900
Subject: [PATCH 52/55] Upgrade maven-shade-plugin to 3.2.4
Change-Id: Iba47e9304b6f20e8aa4855378bc86063919bb909
Signed-off-by: David Pursehouse
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index a0f6d7732..7cc21fadb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -234,7 +234,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.2.3
+ 3.2.4
From 18050b569f9836e67df43ef66e78ace6ca9815d1 Mon Sep 17 00:00:00 2001
From: David Pursehouse
Date: Thu, 4 Jun 2020 22:37:42 +0900
Subject: [PATCH 53/55] Upgrade maven-project-info-reports-plugin to 3.1.0
Change-Id: I16e24bbec033ea707cb5c5a0ff3c21859e602f39
Signed-off-by: David Pursehouse
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 7cc21fadb..815f59a47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -173,7 +173,7 @@
2.8.2
1.65
4.0.0
- 3.0.0
+ 3.1.0
3.0.0
3.0.0-M4
${maven-surefire-plugin-version}
From 259d2540a3588f70eb123afef75637167674b06d Mon Sep 17 00:00:00 2001
From: Jack Wickham
Date: Fri, 22 May 2020 11:00:18 +0100
Subject: [PATCH 54/55] Add getter for unpackErrorHandler in ReceivePack
The current mechanism for updating the unpack error handler requires
that the error handler is replaced entirely, including communicating
the error to the user. Adding a getter means that delegating
implementations can be constructed so that the error can be processed
before sending to the user, for example for logging.
Change-Id: I4b6f78a041d0f6f5b4076a9a5781565ca3857817
Signed-off-by: Jack Wickham
---
.../src/org/eclipse/jgit/transport/ReceivePack.java | 10 ++++++++++
1 file changed, 10 insertions(+)
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 49413e54f..79f60c320 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -2060,6 +2060,16 @@ public class ReceivePack {
postReceive = h != null ? h : PostReceiveHook.NULL;
}
+ /**
+ * Get the current unpack error handler.
+ *
+ * @return the current unpack error handler.
+ * @since 5.8
+ */
+ public UnpackErrorHandler getUnpackErrorHandler() {
+ return unpackErrorHandler;
+ }
+
/**
* @param unpackErrorHandler
* the unpackErrorHandler to set
From 8a44216e8bdad1a13ce637b1395467600870849a Mon Sep 17 00:00:00 2001
From: Matthias Sohn
Date: Fri, 5 Jun 2020 13:01:11 +0200
Subject: [PATCH 55/55] Add benchmark for strategies how to move a file
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We can either
- try moving the file and, in case the target directory doesn't exist,
handle the NoSuchFileException this raises to create the target
directory
- or we always first test if the target directory exists and create it
in case it is missing
On my Mac this yields
Benchmark Mode Cnt Score Error Units
FileMoveBenchmark.moveFileToExistingDir avgt 5 196.490 ± 15.194 us/op
FileMoveBenchmark.moveFileToExistingDirExists avgt 5 223.217 ± 54.816 us/op
FileMoveBenchmark.moveFileToMissingDir avgt 5 332.169 ± 43.871 us/op
FileMoveBenchmark.moveFileToMissingDirExists avgt 5 303.815 ± 137.568 us/op
This means if the target directory of the move already exists the
first strategy is faster by around 25 us/op otherwise the second one
is faster by around 30 us/op. Which one is favorable depends on the
average probability that the target directory exists in real world
scenarios.
Change-Id: I03653b408b859a796508dfa1471b36c65633534e
Signed-off-by: Matthias Sohn
---
.../jgit/benchmarks/FileMoveBenchmark.java | 136 ++++++++++++++++++
1 file changed, 136 insertions(+)
create mode 100644 org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java
diff --git a/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java
new file mode 100644
index 000000000..d3ada22df
--- /dev/null
+++ b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2020, Matthias Sohn 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.benchmarks;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.NoSuchFileException;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.jgit.util.FileUtils;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.RunnerException;
+import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+
+@State(Scope.Thread)
+public class FileMoveBenchmark {
+ int i;
+
+ Path testDir;
+
+ Path targetDir;
+
+ @Setup
+ public void setupBenchmark() throws IOException {
+ testDir = Files.createTempDirectory("dir");
+ targetDir = testDir.resolve("target");
+ Files.createDirectory(targetDir);
+ }
+
+ @TearDown
+ public void teardown() throws IOException {
+ FileUtils.delete(testDir.toFile(),
+ FileUtils.RECURSIVE | FileUtils.RETRY);
+ }
+
+ @Benchmark
+ @BenchmarkMode({ Mode.AverageTime })
+ @OutputTimeUnit(TimeUnit.MICROSECONDS)
+ @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
+ @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS)
+ public Path moveFileToExistingDir() throws IOException {
+ i++;
+ Path tmp = testDir.resolve("tmp" + i++);
+ Files.createFile(tmp);
+ Path targetDirectory = targetDir;
+ Path targetFile = targetDirectory.resolve("tmp" + i);
+ try {
+ return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE);
+ } catch (NoSuchFileException e) {
+ Files.createDirectory(targetDirectory);
+ return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE);
+ }
+ }
+
+ @Benchmark
+ @BenchmarkMode({ Mode.AverageTime })
+ @OutputTimeUnit(TimeUnit.MICROSECONDS)
+ @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
+ @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS)
+ public Path moveFileToExistingDirExists() throws IOException {
+ Path tmp = testDir.resolve("tmp" + i++);
+ Files.createFile(tmp);
+ Path targetDirectory = targetDir;
+ Path targetFile = targetDir.resolve("tmp" + i);
+ if (!targetDirectory.toFile().exists()) {
+ Files.createDirectory(targetDirectory);
+ }
+ return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE);
+ }
+
+ @Benchmark
+ @BenchmarkMode({ Mode.AverageTime })
+ @OutputTimeUnit(TimeUnit.MICROSECONDS)
+ @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
+ @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS)
+ public Path moveFileToMissingDir() throws IOException {
+ i++;
+ Path tmp = testDir.resolve("tmp" + i);
+ Files.createFile(tmp);
+ Path targetDirectory = testDir.resolve("target" + i);
+ Path targetFile = targetDirectory.resolve("tmp" + i);
+ try {
+ return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE);
+ } catch (NoSuchFileException e) {
+ Files.createDirectory(targetDirectory);
+ return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE);
+ }
+ }
+
+ @Benchmark
+ @BenchmarkMode({ Mode.AverageTime })
+ @OutputTimeUnit(TimeUnit.MICROSECONDS)
+ @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
+ @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS)
+ public Path moveFileToMissingDirExists() throws IOException {
+ i++;
+ Path tmp = testDir.resolve("tmp" + i);
+ Files.createFile(tmp);
+ Path targetDirectory = testDir.resolve("target" + i);
+ Path targetFile = targetDirectory.resolve("tmp" + i);
+ if (!targetDirectory.toFile().exists()) {
+ Files.createDirectory(targetDirectory);
+ }
+ return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE);
+ }
+
+ public static void main(String[] args) throws RunnerException {
+ Options opt = new OptionsBuilder()
+ .include(FileMoveBenchmark.class
+ .getSimpleName())
+ // .addProfiler(StackProfiler.class)
+ // .addProfiler(GCProfiler.class)
+ .forks(1).jvmArgs("-ea").build();
+ new Runner(opt).run();
+ }
+}
\ No newline at end of file