Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD1
-rw-r--r--README.md22
-rw-r--r--WORKSPACE58
-rw-r--r--lib/BUILD17
-rw-r--r--org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF10
-rw-r--r--org.eclipse.jgit.ant.test/pom.xml6
-rw-r--r--org.eclipse.jgit.ant/META-INF/MANIFEST.MF8
-rw-r--r--org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ant/pom.xml3
-rw-r--r--org.eclipse.jgit.archive/META-INF/MANIFEST.MF16
-rw-r--r--org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.archive/pom.xml2
-rw-r--r--org.eclipse.jgit.benchmarks/.factorypath47
-rw-r--r--org.eclipse.jgit.benchmarks/pom.xml7
-rw-r--r--org.eclipse.jgit.coverage/pom.xml36
-rw-r--r--org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF8
-rw-r--r--org.eclipse.jgit.gpg.bc.test/pom.xml2
-rw-r--r--org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF14
-rw-r--r--org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.gpg.bc/pom.xml2
-rw-r--r--org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF12
-rw-r--r--org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.http.apache/pom.xml2
-rw-r--r--org.eclipse.jgit.http.server/META-INF/MANIFEST.MF34
-rw-r--r--org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.http.server/pom.xml2
-rw-r--r--org.eclipse.jgit.http.test/META-INF/MANIFEST.MF72
-rw-r--r--org.eclipse.jgit.http.test/pom.xml2
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java14
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF48
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.junit.http/pom.xml2
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java49
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java198
-rw-r--r--org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF22
-rw-r--r--org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.junit.ssh/pom.xml2
-rw-r--r--org.eclipse.jgit.junit/META-INF/MANIFEST.MF40
-rw-r--r--org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.junit/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF68
-rw-r--r--org.eclipse.jgit.lfs.server.test/pom.xml6
-rw-r--r--org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF38
-rw-r--r--org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.lfs.server/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF28
-rw-r--r--org.eclipse.jgit.lfs.test/pom.xml6
-rw-r--r--org.eclipse.jgit.lfs/META-INF/MANIFEST.MF46
-rw-r--r--org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.lfs/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml15
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml58
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml9
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml11
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml12
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target74
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target74
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target74
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target74
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target76
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd6
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target99
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20211122181901-2021-12.tpd71
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd20
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd22
-rw-r--r--org.eclipse.jgit.packaging/pom.xml8
-rw-r--r--org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF37
-rw-r--r--org.eclipse.jgit.pgm.test/pom.xml6
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java195
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java18
-rw-r--r--org.eclipse.jgit.pgm/META-INF/MANIFEST.MF96
-rw-r--r--org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.pgm/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin1
-rw-r--r--org.eclipse.jgit.pgm/pom.xml8
-rw-r--r--org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties13
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java255
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java3
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.classpath8
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.fbprefs125
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.gitignore2
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.project28
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs518
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.ui.prefs66
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.pde.api.tools.prefs104
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/BUILD22
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF16
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/about.html96
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/build.properties7
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/plugin.properties2
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/pom.xml227
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/resources/META-INF/services/org.eclipse.jgit.transport.sshd.agent.ConnectorFactory1
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/resources/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.properties17
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Factory.java68
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/LibraryHolder.java72
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantConnector.java73
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantLibrary.java240
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Sockets.java78
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.java48
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixDomainSocketConnector.java235
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java122
-rw-r--r--org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF21
-rw-r--r--org.eclipse.jgit.ssh.apache.test/pom.xml2
-rw-r--r--org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshProtocol2Test.java15
-rw-r--r--org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java30
-rw-r--r--org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java4
-rw-r--r--org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java7
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF31
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ssh.apache/README.md61
-rw-r--r--org.eclipse.jgit.ssh.apache/pom.xml20
-rw-r--r--org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties5
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java6
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java49
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java22
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java7
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java14
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/ConnectorFactoryProvider.java61
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/JGitSshAgentFactory.java72
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java246
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java4
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java4
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpClientConnector.java7
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java19
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/Socks5ClientConnector.java2
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java6
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java89
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java40
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java55
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/AbstractConnector.java116
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java62
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/ConnectorFactory.java173
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/package-info.java6
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/package-info.java6
-rw-r--r--org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF16
-rw-r--r--org.eclipse.jgit.ssh.jsch.test/pom.xml2
-rw-r--r--org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfigTest.java4
-rw-r--r--org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/ServiceLoaderTest.java24
-rw-r--r--org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ssh.jsch/README.md59
-rw-r--r--org.eclipse.jgit.ssh.jsch/pom.xml20
-rw-r--r--org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory (renamed from org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.ssh.jsch.SshSessionFactory)0
-rw-r--r--org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java17
-rw-r--r--org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/package-info.java14
-rw-r--r--org.eclipse.jgit.test/META-INF/MANIFEST.MF110
-rw-r--r--org.eclipse.jgit.test/pom.xml2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/EolStreamTypeUtilTest.java90
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java16
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalDiffToolTest.java114
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalToolTest.java74
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java188
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFileTest.java636
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java51
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java28
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java8
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java1
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java5
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java83
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFInputStreamTest.java8
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFOutputStreamTest.java8
-rw-r--r--org.eclipse.jgit.ui/META-INF/MANIFEST.MF18
-rw-r--r--org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ui/pom.xml2
-rw-r--r--org.eclipse.jgit/META-INF/MANIFEST.MF108
-rw-r--r--org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit/pom.xml2
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java173
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java44
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java121
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java33
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java19
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java165
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java60
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java93
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLockImpl.java (renamed from org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLock.java)12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java230
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java27
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BooleanTriState.java28
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PackLock.java31
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java44
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java22
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java27
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java80
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java31
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java139
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java34
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFInputStream.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java29
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java22
-rw-r--r--pom.xml29
-rw-r--r--tools/BUILD21
260 files changed, 7779 insertions, 1623 deletions
diff --git a/BUILD b/BUILD
index 184ab272d8..b8d8b9f0b7 100644
--- a/BUILD
+++ b/BUILD
@@ -14,6 +14,7 @@ genrule(
"//org.eclipse.jgit.lfs.server:jgit-lfs-server",
"//org.eclipse.jgit.junit:junit",
"//org.eclipse.jgit.ssh.apache:ssh-apache",
+ "//org.eclipse.jgit.ssh.apache.agent:ssh-apache-agent",
"//org.eclipse.jgit.ssh.jsch:ssh-jsch",
],
outs = ["all.zip"],
diff --git a/README.md b/README.md
index 091accd7f3..f1f485adca 100644
--- a/README.md
+++ b/README.md
@@ -56,9 +56,13 @@ The CI builds use Maven and run on [Jenkins](https://ci.eclipse.org/jgit/).
- __org.eclipse.jgit.ssh.apache__
- Client support for the ssh protocol based on
+ Client support for the SSH protocol based on
[Apache Mina sshd](https://mina.apache.org/sshd-project/).
+- __org.eclipse.jgit.ssh.apache.agent__
+
+ Optional support for SSH agents for org.eclipse.jgit.ssh.apache.
+
- __org.eclipse.jgit.ui__
Simple UI for displaying git log.
@@ -83,7 +87,7 @@ __org.eclipse.jgit.junit.ssh__: Helpers for unit testing
- Only the timestamp of the index is used by JGit if the index is
dirty.
-- JGit requires at least a Java 8 JDK.
+- JGit 6.0 and newer requires at least Java 11. Older versions require at least Java 1.8.
- CRLF conversion is performed depending on the `core.autocrlf` setting,
however Git for Windows by default stores that setting during
@@ -123,7 +127,7 @@ __org.eclipse.jgit.junit.ssh__: Helpers for unit testing
- Object transport
Fetch via ssh, git, http, Amazon S3 and bundles.
- Push via ssh, git and Amazon S3. JGit does not yet deltify
+ Push via ssh, git, http, and Amazon S3. JGit does not yet deltify
the pushed packs so they may be a lot larger than C Git packs.
- Garbage collection
@@ -145,9 +149,17 @@ __org.eclipse.jgit.junit.ssh__: Helpers for unit testing
There are some missing features:
-- verifying signed commits
-- signing tags
- signing push
+- shallow and partial cloning
+- support for remote helpers
+- support for credential helpers
+- support for multiple working trees (git-worktree)
+- using external diff tools
+- support for HTTPS client certificates
+- SHA-256 object IDs
+- git protocol V2 (client side): packfile-uris
+- multi-pack index
+- split index
## Support
diff --git a/WORKSPACE b/WORKSPACE
index 1324ce46af..f78a159fb2 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -105,8 +105,8 @@ maven_jar(
maven_jar(
name = "javaewah",
- artifact = "com.googlecode.javaewah:JavaEWAH:1.1.12",
- sha1 = "9feecc2b24d6bc9ff865af8d082f192238a293eb",
+ artifact = "com.googlecode.javaewah:JavaEWAH:1.1.13",
+ sha1 = "32cd724a42dc73f99ca08453d11a4bb83e0034c7",
)
maven_jar(
@@ -134,6 +134,18 @@ maven_jar(
)
maven_jar(
+ name = "jna",
+ artifact = "net.java.dev.jna:jna:5.8.0",
+ sha1 = "3551d8d827e54858214107541d3aff9c615cb615",
+)
+
+maven_jar(
+ name = "jna-platform",
+ artifact = "net.java.dev.jna:jna-platform:5.8.0",
+ sha1 = "2f12f6d7f7652270d13624cef1b82d8cd9a5398e",
+)
+
+maven_jar(
name = "commons-codec",
artifact = "commons-codec:commons-codec:1.14",
sha1 = "3cb1181b2141a7e752f5bdc998b7ef1849f726cf",
@@ -165,8 +177,8 @@ maven_jar(
maven_jar(
name = "commons-compress",
- artifact = "org.apache.commons:commons-compress:1.20",
- sha1 = "b8df472b31e1f17c232d2ad78ceb1c84e00c641b",
+ artifact = "org.apache.commons:commons-compress:1.21",
+ sha1 = "4ec95b60d4e86b5c95a0e919cb172a0af98011ef",
)
maven_jar(
@@ -183,8 +195,8 @@ maven_jar(
maven_jar(
name = "junit",
- artifact = "junit:junit:4.13",
- sha1 = "e49ccba652b735c93bd6e6f59760d8254cf597dd",
+ artifact = "junit:junit:4.13.2",
+ sha1 = "8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12",
)
maven_jar(
@@ -227,59 +239,59 @@ maven_jar(
maven_jar(
name = "gson",
- artifact = "com.google.code.gson:gson:2.8.7",
- sha1 = "69d9503ea0a40ee16f0bcdac7e3eaf83d0fa914a",
+ artifact = "com.google.code.gson:gson:2.8.8",
+ sha1 = "431fc3cbc0ff81abdbfde070062741089c3ba874",
)
-JETTY_VER = "9.4.43.v20210629"
+JETTY_VER = "10.0.6"
maven_jar(
name = "jetty-servlet",
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
- sha1 = "ee000c7dcdbe7b4ef94e3fa67be8f56a46915944",
- src_sha1 = "50236764fe1d3619ca07f346e148189c4f5b801a",
+ sha1 = "482165726bf54dd10ee7e2aeb4ae9481eee0c878",
+ src_sha1 = "8a8173a0bc6c0d215fc9fb9ba5fd50bae1690f9c",
)
maven_jar(
name = "jetty-security",
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
- sha1 = "ae1958da077c46bac61be9b8de2b45a3aa112353",
- src_sha1 = "6e5271e91da37e381f566e0db07ab4d936d86104",
+ sha1 = "513f44ed9636ca5e0adefa0c0b81511065dfddd2",
+ src_sha1 = "2e7eb2edbf1592e15b338096651e379fea860859",
)
maven_jar(
name = "jetty-server",
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
- sha1 = "8ba04f6b5d00223983684a563a3edaa12282bcf0",
- src_sha1 = "51600567dbd082fb03feeb9c786f5e7cc9e0a17d",
+ sha1 = "125ee07e4d8182a6afca00d543f6a4dcc84f2678",
+ src_sha1 = "5c0789872ec6743ae893131ae81262aaefc87fe6",
)
maven_jar(
name = "jetty-http",
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
- sha1 = "5171466337a6da7efbf317490b9c4574c0b4b640",
- src_sha1 = "52f477161fd0fc90869f48a145aa2c86624c496e",
+ sha1 = "4c8eed25d577002a6c0f9f3ef340eb581390f696",
+ src_sha1 = "ac7214d6202ee0cbc4bdbcf90c7906ca716e84e5",
)
maven_jar(
name = "jetty-io",
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
- sha1 = "acf672c64ac21851069c5b5b789e5c185a25933f",
- src_sha1 = "824d5cffce7a72af7c11d9cd87f86184e2a05c17",
+ sha1 = "1ab82ae5dfdbb07f0ffa07f28274fdf30e3e96ee",
+ src_sha1 = "c59082f3a09c024fafc281f432b67432d398b8c0",
)
maven_jar(
name = "jetty-util",
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
- sha1 = "97306fd3c76171602caad2acc54ca779c9240d5f",
- src_sha1 = "dffff7271c248d4e21e2b1629c57896b8e631051",
+ sha1 = "4e2935749ea1c9fcabba61a857f8283c7f5f9885",
+ src_sha1 = "6baba651899c044e14ba37d43934950670d2aa4e",
)
maven_jar(
name = "jetty-util-ajax",
artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER,
- sha1 = "2500d180c6e8e28eb3b75372b6ea9d457cf37658",
- src_sha1 = "682470f5ad074e64fc0e9c93bdc2784482f79362",
+ sha1 = "a801d4b5f5e906f134713ae82fd1ea10a15902c6",
+ src_sha1 = "f35f5525a5d30dc1237b85457d758d578e3ce8d0",
)
BOUNCYCASTLE_VER = "1.69"
diff --git a/lib/BUILD b/lib/BUILD
index 1901be8ec8..00c91e3bae 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -76,6 +76,7 @@ java_library(
visibility = [
"//org.eclipse.jgit.junit.ssh:__pkg__",
"//org.eclipse.jgit.ssh.apache:__pkg__",
+ "//org.eclipse.jgit.ssh.apache.agent:__pkg__",
"//org.eclipse.jgit.ssh.apache.test:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
@@ -94,6 +95,22 @@ java_library(
)
java_library(
+ name = "jna",
+ visibility = [
+ "//org.eclipse.jgit.ssh.apache.agent:__pkg__",
+ ],
+ exports = ["@jna//jar"],
+)
+
+java_library(
+ name = "jna-platform",
+ visibility = [
+ "//org.eclipse.jgit.ssh.apache.agent:__pkg__",
+ ],
+ exports = ["@jna-platform//jar"],
+)
+
+java_library(
name = "javaewah",
visibility = ["//visibility:public"],
exports = ["@javaewah//jar"],
diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
index 36f91c0c80..85f665bc03 100644
--- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
@@ -5,13 +5,13 @@ Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ant.test
Bundle-SymbolicName: org.eclipse.jgit.ant.test
Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.ant.tasks;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.ant.tasks;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.hamcrest.core;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)"
diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml
index effb8d4945..aca85bb54f 100644
--- a/org.eclipse.jgit.ant.test/pom.xml
+++ b/org.eclipse.jgit.ant.test/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ant.test</artifactId>
@@ -27,6 +27,10 @@
JUnit tests for the various ant tasks.
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
index 5b85dc4b4c..4110ab3950 100644
--- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
@@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ant
Bundle-SymbolicName: org.eclipse.jgit.ant
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)"
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)"
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.ant;version="6.0.0",
- org.eclipse.jgit.ant.tasks;version="6.0.0";
+Export-Package: org.eclipse.jgit.ant;version="6.1.0",
+ org.eclipse.jgit.ant.tasks;version="6.1.0";
uses:="org.apache.tools.ant,
org.apache.tools.ant.types"
diff --git a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
index 7ab4b3e0a8..19cf64ccd2 100644
--- a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.ant - Sources
Bundle-SymbolicName: org.eclipse.jgit.ant.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ant;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ant;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml
index ae4b52d733..24f3de309d 100644
--- a/org.eclipse.jgit.ant/pom.xml
+++ b/org.eclipse.jgit.ant/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ant</artifactId>
@@ -38,7 +38,6 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
- <version>1.10.11</version>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
index 6c747e7d91..160b425249 100644
--- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.archive
Bundle-SymbolicName: org.eclipse.jgit.archive
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -13,17 +13,17 @@ Import-Package: org.apache.commons.compress.archivers;version="[1.4,2.0)",
org.apache.commons.compress.compressors.bzip2;version="[1.4,2.0)",
org.apache.commons.compress.compressors.gzip;version="[1.4,2.0)",
org.apache.commons.compress.compressors.xz;version="[1.4,2.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.osgi.framework;version="[1.3.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.jgit.archive.FormatActivator
-Export-Package: org.eclipse.jgit.archive;version="6.0.0";
+Export-Package: org.eclipse.jgit.archive;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.api,
org.apache.commons.compress.archivers,
org.osgi.framework",
- org.eclipse.jgit.archive.internal;version="6.0.0";x-internal:=true
+ org.eclipse.jgit.archive.internal;version="6.1.0";x-internal:=true
diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
index 7322fd0827..9b0038f77a 100644
--- a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.archive - Sources
Bundle-SymbolicName: org.eclipse.jgit.archive.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.archive;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.archive;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml
index 7dbd8c7275..97bbf64147 100644
--- a/org.eclipse.jgit.archive/pom.xml
+++ b/org.eclipse.jgit.archive/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.archive</artifactId>
diff --git a/org.eclipse.jgit.benchmarks/.factorypath b/org.eclipse.jgit.benchmarks/.factorypath
index a6ef65becc..c631d4ac84 100644
--- a/org.eclipse.jgit.benchmarks/.factorypath
+++ b/org.eclipse.jgit.benchmarks/.factorypath
@@ -1,38 +1,29 @@
<factorypath>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/plexus/plexus-compiler-javac/2.8.5/plexus-compiler-javac-2.8.5.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/plexus/plexus-compiler-api/2.8.5/plexus-compiler-api-2.8.5.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/plexus/plexus-compiler-javac-errorprone/2.8.5/plexus-compiler-javac-errorprone-2.8.5.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_core/2.3.4/error_prone_core-2.3.4.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotation/2.3.4/error_prone_annotation-2.3.4.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_type_annotations/2.3.4/error_prone_type_annotations-2.3.4.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_check_api/2.3.4/error_prone_check_api-2.3.4.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/org/openjdk/jmh/jmh-generator-annprocess/1.32/jmh-generator-annprocess-1.32.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/org/openjdk/jmh/jmh-core/1.32/jmh-core-1.32.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_core/2.9.0/error_prone_core-2.9.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotation/2.9.0/error_prone_annotation-2.9.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_type_annotations/2.9.0/error_prone_type_annotations-2.9.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_check_api/2.9.0/error_prone_check_api-2.9.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/io/github/java-diff-utils/java-diff-utils/4.0/java-diff-utils-4.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/jgit/org.eclipse.jgit/4.4.1.201607150455-r/org.eclipse.jgit-4.4.1.201607150455-r.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/kevinstern/software-and-algorithms/1.0/software-and-algorithms-1.0.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/caffeine/2.7.0/caffeine-2.7.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/caffeine/2.8.8/caffeine-2.8.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/pcollections/pcollections/2.1.2/pcollections-2.1.2.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/27.0.1-jre/guava-27.0.1-jre.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/30.1-jre/guava-30.1-jre.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/auto/auto-common/0.10/auto-common-0.10.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/auto/auto-common/1.1.2/auto-common-1.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/dataflow/3.0.0/dataflow-3.0.0.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/javacutil/3.0.0/javacutil-3.0.0.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/plumelib/plume-util/1.0.6/plume-util-1.0.6.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/plumelib/reflection-util/0.0.2/reflection-util-0.0.2.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/plumelib/require-javadoc/0.1.0/require-javadoc-0.1.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/dataflow-errorprone/3.15.0/dataflow-errorprone-3.15.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/auto/value/auto-value-annotations/1.7/auto-value-annotations-1.7.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/jgit/org.eclipse.jgit/5.9.1-SNAPSHOT/org.eclipse.jgit-5.9.1-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/javaewah/JavaEWAH/1.1.7/JavaEWAH-1.1.7.jar" enabled="true" runInBatchMode="false"/>
- <factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="VARJAR" id="M2_REPO/com/google/auto/service/auto-service-annotations/1.0-rc6/auto-service-annotations-1.0-rc6.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
diff --git a/org.eclipse.jgit.benchmarks/pom.xml b/org.eclipse.jgit.benchmarks/pom.xml
index cd911ca6fa..0f2260db26 100644
--- a/org.eclipse.jgit.benchmarks/pom.xml
+++ b/org.eclipse.jgit.benchmarks/pom.xml
@@ -14,7 +14,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jgit</groupId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
<artifactId>org.eclipse.jgit.benchmarks</artifactId>
<packaging>jar</packaging>
@@ -22,8 +22,6 @@
<properties>
<java.version>11</java.version>
- <maven.compiler.source>${java.version}</maven.compiler.source>
- <maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jmh.version>1.32</jmh.version>
<uberjar.name>benchmarks</uberjar.name>
@@ -77,8 +75,7 @@
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
- <source>${java.version}</source>
- <target>${java.version}</target>
+ <release>${java.version}</release>
<fork>true</fork>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
diff --git a/org.eclipse.jgit.coverage/pom.xml b/org.eclipse.jgit.coverage/pom.xml
index 056648aca7..6e476b3f9d 100644
--- a/org.eclipse.jgit.coverage/pom.xml
+++ b/org.eclipse.jgit.coverage/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -27,88 +27,88 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ant</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.archive</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.apache</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.server</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.server</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.pgm</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ui</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.test</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ant.test</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.test</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.pgm.test</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.test</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
index 9a20b46100..23a0360047 100644
--- a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ 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: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -12,9 +12,9 @@ Import-Package: org.bouncycastle.jce.provider;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.gpg.bc.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.gpg.bc.internal.keys;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.sha1;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.gpg.bc.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.gpg.bc.internal.keys;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.sha1;version="[6.1.0,6.2.0)",
org.hamcrest;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.runner;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.gpg.bc.test/pom.xml b/org.eclipse.jgit.gpg.bc.test/pom.xml
index aa09d3f003..5bb9ebcf06 100644
--- a/org.eclipse.jgit.gpg.bc.test/pom.xml
+++ b/org.eclipse.jgit.gpg.bc.test/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.gpg.bc.test</artifactId>
diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
index 3c106e7a55..8f60326a94 100644
--- a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
@@ -3,10 +3,10 @@ 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="[6.0.0,6.1.0)"
+Fragment-Host: org.eclipse.jgit;bundle-version="[6.1.0,6.2.0)"
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: org.bouncycastle.asn1;version="[1.69.0,2.0.0)",
org.bouncycastle.asn1.cryptlib;version="[1.69.0,2.0.0)",
@@ -29,9 +29,9 @@ Import-Package: org.bouncycastle.asn1;version="[1.69.0,2.0.0)",
org.bouncycastle.util;version="[1.69.0,2.0.0)",
org.bouncycastle.util.encoders;version="[1.69.0,2.0.0)",
org.bouncycastle.util.io;version="[1.69.0,2.0.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.gpg.bc;version="6.0.0",
- org.eclipse.jgit.gpg.bc.internal;version="6.0.0";x-friends:="org.eclipse.jgit.gpg.bc.test",
- org.eclipse.jgit.gpg.bc.internal.keys;version="6.0.0";x-friends:="org.eclipse.jgit.gpg.bc.test"
+Export-Package: org.eclipse.jgit.gpg.bc;version="6.1.0",
+ org.eclipse.jgit.gpg.bc.internal;version="6.1.0";x-friends:="org.eclipse.jgit.gpg.bc.test",
+ org.eclipse.jgit.gpg.bc.internal.keys;version="6.1.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
index 9e0d921ea2..f99ec41ea9 100644
--- a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ 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: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml
index 47d3e9b635..1a6a991f43 100644
--- a/org.eclipse.jgit.gpg.bc/pom.xml
+++ b/org.eclipse.jgit.gpg.bc/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.gpg.bc</artifactId>
diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
index 4eedc8b232..1a466db641 100644
--- a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.http.apache
Bundle-SymbolicName: org.eclipse.jgit.http.apache
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
@@ -25,11 +25,11 @@ Import-Package: org.apache.http;version="[4.3.0,5.0.0)",
org.apache.http.impl.conn;version="[4.4.0,5.0.0)",
org.apache.http.params;version="[4.3.0,5.0.0)",
org.apache.http.ssl;version="[4.3.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)"
-Export-Package: org.eclipse.jgit.transport.http.apache;version="6.0.0";
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)"
+Export-Package: org.eclipse.jgit.transport.http.apache;version="6.1.0";
uses:="org.apache.http.client,
org.eclipse.jgit.transport.http,
org.apache.http.entity,
diff --git a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
index 1b04dca5e0..f4f763de0e 100644
--- a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.http.apache - Sources
Bundle-SymbolicName: org.eclipse.jgit.http.apache.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml
index 9b5e626e84..d3075efe45 100644
--- a/org.eclipse.jgit.http.apache/pom.xml
+++ b/org.eclipse.jgit.http.apache/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.apache</artifactId>
diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
index c7812e4fe8..356b363b32 100644
--- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
@@ -3,29 +3,29 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.http.server
Bundle-SymbolicName: org.eclipse.jgit.http.server
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.http.server;version="6.0.0",
- org.eclipse.jgit.http.server.glue;version="6.0.0";
+Export-Package: org.eclipse.jgit.http.server;version="6.1.0",
+ org.eclipse.jgit.http.server.glue;version="6.1.0";
uses:="javax.servlet,javax.servlet.http",
- org.eclipse.jgit.http.server.resolver;version="6.0.0";
+ org.eclipse.jgit.http.server.resolver;version="6.1.0";
uses:="org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.lib,
org.eclipse.jgit.transport,
javax.servlet.http"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
- javax.servlet.http;version="[2.5.0,3.2.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.transport.parser;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.resolver;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)"
+Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
+ javax.servlet.http;version="[2.5.0,5.0.0)",
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)"
diff --git a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
index 70181b6bc6..b23f4e2797 100644
--- a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.http.server - Sources
Bundle-SymbolicName: org.eclipse.jgit.http.server.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml
index f0935c32df..5eb4bad15a 100644
--- a/org.eclipse.jgit.http.server/pom.xml
+++ b/org.eclipse.jgit.http.server/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.server</artifactId>
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
index 70a846de20..03d7a08940 100644
--- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
@@ -3,51 +3,49 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.http.test
Bundle-SymbolicName: org.eclipse.jgit.http.test
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
- javax.servlet.http;version="[2.5.0,3.2.0)",
+Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
+ javax.servlet.http;version="[2.5.0,5.0.0)",
org.apache.commons.codec;version="[1.6.0,2.0.0)",
org.apache.commons.codec.binary;version="[1.6.0,2.0.0)",
org.apache.http;version="[4.3.0,5.0.0)",
org.apache.http.client;version="[4.4.0,5.0.0)",
org.apache.http.message;version="[4.3.0,5.0.0)",
- org.eclipse.jetty.continuation;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.io;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.http.server.glue;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.http.server.resolver;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http.apache;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.resolver;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.io;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.http.server;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.http.server.glue;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.http.server.resolver;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http.apache;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.hamcrest;version="[1.1.0,3.0.0)",
org.hamcrest.core;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml
index 210a496955..60c67047b9 100644
--- a/org.eclipse.jgit.http.test/pom.xml
+++ b/org.eclipse.jgit.http.test/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.test</artifactId>
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java
index 006a01e748..d38f7f3dda 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java
@@ -9,6 +9,13 @@
*/
package org.eclipse.jgit.transport.http.apache;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.net.MalformedURLException;
+import java.util.List;
+import java.util.Locale;
+
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolVersion;
@@ -16,13 +23,6 @@ import org.apache.http.StatusLine;
import org.apache.http.message.AbstractHttpMessage;
import org.junit.Test;
-import java.net.MalformedURLException;
-import java.util.List;
-import java.util.Locale;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
public class HttpClientConnectionTest {
@Test
public void testGetHeaderFieldsAllowMultipleValues()
diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
index e3e3222620..fdb37de0a5 100644
--- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
@@ -3,35 +3,35 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.junit.http
Bundle-SymbolicName: org.eclipse.jgit.junit.http
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
- javax.servlet.http;version="[2.5.0,3.2.0)",
+Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
+ javax.servlet.http;version="[2.5.0,5.0.0)",
org.apache.commons.logging;version="[1.1.1,2.0.0)",
- org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.ssl;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.resolver;version="[6.0.0,6.1.0)",
- org.junit;version="[4.13,5.0.0)"
-Export-Package: org.eclipse.jgit.junit.http;version="6.0.0";
+ org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.ssl;version="[10.0.0,11.0.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.http.server;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.1.0,6.2.0)",
+ org.junit;version="[4.13,5.0.0)",
+ org.slf4j.helpers;version="[1.7.0,2.0.0)"
+Export-Package: org.eclipse.jgit.junit.http;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.junit,
javax.servlet.http,
diff --git a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
index e24f9e44a2..c8eaa8f6a4 100644
--- a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.junit.http - Sources
Bundle-SymbolicName: org.eclipse.jgit.junit.http.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml
index 6d4038e299..4ab0a7e4f1 100644
--- a/org.eclipse.jgit.junit.http/pom.xml
+++ b/org.eclipse.jgit.junit.http/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.http</artifactId>
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
index 0f052987e3..36f2f2bc7f 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
@@ -21,20 +21,23 @@ import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.security.AbstractLoginService;
import org.eclipse.jetty.security.Authenticator;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
+import org.eclipse.jetty.security.RolePrincipal;
+import org.eclipse.jetty.security.UserPrincipal;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
@@ -143,13 +146,15 @@ public class AppServer {
}
if (sslPort >= 0) {
- SslContextFactory sslContextFactory = createTestSslContextFactory(
- hostName);
+ SslContextFactory.Server sslContextFactory = createTestSslContextFactory(
+ hostName, ip);
secureConfig = new HttpConfiguration(config);
- secureConnector = new ServerConnector(server,
- new SslConnectionFactory(sslContextFactory,
- HttpVersion.HTTP_1_1.asString()),
- new HttpConnectionFactory(secureConfig));
+ secureConfig.addCustomizer(new SecureRequestCustomizer());
+ HttpConnectionFactory http11 = new HttpConnectionFactory(
+ secureConfig);
+ SslConnectionFactory tls = new SslConnectionFactory(
+ sslContextFactory, http11.getProtocol());
+ secureConnector = new ServerConnector(server, tls, http11);
secureConnector.setPort(sslPort);
secureConnector.setHost(ip);
} else {
@@ -171,10 +176,11 @@ public class AppServer {
server.setHandler(log);
}
- private SslContextFactory createTestSslContextFactory(String hostName) {
- SslContextFactory.Client factory = new SslContextFactory.Client(true);
+ private SslContextFactory.Server createTestSslContextFactory(
+ String hostName, String ip) {
+ SslContextFactory.Server factory = new SslContextFactory.Server();
- String dName = "CN=,OU=,O=,ST=,L=,C=";
+ String dName = "CN=localhost,OU=JGit,O=Eclipse,ST=Ontario,L=Toronto,C=CA";
try {
File tmpDir = Files.createTempDirectory("jks").toFile();
@@ -190,6 +196,11 @@ public class AppServer {
"-keystore", keyStore.getAbsolutePath(), //
"-storepass", keyPassword,
"-alias", hostName, //
+ "-ext", "bc=ca:true", //
+ "-ext",
+ String.format(
+ "san=ip:%s,ip:127.0.0.1,ip:[::1],DNS:%s",
+ ip, hostName), //
"-genkeypair", //
"-keyalg", "RSA", //
"-keypass", keyPassword, //
@@ -260,12 +271,12 @@ public class AppServer {
}
static class TestMappedLoginService extends AbstractLoginService {
- private String role;
+ private RolePrincipal role;
protected final Map<String, UserPrincipal> users = new ConcurrentHashMap<>();
TestMappedLoginService(String role) {
- this.role = role;
+ this.role = new RolePrincipal(role);
}
@Override
@@ -277,16 +288,16 @@ public class AppServer {
}
@Override
- protected String[] loadRoleInfo(UserPrincipal user) {
- if (users.get(user.getName()) == null) {
- return null;
- }
- return new String[] { role };
+ protected UserPrincipal loadUserInfo(String user) {
+ return users.get(user);
}
@Override
- protected UserPrincipal loadUserInfo(String user) {
- return users.get(user);
+ protected List<RolePrincipal> loadRoleInfo(UserPrincipal user) {
+ if (users.get(user.getName()) == null) {
+ return null;
+ }
+ return Collections.singletonList(role);
}
}
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
index d2ef733d74..9c3c980ad8 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, Google Inc. and others
+ * Copyright (C) 2010, 2021 Google Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -7,7 +7,6 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-
package org.eclipse.jgit.junit.http;
import java.text.MessageFormat;
@@ -15,12 +14,12 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.eclipse.jetty.util.log.Logger;
+import org.slf4j.helpers.MarkerIgnoringBase;
+
+public class RecordingLogger extends MarkerIgnoringBase {
+
+ private static final long serialVersionUID = 1L;
-/**
- * Log warnings into an array for later inspection.
- */
-public class RecordingLogger implements Logger {
private static List<Warning> warnings = new ArrayList<>();
/**
@@ -60,8 +59,6 @@ public class RecordingLogger implements Logger {
}
}
- private final String name;
-
/**
* Constructor for <code>RecordingLogger</code>.
*/
@@ -78,171 +75,166 @@ public class RecordingLogger implements Logger {
this.name = name;
}
- /** {@inheritDoc} */
@Override
- public Logger getLogger(@SuppressWarnings("hiding") String name) {
- return new RecordingLogger(name);
+ public boolean isTraceEnabled() {
+ // Ignore (not relevant to test failures)
+ return false;
}
- /** {@inheritDoc} */
@Override
- public String getName() {
- return name;
+ public void trace(String msg) {
+ // Ignore (not relevant to test failures)
}
- /**
- * Warning
- *
- * @param msg
- * @param arg0
- * @param arg1
- */
- public void warn(String msg, Object arg0, Object arg1) {
- synchronized (warnings) {
- warnings.add(new Warning(MessageFormat.format(msg, arg0, arg1)));
- }
+ @Override
+ public void trace(String format, Object arg) {
+ // Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void warn(String msg, Throwable th) {
- synchronized (warnings) {
- warnings.add(new Warning(msg, th));
- }
+ public void trace(String format, Object arg1, Object arg2) {
+ // Ignore (not relevant to test failures)
}
- /**
- * Warning
- *
- * @param msg
- * warning message
- */
- public void warn(String msg) {
- synchronized (warnings) {
- warnings.add(new Warning(msg));
- }
+ @Override
+ public void trace(String format, Object... arguments) {
+ // Ignore (not relevant to test failures)
}
- /**
- * Debug log
- *
- * @param msg
- * @param arg0
- * @param arg1
- */
- public void debug(String msg, Object arg0, Object arg1) {
+ @Override
+ public void trace(String msg, Throwable t) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void debug(String msg, Throwable th) {
- // Ignore (not relevant to test failures)
+ public boolean isDebugEnabled() {
+ return false;
}
- /**
- * Debug log
- *
- * @param msg
- * debug message
- */
+ @Override
public void debug(String msg) {
// Ignore (not relevant to test failures)
}
- /**
- * Info
- *
- * @param msg
- * @param arg0
- * @param arg1
- */
- public void info(String msg, Object arg0, Object arg1) {
+ @Override
+ public void debug(String format, Object arg) {
// Ignore (not relevant to test failures)
}
- /**
- * Info
- *
- * @param msg
- */
- public void info(String msg) {
+ @Override
+ public void debug(String format, Object arg1, Object arg2) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public boolean isDebugEnabled() {
+ public void debug(String format, Object... arguments) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void debug(String msg, Throwable t) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public boolean isInfoEnabled() {
return false;
}
- /** {@inheritDoc} */
@Override
- public void setDebugEnabled(boolean enabled) {
+ public void info(String msg) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String format, Object arg) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String format, Object arg1, Object arg2) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String format, Object... arguments) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String msg, Throwable t) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void warn(String msg, Object... args) {
+ public boolean isWarnEnabled() {
+ return true;
+ }
+
+ @Override
+ public void warn(String msg) {
+ synchronized (warnings) {
+ warnings.add(new Warning(msg));
+ }
+ }
+
+ @Override
+ public void warn(String format, Object arg) {
+ warn(format, Collections.singleton(arg));
+ }
+
+ @Override
+ public void warn(String format, Object... arguments) {
synchronized (warnings) {
int i = 0;
- int index = msg.indexOf("{}");
+ int index = format.indexOf("{}");
while (index >= 0) {
- msg = msg.replaceFirst("\\{\\}", "{" + i++ + "}");
- index = msg.indexOf("{}");
+ format = format.replaceFirst("\\{\\}", "{" + i++ + "}");
+ index = format.indexOf("{}");
}
- warnings.add(new Warning(MessageFormat.format(msg, args)));
+ warnings.add(new Warning(MessageFormat.format(format, arguments)));
}
}
- /** {@inheritDoc} */
@Override
- public void warn(Throwable thrown) {
- synchronized (warnings) {
- warnings.add(new Warning(thrown));
- }
+ public void warn(String format, Object arg1, Object arg2) {
+ warn(format, new Object[] { arg1, arg2 });
}
- /** {@inheritDoc} */
@Override
- public void info(String msg, Object... args) {
- // Ignore (not relevant to test failures)
+ public void warn(String msg, Throwable t) {
+ synchronized (warnings) {
+ warnings.add(new Warning(msg, t));
+ }
}
- /** {@inheritDoc} */
@Override
- public void info(Throwable thrown) {
- // Ignore (not relevant to test failures)
+ public boolean isErrorEnabled() {
+ return false;
}
- /** {@inheritDoc} */
@Override
- public void info(String msg, Throwable thrown) {
+ public void error(String msg) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void debug(String msg, Object... args) {
+ public void error(String format, Object arg) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void debug(Throwable thrown) {
+ public void error(String format, Object arg1, Object arg2) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void ignore(Throwable arg0) {
+ public void error(String format, Object... arguments) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void debug(String msg, long value) {
+ public void error(String msg, Throwable t) {
// Ignore (not relevant to test failures)
}
}
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
index abc830dcd4..0404d71b59 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.junit.ssh
Bundle-SymbolicName: org.eclipse.jgit.junit.ssh
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
@@ -33,16 +33,16 @@ Import-Package: org.apache.sshd.common;version="[2.7.0,2.8.0)",
org.apache.sshd.server.subsystem;version="[2.7.0,2.8.0)",
org.apache.sshd.sftp;version="[2.7.0,2.8.0)",
org.apache.sshd.sftp.server;version="[2.7.0,2.8.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.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="6.0.0"
+Export-Package: org.eclipse.jgit.junit.ssh;version="6.1.0"
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
index e0c30ff482..791df8ace9 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.junit.ssh - Sources
Bundle-SymbolicName: org.eclipse.jgit.junit.ssh.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml
index a6f466016a..f6fb01751e 100644
--- a/org.eclipse.jgit.junit.ssh/pom.xml
+++ b/org.eclipse.jgit.junit.ssh/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.ssh</artifactId>
diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
index aea1aca5a1..88da600e59 100644
--- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
@@ -3,35 +3,35 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.junit
Bundle-SymbolicName: org.eclipse.jgit.junit
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.dircache;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.pack;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.merge;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="6.0.0",
- org.eclipse.jgit.treewalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.io;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.time;version="[6.0.0,6.1.0)",
+Import-Package: org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.dircache;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.merge;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="6.1.0",
+ org.eclipse.jgit.treewalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.io;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.time;version="[6.1.0,6.2.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.rules;version="[4.13,5.0.0)",
org.junit.runner;version="[4.13,5.0.0)",
org.junit.runners;version="[4.13,5.0.0)",
org.junit.runners.model;version="[4.13,5.0.0)",
org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.junit;version="6.0.0";
+Export-Package: org.eclipse.jgit.junit;version="6.1.0";
uses:="org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
@@ -44,4 +44,4 @@ Export-Package: org.eclipse.jgit.junit;version="6.0.0";
org.junit.runners.model,
org.junit.runner,
org.eclipse.jgit.util.time",
- org.eclipse.jgit.junit.time;version="6.0.0";uses:="org.eclipse.jgit.util.time"
+ org.eclipse.jgit.junit.time;version="6.1.0";uses:="org.eclipse.jgit.util.time"
diff --git a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
index f2b1b25bf8..5f83c4517f 100644
--- a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.junit - Sources
Bundle-SymbolicName: org.eclipse.jgit.junit.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml
index aa411bf5d0..1ca223c5d2 100644
--- a/org.eclipse.jgit.junit/pom.xml
+++ b/org.eclipse.jgit.junit/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit</artifactId>
diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
index 95ac89b0b0..7b8e3d6d26 100644
--- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
@@ -3,49 +3,47 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs.server.test
Bundle-SymbolicName: org.eclipse.jgit.lfs.server.test
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
- javax.servlet.http;version="[3.1.0,4.0.0)",
+Import-Package: javax.servlet;version="[3.1.0,5.0.0)",
+ javax.servlet.http;version="[3.1.0,5.0.0)",
org.apache.http;version="[4.4.0,5.0.0)",
org.apache.http.client;version="[4.4.0,5.0.0)",
org.apache.http.client.methods;version="[4.4.0,5.0.0)",
org.apache.http.entity;version="[4.4.0,5.0.0)",
org.apache.http.impl.client;version="[4.4.0,5.0.0)",
- org.eclipse.jetty.continuation;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.io;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.server;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.server.fs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.test;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.io;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.server;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.test;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.hamcrest.core;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.rules;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.lfs.server.test/pom.xml b/org.eclipse.jgit.lfs.server.test/pom.xml
index 2c1b13429d..79ba962baa 100644
--- a/org.eclipse.jgit.lfs.server.test/pom.xml
+++ b/org.eclipse.jgit.lfs.server.test/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
@@ -27,6 +27,10 @@
Tests for the LFS server.
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
index c5d8444260..b174e3b41e 100644
--- a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
@@ -3,36 +3,36 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs.server
Bundle-SymbolicName: org.eclipse.jgit.lfs.server
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs.server;version="6.0.0";
+Export-Package: org.eclipse.jgit.lfs.server;version="6.1.0";
uses:="javax.servlet.http,
org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.fs;version="6.0.0";
+ org.eclipse.jgit.lfs.server.fs;version="6.1.0";
uses:="javax.servlet,
javax.servlet.http,
org.eclipse.jgit.lfs.server,
org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.internal;version="6.0.0";x-internal:=true,
- org.eclipse.jgit.lfs.server.s3;version="6.0.0";
+ org.eclipse.jgit.lfs.server.internal;version="6.1.0";x-internal:=true,
+ org.eclipse.jgit.lfs.server.s3;version="6.1.0";
uses:="org.eclipse.jgit.lfs.server,
org.eclipse.jgit.lfs.lib"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: com.google.gson;version="[2.8.0,3.0.0)",
- javax.servlet;version="[3.1.0,4.0.0)",
- javax.servlet.annotation;version="[3.1.0,4.0.0)",
- javax.servlet.http;version="[3.1.0,4.0.0)",
+ javax.servlet;version="[3.1.0,5.0.0)",
+ javax.servlet.annotation;version="[3.1.0,5.0.0)",
+ javax.servlet.http;version="[3.1.0,5.0.0)",
org.apache.http;version="[4.3.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http.apache;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http.apache;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.slf4j;version="[1.7.0,2.0.0)"
diff --git a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
index c36373e29f..ea45f021dc 100644
--- a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.lfs.server - Sources
Bundle-SymbolicName: org.eclipse.jgit.lfs.server.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml
index 948c65a435..10fe0cd458 100644
--- a/org.eclipse.jgit.lfs.server/pom.xml
+++ b/org.eclipse.jgit.lfs.server/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.server</artifactId>
diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
index 10635bb2cf..b70fca6188 100644
--- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
@@ -3,24 +3,24 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs.test
Bundle-SymbolicName: org.eclipse.jgit.lfs.test
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.attributes;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+Import-Package: org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.attributes;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.hamcrest.core;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.runner;version="[4.13,5.0.0)",
org.junit.runners;version="[4.13,5.0.0)"
-Export-Package: org.eclipse.jgit.lfs.test;version="6.0.0";x-friends:="org.eclipse.jgit.lfs.server.test"
+Export-Package: org.eclipse.jgit.lfs.test;version="6.1.0";x-friends:="org.eclipse.jgit.lfs.server.test"
diff --git a/org.eclipse.jgit.lfs.test/pom.xml b/org.eclipse.jgit.lfs.test/pom.xml
index 262258c2dc..eceb0ead90 100644
--- a/org.eclipse.jgit.lfs.test/pom.xml
+++ b/org.eclipse.jgit.lfs.test/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.test</artifactId>
@@ -27,6 +27,10 @@
Tests for the Large File Extension (LFS).
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
index a7e11dd6aa..5369918960 100644
--- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
@@ -3,31 +3,31 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs
Bundle-SymbolicName: org.eclipse.jgit.lfs
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs;version="6.0.0",
- org.eclipse.jgit.lfs.errors;version="6.0.0",
- org.eclipse.jgit.lfs.internal;version="6.0.0";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
- org.eclipse.jgit.lfs.lib;version="6.0.0"
+Export-Package: org.eclipse.jgit.lfs;version="6.1.0",
+ org.eclipse.jgit.lfs.errors;version="6.1.0",
+ org.eclipse.jgit.lfs.internal;version="6.1.0";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
+ org.eclipse.jgit.lfs.lib;version="6.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: com.google.gson;version="[2.8.2,3.0.0)",
com.google.gson.stream;version="[2.8.2,3.0.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)";resolution:=optional,
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.attributes;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.diff;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.hooks;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.pack;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.io;version="[6.0.0,6.1.0)"
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)";resolution:=optional,
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.attributes;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.diff;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.hooks;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.pack;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.io;version="[6.1.0,6.2.0)"
diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
index 5d14b1cd5c..a40099fd1e 100644
--- a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.lfs - Sources
Bundle-SymbolicName: org.eclipse.jgit.lfs.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index e1063e1f49..0ab16f425f 100644
--- a/org.eclipse.jgit.lfs/pom.xml
+++ b/org.eclipse.jgit.lfs/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs</artifactId>
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 526e8b331e..da305ea614 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
index 276401cc57..223051b840 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
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 6883afc349..59fde7ed4d 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
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.gpg.bc"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import plugin="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
+ <import plugin="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
</requires>
<plugin
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
index a05abbc3d2..e3771983cf 100644
--- 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
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
index 22f995e8d8..ea90c9964d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.http.apache"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import plugin="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
+ <import plugin="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
index 85fa1e7005..48503db9b2 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
index 65b70d5d05..dde16bc0d1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.junit"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -24,7 +24,7 @@
<requires>
<import plugin="com.jcraft.jsch"/>
- <import plugin="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
+ <import plugin="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
index 666784d804..3f02bb0621 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
index 4b5032e45b..9fce6d333e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.lfs"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import feature="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml
index 86fae125db..44108e2039 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
index d97ce7552e..3e2e189d14 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.pgm"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -35,9 +35,9 @@
version="0.0.0"/>
<requires>
- <import feature="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
- <import feature="org.eclipse.jgit.lfs" version="6.0.0" match="equivalent"/>
- <import feature="org.eclipse.jgit.ssh.apache" version="6.0.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit.lfs" version="6.1.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit.ssh.apache" version="6.1.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
index 8139810390..29f40142de 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
@@ -45,6 +45,19 @@
<artifactId>org.eclipse.jgit.ui</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ssh.apache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
</dependencies>
</project>
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 ca0935a514..af9523fd4f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
@@ -57,16 +57,70 @@
<bundle id="com.jcraft.jzlib.source">
<category name="JGit-dependency-bundles"/>
</bundle>
+ <bundle id="com.sun.jna">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="com.sun.jna.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="com.sun.jna.platform">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="com.sun.jna.platform.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
<bundle id="javaewah">
<category name="JGit-dependency-bundles"/>
</bundle>
<bundle id="javaewah.source">
<category name="JGit-dependency-bundles"/>
</bundle>
- <bundle id="javax.servlet">
+ <bundle id="jakarta.servlet-api">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="jakarta.servlet-api.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.http">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.http.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.io">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.io.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.security">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.security.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.server">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.server.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.servlet">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.servlet.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.util">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.util.source">
+ <category name="JGit-dependency-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jetty.util.ajax">
<category name="JGit-dependency-bundles"/>
</bundle>
- <bundle id="javax.servlet.source">
+ <bundle id="org.eclipse.jetty.util.ajax.source">
<category name="JGit-dependency-bundles"/>
</bundle>
<bundle id="net.i2p.crypto.eddsa">
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
index f36717e950..88d34b184a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.repository</artifactId>
@@ -91,7 +91,12 @@
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
<version>${project.version}</version>
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 eb0a658e59..a70632956c 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
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.source"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import feature="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
</requires>
<plugin
@@ -111,6 +111,13 @@
unpack="false"/>
<plugin
+ id="org.eclipse.jgit.ssh.apache.agent.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.jgit.ssh.jsch.source"
download-size="0"
install-size="0"
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml
index a9e5539523..0b00e4a95e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
@@ -30,7 +30,7 @@
<dependency>
<groupId>org.eclipse.jgit.feature</groupId>
<artifactId>org.eclipse.jgit</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
index 46ea77995c..f6ad4f9b30 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.ssh.apache"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import feature="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
</requires>
<plugin
@@ -33,4 +33,12 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.jgit.ssh.apache.agent"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
</feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml
index 886b9b3ce7..28f61dd2d0 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
@@ -39,6 +39,12 @@
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
</dependencies>
</project>
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 06a6ed91ee..ea76ea17a9 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
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.ssh.jsch"
label="%featureName"
- version="6.0.0.qualifier"
+ version="6.1.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import plugin="org.eclipse.jgit" version="6.0.0" match="equivalent"/>
+ <import plugin="org.eclipse.jgit" version="6.1.0" match="equivalent"/>
</requires>
<plugin
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
index 70bb08b732..16395ccc69 100644
--- 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
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
index ccd730fa4f..d56f1d4dcd 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
@@ -2,4 +2,4 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JGit Target Platform Bundle
Bundle-SymbolicName: org.eclipse.jgit.target
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
index 1258ce715d..737cadaf90 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.17" sequenceNumber="1630003272">
+<target name="jgit-4.17" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.43.v20210629"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.43.v20210629/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.google.gson" version="2.8.7.v20210624-1215"/>
- <unit id="com.google.gson.source" version="2.8.7.v20210624-1215"/>
+ <unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
+ <unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
<unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
- <unit id="javaewah" version="1.1.12.v20210622-2206"/>
- <unit id="javaewah.source" version="1.1.12.v20210622-2206"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
+ <unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
+ <unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
+ <unit id="javaewah" version="1.1.13.v20211029-0839"/>
+ <unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
- <unit id="org.apache.ant" version="1.10.11.v20210720-1445"/>
- <unit id="org.apache.ant.source" version="1.10.11.v20210720-1445"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
<unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
<unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
- <unit id="org.apache.commons.compress" version="1.20.0.v20210713-1928"/>
- <unit id="org.apache.commons.compress.source" version="1.20.0.v20210713-1928"/>
+ <unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
@@ -65,8 +65,8 @@
<unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
<unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -75,8 +75,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
- <unit id="org.junit" version="4.13.0.v20200204-1500"/>
- <unit id="org.junit.source" version="4.13.0.v20200204-1500"/>
+ <unit id="org.junit" version="4.13.2.v20211018-1956"/>
+ <unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20200310-1642"/>
@@ -89,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210825222808/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
index bab33ba2ee..cd364d3563 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
@@ -1,7 +1,7 @@
target "jgit-4.17" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210825222808-2021-09.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/releases/2020-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
index 75dbb54b27..55cadffa88 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.18" sequenceNumber="1630003272">
+<target name="jgit-4.18" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.43.v20210629"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.43.v20210629/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.google.gson" version="2.8.7.v20210624-1215"/>
- <unit id="com.google.gson.source" version="2.8.7.v20210624-1215"/>
+ <unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
+ <unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
<unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
- <unit id="javaewah" version="1.1.12.v20210622-2206"/>
- <unit id="javaewah.source" version="1.1.12.v20210622-2206"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
+ <unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
+ <unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
+ <unit id="javaewah" version="1.1.13.v20211029-0839"/>
+ <unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
- <unit id="org.apache.ant" version="1.10.11.v20210720-1445"/>
- <unit id="org.apache.ant.source" version="1.10.11.v20210720-1445"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
<unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
<unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
- <unit id="org.apache.commons.compress" version="1.20.0.v20210713-1928"/>
- <unit id="org.apache.commons.compress.source" version="1.20.0.v20210713-1928"/>
+ <unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
@@ -65,8 +65,8 @@
<unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
<unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -75,8 +75,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
- <unit id="org.junit" version="4.13.0.v20200204-1500"/>
- <unit id="org.junit.source" version="4.13.0.v20200204-1500"/>
+ <unit id="org.junit" version="4.13.2.v20211018-1956"/>
+ <unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20200310-1642"/>
@@ -89,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210825222808/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
index 095ea81aab..27f3471c1a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
@@ -1,7 +1,7 @@
target "jgit-4.18" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210825222808-2021-09.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/releases/2020-12/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
index 93d4a3a60a..43fe4c8417 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.19-staging" sequenceNumber="1630003272">
+<target name="jgit-4.19-staging" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.43.v20210629"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.43.v20210629/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.google.gson" version="2.8.7.v20210624-1215"/>
- <unit id="com.google.gson.source" version="2.8.7.v20210624-1215"/>
+ <unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
+ <unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
<unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
- <unit id="javaewah" version="1.1.12.v20210622-2206"/>
- <unit id="javaewah.source" version="1.1.12.v20210622-2206"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
+ <unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
+ <unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
+ <unit id="javaewah" version="1.1.13.v20211029-0839"/>
+ <unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
- <unit id="org.apache.ant" version="1.10.11.v20210720-1445"/>
- <unit id="org.apache.ant.source" version="1.10.11.v20210720-1445"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
<unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
<unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
- <unit id="org.apache.commons.compress" version="1.20.0.v20210713-1928"/>
- <unit id="org.apache.commons.compress.source" version="1.20.0.v20210713-1928"/>
+ <unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
@@ -65,8 +65,8 @@
<unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
<unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -75,8 +75,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
- <unit id="org.junit" version="4.13.0.v20200204-1500"/>
- <unit id="org.junit.source" version="4.13.0.v20200204-1500"/>
+ <unit id="org.junit" version="4.13.2.v20211018-1956"/>
+ <unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20200310-1642"/>
@@ -89,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210825222808/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
index 52e4570766..419999652d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
@@ -1,7 +1,7 @@
target "jgit-4.19-staging" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210825222808-2021-09.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/staging/2021-03/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
index ee4f2a0e29..aefa34122b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.20" sequenceNumber="1630003272">
+<target name="jgit-4.20" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.43.v20210629"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.43.v20210629/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.google.gson" version="2.8.7.v20210624-1215"/>
- <unit id="com.google.gson.source" version="2.8.7.v20210624-1215"/>
+ <unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
+ <unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
<unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
- <unit id="javaewah" version="1.1.12.v20210622-2206"/>
- <unit id="javaewah.source" version="1.1.12.v20210622-2206"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
+ <unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
+ <unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
+ <unit id="javaewah" version="1.1.13.v20211029-0839"/>
+ <unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
- <unit id="org.apache.ant" version="1.10.11.v20210720-1445"/>
- <unit id="org.apache.ant.source" version="1.10.11.v20210720-1445"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
<unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
<unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
- <unit id="org.apache.commons.compress" version="1.20.0.v20210713-1928"/>
- <unit id="org.apache.commons.compress.source" version="1.20.0.v20210713-1928"/>
+ <unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
@@ -65,8 +65,8 @@
<unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
<unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -75,8 +75,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
- <unit id="org.junit" version="4.13.0.v20200204-1500"/>
- <unit id="org.junit.source" version="4.13.0.v20200204-1500"/>
+ <unit id="org.junit" version="4.13.2.v20211018-1956"/>
+ <unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20200310-1642"/>
@@ -89,7 +89,7 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210825222808/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
index d2cf94f2dc..37123e5fa5 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
@@ -1,7 +1,7 @@
target "jgit-4.20" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210825222808-2021-09.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
location "https://download.eclipse.org/releases/2021-06/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
index e27f6c7702..1b6cf26a5e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.21" sequenceNumber="1630003272">
+<target name="jgit-4.21" sequenceNumber="1637746569">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="org.eclipse.jetty.client" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.client.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.security.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.servlet.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax" version="9.4.43.v20210629"/>
- <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.43.v20210629"/>
- <repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.43.v20210629/"/>
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.google.gson" version="2.8.7.v20210624-1215"/>
- <unit id="com.google.gson.source" version="2.8.7.v20210624-1215"/>
+ <unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
+ <unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
<unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
- <unit id="javaewah" version="1.1.12.v20210622-2206"/>
- <unit id="javaewah.source" version="1.1.12.v20210622-2206"/>
- <unit id="javax.servlet" version="3.1.0.v201410161800"/>
- <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
+ <unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
+ <unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
+ <unit id="javaewah" version="1.1.13.v20211029-0839"/>
+ <unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
- <unit id="org.apache.ant" version="1.10.11.v20210720-1445"/>
- <unit id="org.apache.ant.source" version="1.10.11.v20210720-1445"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
<unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
<unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
- <unit id="org.apache.commons.compress" version="1.20.0.v20210713-1928"/>
- <unit id="org.apache.commons.compress.source" version="1.20.0.v20210713-1928"/>
+ <unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
@@ -65,8 +65,8 @@
<unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210713-1924"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
<unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
<unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -75,8 +75,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
- <unit id="org.junit" version="4.13.0.v20200204-1500"/>
- <unit id="org.junit.source" version="4.13.0.v20200204-1500"/>
+ <unit id="org.junit" version="4.13.2.v20211018-1956"/>
+ <unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20200310-1642"/>
@@ -89,11 +89,11 @@
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210825222808/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
- <repository location="https://download.eclipse.org/staging/2021-09/"/>
+ <repository location="https://download.eclipse.org/releases/2021-09/"/>
</location>
</locations>
</target>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
index 9d324692c5..2949e50a2d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
@@ -1,8 +1,8 @@
target "jgit-4.21" with source configurePhase
-include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210825222808-2021-09.tpd"
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
-location "https://download.eclipse.org/staging/2021-09/" {
+location "https://download.eclipse.org/releases/2021-09/" {
org.eclipse.osgi lazy
}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
new file mode 100644
index 0000000000..7fd003277a
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
+<target name="jgit-4.22" sequenceNumber="1637746993">
+ <locations>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="jakarta.servlet-api" version="4.0.0"/>
+ <unit id="jakarta.servlet-api.source" version="4.0.0"/>
+ <unit id="org.eclipse.jetty.http" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
+ <unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
+ <repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
+ </location>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
+ <unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
+ <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
+ <unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
+ <unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
+ <unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
+ <unit id="javaewah" version="1.1.13.v20211029-0839"/>
+ <unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
+ <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
+ <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
+ <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
+ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
+ <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
+ <unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
+ <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
+ <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
+ <unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
+ <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.13.v20210128-2225"/>
+ <unit id="org.apache.httpcomponents.httpcore" version="4.4.14.v20210128-2225"/>
+ <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.14.v20210128-2225"/>
+ <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
+ <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
+ <unit id="org.apache.sshd.osgi" version="2.7.0.v20210623-0618"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.7.0.v20210623-0618"/>
+ <unit id="org.apache.sshd.sftp" version="2.7.0.v20210623-0618"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.7.0.v20210623-0618"/>
+ <unit id="org.assertj" version="3.20.2.v20210706-1104"/>
+ <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
+ <unit id="org.bouncycastle.bcpg" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
+ <unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
+ <unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
+ <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
+ <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/>
+ <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
+ <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
+ <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
+ <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
+ <unit id="org.junit" version="4.13.2.v20211018-1956"/>
+ <unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
+ <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
+ <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
+ <unit id="org.mockito" version="2.23.0.v20200310-1642"/>
+ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/>
+ <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
+ <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
+ <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/>
+ <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/>
+ <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/>
+ <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
+ <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
+ <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
+ </location>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="org.eclipse.osgi" version="0.0.0"/>
+ <repository location="https://download.eclipse.org/releases/2021-12/"/>
+ </location>
+ </locations>
+</target>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd
new file mode 100644
index 0000000000..db3db28773
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.22" with source configurePhase
+
+include "projects/jetty-10.0.x.tpd"
+include "orbit/R20211122181901-2021-12.tpd"
+
+location "https://download.eclipse.org/releases/2021-12/" {
+ org.eclipse.osgi lazy
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd
index 059a5844ab..99f352011b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd
@@ -8,6 +8,10 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/R202108252228
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]
+ com.sun.jna [5.8.0.v20210503-0343,5.8.0.v20210503-0343]
+ com.sun.jna.source [5.8.0.v20210503-0343,5.8.0.v20210503-0343]
+ com.sun.jna.platform [5.8.0.v20210406-1004,5.8.0.v20210406-1004]
+ com.sun.jna.platform.source [5.8.0.v20210406-1004,5.8.0.v20210406-1004]
javaewah [1.1.12.v20210622-2206,1.1.12.v20210622-2206]
javaewah.source [1.1.12.v20210622-2206,1.1.12.v20210622-2206]
javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800]
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20211122181901-2021-12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20211122181901-2021-12.tpd
new file mode 100644
index 0000000000..cd1d1c08fa
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20211122181901-2021-12.tpd
@@ -0,0 +1,71 @@
+target "R20211122181901-2021-12" with source configurePhase
+// see https://download.eclipse.org/tools/orbit/downloads/
+
+location "https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository" {
+ com.google.gson [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
+ com.google.gson.source [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
+ com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
+ 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]
+ com.sun.jna [5.8.0.v20210503-0343,5.8.0.v20210503-0343]
+ com.sun.jna.source [5.8.0.v20210503-0343,5.8.0.v20210503-0343]
+ com.sun.jna.platform [5.8.0.v20210406-1004,5.8.0.v20210406-1004]
+ com.sun.jna.platform.source [5.8.0.v20210406-1004,5.8.0.v20210406-1004]
+ javaewah [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
+ javaewah.source [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
+ 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.v20210923-1401,0.3.0.v20210923-1401]
+ net.i2p.crypto.eddsa.source [0.3.0.v20210923-1401,0.3.0.v20210923-1401]
+ org.apache.ant [1.10.12.v20211102-1452,1.10.12.v20211102-1452]
+ org.apache.ant.source [1.10.12.v20211102-1452,1.10.12.v20211102-1452]
+ org.apache.commons.codec [1.14.0.v20200818-1422,1.14.0.v20200818-1422]
+ org.apache.commons.codec.source [1.14.0.v20200818-1422,1.14.0.v20200818-1422]
+ org.apache.commons.compress [1.21.0.v20211103-2100,1.21.0.v20211103-2100]
+ org.apache.commons.compress.source [1.21.0.v20211103-2100,1.21.0.v20211103-2100]
+ 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.13.v20210128-2225,4.5.13.v20210128-2225]
+ org.apache.httpcomponents.httpclient.source [4.5.13.v20210128-2225,4.5.13.v20210128-2225]
+ org.apache.httpcomponents.httpcore [4.4.14.v20210128-2225,4.4.14.v20210128-2225]
+ org.apache.httpcomponents.httpcore.source [4.4.14.v20210128-2225,4.4.14.v20210128-2225]
+ 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.7.0.v20210623-0618,2.7.0.v20210623-0618]
+ org.apache.sshd.osgi.source [2.7.0.v20210623-0618,2.7.0.v20210623-0618]
+ org.apache.sshd.sftp [2.7.0.v20210623-0618,2.7.0.v20210623-0618]
+ org.apache.sshd.sftp.source [2.7.0.v20210623-0618,2.7.0.v20210623-0618]
+ org.assertj [3.20.2.v20210706-1104,3.20.2.v20210706-1104]
+ org.assertj.source [3.20.2.v20210706-1104,3.20.2.v20210706-1104]
+ org.bouncycastle.bcpg [1.69.0.v20210713-1924,1.69.0.v20210713-1924]
+ org.bouncycastle.bcpg.source [1.69.0.v20210713-1924,1.69.0.v20210713-1924]
+ org.bouncycastle.bcpkix [1.69.0.v20210713-1924,1.69.0.v20210713-1924]
+ org.bouncycastle.bcpkix.source [1.69.0.v20210713-1924,1.69.0.v20210713-1924]
+ org.bouncycastle.bcprov [1.69.0.v20210923-1401,1.69.0.v20210923-1401]
+ org.bouncycastle.bcprov.source [1.69.0.v20210923-1401,1.69.0.v20210923-1401]
+ org.bouncycastle.bcutil [1.69.0.v20210713-1924,1.69.0.v20210713-1924]
+ org.bouncycastle.bcutil.source [1.69.0.v20210713-1924,1.69.0.v20210713-1924]
+ org.hamcrest [2.2.0.v20210711-0821,2.2.0.v20210711-0821]
+ org.hamcrest.source [2.2.0.v20210711-0821,2.2.0.v20210711-0821]
+ 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.2.v20211018-1956,4.13.2.v20211018-1956]
+ org.junit.source [4.13.2.v20211018-1956,4.13.2.v20211018-1956]
+ 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.30.v20200204-2150,1.7.30.v20200204-2150]
+ org.slf4j.api.source [1.7.30.v20200204-2150,1.7.30.v20200204-2150]
+ org.slf4j.binding.log4j12 [1.7.30.v20201108-2042,1.7.30.v20201108-2042]
+ org.slf4j.binding.log4j12.source [1.7.30.v20201108-2042,1.7.30.v20201108-2042]
+ org.tukaani.xz [1.9.0.v20210624-1259,1.9.0.v20210624-1259]
+ org.tukaani.xz.source [1.9.0.v20210624-1259,1.9.0.v20210624-1259]
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
index 1660e08df2..a4f1700510 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.target</artifactId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd
new file mode 100644
index 0000000000..6c3ee18332
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd
@@ -0,0 +1,20 @@
+target "jetty-10.0.x" with source configurePhase
+
+location jetty-10.0.x "https://download.eclipse.org/eclipse/jetty/10.0.6/" {
+ jakarta.servlet-api [4.0.0, 5.0.0)
+ jakarta.servlet-api.source [4.0.0, 5.0.0)
+ org.eclipse.jetty.http [10.0.6,10.0.6]
+ org.eclipse.jetty.http.source [10.0.6,10.0.6]
+ org.eclipse.jetty.io [10.0.6,10.0.6]
+ org.eclipse.jetty.io.source [10.0.6,10.0.6]
+ org.eclipse.jetty.security [10.0.6,10.0.6]
+ org.eclipse.jetty.security.source [10.0.6,10.0.6]
+ org.eclipse.jetty.server [10.0.6,10.0.6]
+ org.eclipse.jetty.server.source [10.0.6,10.0.6]
+ org.eclipse.jetty.servlet [10.0.6,10.0.6]
+ org.eclipse.jetty.servlet.source [10.0.6,10.0.6]
+ org.eclipse.jetty.util [10.0.6,10.0.6]
+ org.eclipse.jetty.util.source [10.0.6,10.0.6]
+ org.eclipse.jetty.util.ajax [10.0.6,10.0.6]
+ org.eclipse.jetty.util.ajax.source [10.0.6,10.0.6]
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd
deleted file mode 100644
index bcfd221695..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd
+++ /dev/null
@@ -1,22 +0,0 @@
-target "jetty-9.4.x" with source configurePhase
-
-location jetty-9.4.x "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.43.v20210629/" {
- org.eclipse.jetty.client [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.client.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.continuation [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.continuation.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.http [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.http.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.io [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.io.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.security [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.security.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.server [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.server.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.servlet [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.servlet.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.util [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.util.source [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.util.ajax [9.4.43.v20210629,9.4.43.v20210629]
- org.eclipse.jetty.util.ajax.source [9.4.43.v20210629,9.4.43.v20210629]
-}
diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml
index 7b75c2eb68..92e8f5dfe0 100644
--- a/org.eclipse.jgit.packaging/pom.xml
+++ b/org.eclipse.jgit.packaging/pom.xml
@@ -16,7 +16,7 @@
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JGit Tycho Parent</name>
@@ -149,6 +149,12 @@
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
index c5b6b8d0d9..3e0a4eaf20 100644
--- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
@@ -3,28 +3,29 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.pgm.test
Bundle-SymbolicName: org.eclipse.jgit.pgm.test
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.diff;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.dircache;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="6.0.0",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.merge;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.pgm;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.pgm.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.pgm.opt;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.io;version="[6.0.0,6.1.0)",
+Import-Package: org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.diff;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.dircache;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="6.1.0",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.merge;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.pgm;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.pgm.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.pgm.opt;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.io;version="[6.1.0,6.2.0)",
org.hamcrest.core;bundle-version="[2.2.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.rules;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml
index 85f96c597f..eea5970ab1 100644
--- a/org.eclipse.jgit.pgm.test/pom.xml
+++ b/org.eclipse.jgit.pgm.test/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm.test</artifactId>
@@ -27,6 +27,10 @@
Tests for command line client tools built on top of JGit.
</description>
+ <properties>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java
new file mode 100644
index 0000000000..2ce50c7827
--- /dev/null
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2021, Simeon Andreev <simeon.danailov.andreev@gmail.com> 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.pgm;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.diff.DiffEntry;
+import org.eclipse.jgit.lib.CLIRepositoryTestCase;
+import org.eclipse.jgit.pgm.opt.CmdLineParser;
+import org.eclipse.jgit.pgm.opt.SubcommandHandler;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.junit.Before;
+import org.junit.Test;
+import org.kohsuke.args4j.Argument;
+
+/**
+ * Testing the {@code difftool} command.
+ */
+public class DiffToolTest extends CLIRepositoryTestCase {
+ public static class GitCliJGitWrapperParser {
+ @Argument(index = 0, metaVar = "metaVar_command", required = true, handler = SubcommandHandler.class)
+ TextBuiltin subcommand;
+
+ @Argument(index = 1, metaVar = "metaVar_arg")
+ List<String> arguments = new ArrayList<>();
+ }
+
+ private String[] runAndCaptureUsingInitRaw(String... args)
+ throws Exception {
+ CLIGitCommand.Result result = new CLIGitCommand.Result();
+
+ GitCliJGitWrapperParser bean = new GitCliJGitWrapperParser();
+ CmdLineParser clp = new CmdLineParser(bean);
+ clp.parseArgument(args);
+
+ TextBuiltin cmd = bean.subcommand;
+ cmd.initRaw(db, null, null, result.out, result.err);
+ cmd.execute(bean.arguments.toArray(new String[bean.arguments.size()]));
+ if (cmd.getOutputWriter() != null) {
+ cmd.getOutputWriter().flush();
+ }
+ if (cmd.getErrorWriter() != null) {
+ cmd.getErrorWriter().flush();
+ }
+ return result.outLines().toArray(new String[0]);
+ }
+
+ private Git git;
+
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ git = new Git(db);
+ git.commit().setMessage("initial commit").call();
+ }
+
+ @Test
+ public void testTool() throws Exception {
+ RevCommit commit = createUnstagedChanges();
+ List<DiffEntry> changes = getRepositoryChanges(commit);
+ String[] expectedOutput = getExpectedDiffToolOutput(changes);
+
+ String[] options = {
+ "--tool",
+ "-t",
+ };
+
+ for (String option : options) {
+ assertArrayOfLinesEquals("Incorrect output for option: " + option,
+ expectedOutput,
+ runAndCaptureUsingInitRaw("difftool", option,
+ "some_tool"));
+ }
+ }
+
+ @Test
+ public void testToolTrustExitCode() throws Exception {
+ RevCommit commit = createUnstagedChanges();
+ List<DiffEntry> changes = getRepositoryChanges(commit);
+ String[] expectedOutput = getExpectedDiffToolOutput(changes);
+
+ String[] options = { "--tool", "-t", };
+
+ for (String option : options) {
+ assertArrayOfLinesEquals("Incorrect output for option: " + option,
+ expectedOutput, runAndCaptureUsingInitRaw("difftool",
+ "--trust-exit-code", option, "some_tool"));
+ }
+ }
+
+ @Test
+ public void testToolNoGuiNoPromptNoTrustExitcode() throws Exception {
+ RevCommit commit = createUnstagedChanges();
+ List<DiffEntry> changes = getRepositoryChanges(commit);
+ String[] expectedOutput = getExpectedDiffToolOutput(changes);
+
+ String[] options = { "--tool", "-t", };
+
+ for (String option : options) {
+ assertArrayOfLinesEquals("Incorrect output for option: " + option,
+ expectedOutput, runAndCaptureUsingInitRaw("difftool",
+ "--no-gui", "--no-prompt", "--no-trust-exit-code",
+ option, "some_tool"));
+ }
+ }
+
+ @Test
+ public void testToolCached() throws Exception {
+ RevCommit commit = createStagedChanges();
+ List<DiffEntry> changes = getRepositoryChanges(commit);
+ String[] expectedOutput = getExpectedDiffToolOutput(changes);
+
+ String[] options = { "--cached", "--staged", };
+
+ for (String option : options) {
+ assertArrayOfLinesEquals("Incorrect output for option: " + option,
+ expectedOutput, runAndCaptureUsingInitRaw("difftool",
+ option, "--tool", "some_tool"));
+ }
+ }
+
+ @Test
+ public void testToolHelp() throws Exception {
+ String[] expectedOutput = {
+ "git difftool --tool=<tool> may be set to one of the following:",
+ "user-defined:",
+ "The following tools are valid, but not currently available:",
+ "Some of the tools listed above only work in a windowed",
+ "environment. If run in a terminal-only session, they will fail.", };
+
+ String option = "--tool-help";
+ assertArrayOfLinesEquals("Incorrect output for option: " + option,
+ expectedOutput, runAndCaptureUsingInitRaw("difftool", option));
+ }
+
+ private RevCommit createUnstagedChanges() throws Exception {
+ writeTrashFile("a", "Hello world a");
+ writeTrashFile("b", "Hello world b");
+ git.add().addFilepattern(".").call();
+ RevCommit commit = git.commit().setMessage("files a & b").call();
+ writeTrashFile("a", "New Hello world a");
+ writeTrashFile("b", "New Hello world b");
+ return commit;
+ }
+
+ private RevCommit createStagedChanges() throws Exception {
+ RevCommit commit = createUnstagedChanges();
+ git.add().addFilepattern(".").call();
+ return commit;
+ }
+
+ private List<DiffEntry> getRepositoryChanges(RevCommit commit)
+ throws Exception {
+ TreeWalk tw = new TreeWalk(db);
+ tw.addTree(commit.getTree());
+ FileTreeIterator modifiedTree = new FileTreeIterator(db);
+ tw.addTree(modifiedTree);
+ List<DiffEntry> changes = DiffEntry.scan(tw);
+ return changes;
+ }
+
+ private String[] getExpectedDiffToolOutput(List<DiffEntry> changes) {
+ String[] expectedToolOutput = new String[changes.size()];
+ for (int i = 0; i < changes.size(); ++i) {
+ DiffEntry change = changes.get(i);
+ String newPath = change.getNewPath();
+ String oldPath = change.getOldPath();
+ String newIdName = change.getNewId().name();
+ String oldIdName = change.getOldId().name();
+ String expectedLine = "M\t" + newPath + " (" + newIdName + ")"
+ + "\t" + oldPath + " (" + oldIdName + ")";
+ expectedToolOutput[i] = expectedLine;
+ }
+ return expectedToolOutput;
+ }
+
+ private static void assertArrayOfLinesEquals(String failMessage,
+ String[] expected, String[] actual) {
+ assertEquals(failMessage, toString(expected), toString(actual));
+ }
+}
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
index 06fddc29d9..7c6cf4290e 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
@@ -55,21 +55,21 @@ public class RevListTest extends CLIRepositoryTestCase {
assertEquals(expect, result);
}
- private List<RevCommit> createCommitsForParentsFlag(Git git)
+ private List<RevCommit> createCommitsForParentsFlag(Git repo)
throws Exception {
List<RevCommit> commits = new ArrayList<>();
writeTrashFile("Test1.txt", "Hello world");
- git.add().addFilepattern("Test1.txt").call();
- commits.add(git.commit().setMessage("commit#0").call());
+ repo.add().addFilepattern("Test1.txt").call();
+ commits.add(repo.commit().setMessage("commit#0").call());
writeTrashFile("Test.txt", "Hello world!");
- git.add().addFilepattern("Test.txt").call();
- commits.add(git.commit().setMessage("commit#1").call());
+ repo.add().addFilepattern("Test.txt").call();
+ commits.add(repo.commit().setMessage("commit#1").call());
writeTrashFile("Test1.txt", "Hello world!!");
- git.add().addFilepattern("Test1.txt").call();
- commits.add(git.commit().setMessage("commit#2").call());
+ repo.add().addFilepattern("Test1.txt").call();
+ commits.add(repo.commit().setMessage("commit#2").call());
writeTrashFile("Test.txt", "Hello world!!!");
- git.add().addFilepattern("Test.txt").call();
- commits.add(git.commit().setMessage("commit#3").call());
+ repo.add().addFilepattern("Test.txt").call();
+ commits.add(repo.commit().setMessage("commit#3").call());
return commits;
}
}
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index 89ad6d1f3c..fa0f452c59 100644
--- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
@@ -3,58 +3,60 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.pgm
Bundle-SymbolicName: org.eclipse.jgit.pgm
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
+Import-Package: javax.servlet;version="[3.1.0,5.0.0)",
org.apache.commons.logging;version="[1.2,2.0)",
- org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
- org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.archive;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.awtui;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.blame;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.diff;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.dircache;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.gitrepo;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.io;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.pack;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.server;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.server.fs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs.server.s3;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.merge;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.notes;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revplot;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.pack;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http.apache;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.resolver;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.ssh.jsch;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.sshd;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.io;version="[6.0.0,6.1.0)",
+ org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
+ org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.archive;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.awtui;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.blame;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.diff;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.dircache;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.gitrepo;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.diffmergetool;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.io;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.server;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs.server.s3;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.merge;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.notes;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revplot;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.pack;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http.apache;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.ssh.jsch;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.sshd;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.io;version="[6.1.0,6.2.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="6.0.0";
+Export-Package: org.eclipse.jgit.console;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.util",
- org.eclipse.jgit.pgm;version="6.0.0";
+ org.eclipse.jgit.pgm;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.util.io,
org.eclipse.jgit.awtui,
@@ -66,14 +68,14 @@ Export-Package: org.eclipse.jgit.console;version="6.0.0";
org.eclipse.jgit.treewalk,
org.eclipse.jgit.api,
javax.swing",
- org.eclipse.jgit.pgm.debug;version="6.0.0";
+ org.eclipse.jgit.pgm.debug;version="6.1.0";
uses:="org.eclipse.jgit.util.io,
org.eclipse.jgit.pgm,
org.eclipse.jetty.servlet",
- org.eclipse.jgit.pgm.internal;version="6.0.0";
+ org.eclipse.jgit.pgm.internal;version="6.1.0";
x-friends:="org.eclipse.jgit.pgm.test,
org.eclipse.jgit.test",
- org.eclipse.jgit.pgm.opt;version="6.0.0";
+ org.eclipse.jgit.pgm.opt;version="6.1.0";
uses:="org.kohsuke.args4j,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
index 15203e9aeb..a61df467ac 100644
--- a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.pgm - Sources
Bundle-SymbolicName: org.eclipse.jgit.pgm.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.pgm/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin b/org.eclipse.jgit.pgm/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
index e645255e96..8c44764c63 100644
--- a/org.eclipse.jgit.pgm/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
+++ b/org.eclipse.jgit.pgm/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
@@ -12,6 +12,7 @@ org.eclipse.jgit.pgm.ConvertRefStorage
org.eclipse.jgit.pgm.Daemon
org.eclipse.jgit.pgm.Describe
org.eclipse.jgit.pgm.Diff
+org.eclipse.jgit.pgm.DiffTool
org.eclipse.jgit.pgm.DiffTree
org.eclipse.jgit.pgm.Fetch
org.eclipse.jgit.pgm.Gc
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index c28da4d7fa..739b53763f 100644
--- a/org.eclipse.jgit.pgm/pom.xml
+++ b/org.eclipse.jgit.pgm/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm</artifactId>
@@ -81,6 +81,12 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
index 97450033ee..d51daafde3 100644
--- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
+++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
@@ -58,6 +58,9 @@ couldNotCreateBranch=Could not create branch {0}: {1}
dateInfo=Date: {0}
deletedBranch=Deleted branch {0}
deletedRemoteBranch=Deleted remote branch {0}
+diffToolHelpSetToFollowing='git difftool --tool=<tool>' may be set to one of the following:\n{0}\n\tuser-defined:\n{1}\nThe following tools are valid, but not currently available:\n{2}\nSome of the tools listed above only work in a windowed\nenvironment. If run in a terminal-only session, they will fail.
+diffToolLaunch=Viewing ({0}/{1}): '{2}'\nLaunch '{3}' [Y/n]?
+diffToolDied=external diff died, stopping at {0}
doesNotExist={0} does not exist
dontOverwriteLocalChanges=error: Your local changes to the following file would be overwritten by merge:
everythingUpToDate=Everything up-to-date
@@ -145,6 +148,7 @@ metaVar_s3StorageClass=STORAGE-CLASS
metaVar_seconds=SECONDS
metaVar_service=SERVICE
metaVar_tagLocalUser=<GPG key ID>
+metaVar_tool=TOOL
metaVar_treeish=tree-ish
metaVar_uriish=uri-ish
metaVar_url=URL
@@ -249,6 +253,8 @@ usage_DiffAlgorithms=Test performance of jgit's diff algorithms
usage_DisplayTheVersionOfJgit=Display the version of jgit
usage_Gc=Cleanup unnecessary files and optimize the local repository
usage_Glog=View commit history as a graph
+usage_DiffGuiTool=When git-difftool is invoked with the -g or --gui option the default diff tool will be read from the configured diff.guitool variable instead of diff.tool.
+usage_noGui=The --no-gui option can be used to override -g or --gui setting.
usage_IndexPack=Build pack index file for an existing packed archive
usage_LFSDirectory=Directory to store large objects
usage_LFSPort=Server http port
@@ -295,6 +301,7 @@ usage_ShowRef=List references in a local repository
usage_Status=Show the working tree status
usage_StopTrackingAFile=Stop tracking a file
usage_TextHashFunctions=Scan repository to compute maximum number of collisions for hash functions
+usage_ToolForDiff=Use the diff tool specified by <tool>. Run git difftool --tool-help for the list of valid <tool> settings.\nIf a diff tool is not specified, git difftool will use the configuration variable diff.tool.
usage_UpdateRemoteRepositoryFromLocalRefs=Update remote repository from local refs
usage_UseAll=Use all refs found in refs/
usage_UseTags=Use any tag including lightweight tags
@@ -341,6 +348,7 @@ usage_deleteFullyMergedBranch=delete fully merged branch
usage_date=date format, one of default, rfc, local, iso, short, raw (as defined by git-log(1) ), locale or localelocal (jgit extensions)
usage_detectRenames=detect renamed files
usage_diffAlgorithm=the diff algorithm to use. Currently supported are: 'myers', 'histogram'
+usage_DiffTool=git difftool is a Git command that allows you to compare and edit files between revisions using common diff tools.\ngit difftool is a frontend to git diff and accepts the same options and arguments.
usage_directoriesToExport=directories to export
usage_disableTheServiceInAllRepositories=disable the service in all repositories
usage_displayAListOfAllRegisteredJgitCommands=Display a list of all registered jgit commands
@@ -395,6 +403,8 @@ usage_pathToXml=path to the repo manifest XML file
usage_performFsckStyleChecksOnReceive=perform fsck style checks on receive
usage_portNumberToListenOn=port number to listen on
usage_printOnlyBranchesThatContainTheCommit=print only branches that contain the commit
+usage_prompt=Prompt before each invocation of the diff tool. This is the default behaviour; the option is provided to override any configuration settings.
+usage_noPrompt=Do not prompt before launching a diff tool.
usage_pruneStaleTrackingRefs=prune stale tracking refs
usage_pushUrls=push URLs are manipulated
usage_quiet=don't show progress messages
@@ -422,6 +432,8 @@ usage_srcPrefix=show the source prefix instead of "a/"
usage_sshDriver=Selects the built-in ssh library to use, JSch or Apache MINA sshd.
usage_symbolicVersionForTheProject=Symbolic version for the project
usage_tags=fetch all tags
+usage_trustExitCode=git-difftool invokes a diff tool individually on each file. Errors reported by the diff tool are ignored by default. Use --trust-exit-code to make git-difftool exit when an invoked diff tool returns a non-zero exit code.\ngit-difftool will forward the exit code of the invoked tool when --trust-exit-code is used.
+usage_noTrustExitCode=This option can be used to override --trust-exit-code setting.
usage_notags=do not fetch tags
usage_tagAnnotated=create an annotated tag, unsigned unless -s or -u are given, or config tag.gpgSign is true
usage_tagDelete=delete tag
@@ -430,6 +442,7 @@ usage_tagMessage=create an annotated tag with the given message, unsigned unless
usage_tagSign=create a signed annotated tag
usage_tagNoSign=suppress signing the tag
usage_tagVerify=Verify the GPG signature
+usage_toolHelp=Print a list of diff tools that may be used with --tool.
usage_untrackedFilesMode=show untracked files
usage_updateRef=reference to update
usage_updateRemoteRefsFromAnotherRepository=Update remote refs from another repository
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
new file mode 100644
index 0000000000..9fc26c9356
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2018-2021, Andre Bossert <andre.bossert@siemens.com>
+ *
+ * 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.pgm;
+
+import static org.eclipse.jgit.lib.Constants.HEAD;
+
+import java.io.BufferedOutputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.text.MessageFormat;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.jgit.diff.DiffEntry;
+import org.eclipse.jgit.diff.DiffFormatter;
+import org.eclipse.jgit.dircache.DirCacheIterator;
+import org.eclipse.jgit.errors.AmbiguousObjectException;
+import org.eclipse.jgit.errors.IncorrectObjectTypeException;
+import org.eclipse.jgit.errors.RevisionSyntaxException;
+import org.eclipse.jgit.internal.diffmergetool.DiffTools;
+import org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectReader;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.TextProgressMonitor;
+import org.eclipse.jgit.lib.internal.BooleanTriState;
+import org.eclipse.jgit.pgm.internal.CLIText;
+import org.eclipse.jgit.pgm.opt.PathTreeFilterHandler;
+import org.eclipse.jgit.treewalk.AbstractTreeIterator;
+import org.eclipse.jgit.treewalk.CanonicalTreeParser;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+import org.eclipse.jgit.treewalk.filter.TreeFilter;
+import org.eclipse.jgit.util.StringUtils;
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+
+@Command(name = "difftool", common = true, usage = "usage_DiffTool")
+class DiffTool extends TextBuiltin {
+ private DiffFormatter diffFmt;
+
+ private DiffTools diffTools;
+
+ @Argument(index = 0, metaVar = "metaVar_treeish")
+ private AbstractTreeIterator oldTree;
+
+ @Argument(index = 1, metaVar = "metaVar_treeish")
+ private AbstractTreeIterator newTree;
+
+ @Option(name = "--tool", aliases = {
+ "-t" }, metaVar = "metaVar_tool", usage = "usage_ToolForDiff")
+ private String toolName;
+
+ @Option(name = "--cached", aliases = { "--staged" }, usage = "usage_cached")
+ private boolean cached;
+
+ private BooleanTriState prompt = BooleanTriState.UNSET;
+
+ @Option(name = "--prompt", usage = "usage_prompt")
+ void setPrompt(@SuppressWarnings("unused") boolean on) {
+ prompt = BooleanTriState.TRUE;
+ }
+
+ @Option(name = "--no-prompt", aliases = { "-y" }, usage = "usage_noPrompt")
+ void noPrompt(@SuppressWarnings("unused") boolean on) {
+ prompt = BooleanTriState.FALSE;
+ }
+
+ @Option(name = "--tool-help", usage = "usage_toolHelp")
+ private boolean toolHelp;
+
+ private BooleanTriState gui = BooleanTriState.UNSET;
+
+ @Option(name = "--gui", aliases = { "-g" }, usage = "usage_DiffGuiTool")
+ void setGui(@SuppressWarnings("unused") boolean on) {
+ gui = BooleanTriState.TRUE;
+ }
+
+ @Option(name = "--no-gui", usage = "usage_noGui")
+ void noGui(@SuppressWarnings("unused") boolean on) {
+ gui = BooleanTriState.FALSE;
+ }
+
+ private BooleanTriState trustExitCode = BooleanTriState.UNSET;
+
+ @Option(name = "--trust-exit-code", usage = "usage_trustExitCode")
+ void setTrustExitCode(@SuppressWarnings("unused") boolean on) {
+ trustExitCode = BooleanTriState.TRUE;
+ }
+
+ @Option(name = "--no-trust-exit-code", usage = "usage_noTrustExitCode")
+ void noTrustExitCode(@SuppressWarnings("unused") boolean on) {
+ trustExitCode = BooleanTriState.FALSE;
+ }
+
+ @Option(name = "--", metaVar = "metaVar_paths", handler = PathTreeFilterHandler.class)
+ private TreeFilter pathFilter = TreeFilter.ALL;
+
+ @Override
+ protected void init(Repository repository, String gitDir) {
+ super.init(repository, gitDir);
+ diffFmt = new DiffFormatter(new BufferedOutputStream(outs));
+ diffTools = new DiffTools(repository);
+ }
+
+ @Override
+ protected void run() {
+ try {
+ if (toolHelp) {
+ showToolHelp();
+ } else {
+ boolean showPrompt = diffTools.isInteractive();
+ if (prompt != BooleanTriState.UNSET) {
+ showPrompt = prompt == BooleanTriState.TRUE;
+ }
+ String toolNamePrompt = toolName;
+ if (showPrompt) {
+ if (StringUtils.isEmptyOrNull(toolNamePrompt)) {
+ toolNamePrompt = diffTools.getDefaultToolName(gui);
+ }
+ }
+ // get the changed files
+ List<DiffEntry> files = getFiles();
+ if (files.size() > 0) {
+ compare(files, showPrompt, toolNamePrompt);
+ }
+ }
+ outw.flush();
+ } catch (RevisionSyntaxException | IOException e) {
+ throw die(e.getMessage(), e);
+ } finally {
+ diffFmt.close();
+ }
+ }
+
+ private void compare(List<DiffEntry> files, boolean showPrompt,
+ String toolNamePrompt) throws IOException {
+ for (int fileIndex = 0; fileIndex < files.size(); fileIndex++) {
+ DiffEntry ent = files.get(fileIndex);
+ String mergedFilePath = ent.getNewPath();
+ if (mergedFilePath.equals(DiffEntry.DEV_NULL)) {
+ mergedFilePath = ent.getOldPath();
+ }
+ // check if user wants to launch compare
+ boolean launchCompare = true;
+ if (showPrompt) {
+ launchCompare = isLaunchCompare(fileIndex + 1, files.size(),
+ mergedFilePath, toolNamePrompt);
+ }
+ if (launchCompare) {
+ switch (ent.getChangeType()) {
+ case MODIFY:
+ outw.println("M\t" + ent.getNewPath() //$NON-NLS-1$
+ + " (" + ent.getNewId().name() + ")" //$NON-NLS-1$ //$NON-NLS-2$
+ + "\t" + ent.getOldPath() //$NON-NLS-1$
+ + " (" + ent.getOldId().name() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ int ret = diffTools.compare(ent.getNewPath(),
+ ent.getOldPath(), ent.getNewId().name(),
+ ent.getOldId().name(), toolName, prompt, gui,
+ trustExitCode);
+ if (ret != 0) {
+ throw die(MessageFormat.format(
+ CLIText.get().diffToolDied, mergedFilePath));
+ }
+ break;
+ default:
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+
+ @SuppressWarnings("boxing")
+ private boolean isLaunchCompare(int fileIndex, int fileCount,
+ String fileName, String toolNamePrompt) throws IOException {
+ boolean launchCompare = true;
+ outw.println(MessageFormat.format(CLIText.get().diffToolLaunch,
+ fileIndex, fileCount, fileName, toolNamePrompt));
+ outw.flush();
+ BufferedReader br = new BufferedReader(new InputStreamReader(ins));
+ String line = null;
+ if ((line = br.readLine()) != null) {
+ if (!line.equalsIgnoreCase("Y")) { //$NON-NLS-1$
+ launchCompare = false;
+ }
+ }
+ return launchCompare;
+ }
+
+ private void showToolHelp() throws IOException {
+ String availableToolNames = new String();
+ for (String name : diffTools.getAvailableTools().keySet()) {
+ availableToolNames += String.format("\t\t{0}\n", name); //$NON-NLS-1$
+ }
+ String notAvailableToolNames = new String();
+ for (String name : diffTools.getNotAvailableTools().keySet()) {
+ notAvailableToolNames += String.format("\t\t{0}\n", name); //$NON-NLS-1$
+ }
+ String userToolNames = new String();
+ Map<String, ExternalDiffTool> userTools = diffTools
+ .getUserDefinedTools();
+ for (String name : userTools.keySet()) {
+ availableToolNames += String.format("\t\t{0}.cmd {1}\n", //$NON-NLS-1$
+ name, userTools.get(name).getCommand());
+ }
+ outw.println(MessageFormat.format(
+ CLIText.get().diffToolHelpSetToFollowing, availableToolNames,
+ userToolNames, notAvailableToolNames));
+ }
+
+ private List<DiffEntry> getFiles()
+ throws RevisionSyntaxException, AmbiguousObjectException,
+ IncorrectObjectTypeException, IOException {
+ diffFmt.setRepository(db);
+ if (cached) {
+ if (oldTree == null) {
+ ObjectId head = db.resolve(HEAD + "^{tree}"); //$NON-NLS-1$
+ if (head == null) {
+ die(MessageFormat.format(CLIText.get().notATree, HEAD));
+ }
+ CanonicalTreeParser p = new CanonicalTreeParser();
+ try (ObjectReader reader = db.newObjectReader()) {
+ p.reset(reader, head);
+ }
+ oldTree = p;
+ }
+ newTree = new DirCacheIterator(db.readDirCache());
+ } else if (oldTree == null) {
+ oldTree = new DirCacheIterator(db.readDirCache());
+ newTree = new FileTreeIterator(db);
+ } else if (newTree == null) {
+ newTree = new FileTreeIterator(db);
+ }
+
+ TextProgressMonitor pm = new TextProgressMonitor(errw);
+ pm.setDelayStart(2, TimeUnit.SECONDS);
+ diffFmt.setProgressMonitor(pm);
+ diffFmt.setPathFilter(pathFilter);
+
+ List<DiffEntry> files = diffFmt.scan(oldTree, newTree);
+ return files;
+ }
+
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
index cd5d8f1bfe..a63387c24c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
@@ -173,7 +173,7 @@ class DiffAlgorithms extends TextBuiltin {
} catch (LargeObjectException tooBig) {
continue;
}
- if (RawText.isBinary(raw0))
+ if (RawText.isBinary(raw0, raw0.length, true))
continue;
byte[] raw1;
@@ -183,7 +183,7 @@ class DiffAlgorithms extends TextBuiltin {
} catch (LargeObjectException tooBig) {
continue;
}
- if (RawText.isBinary(raw1))
+ if (RawText.isBinary(raw1, raw1.length, true))
continue;
RawText txt0 = new RawText(raw0);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
index f777f277f4..1ca3034f4f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
@@ -286,7 +286,7 @@ class TextHashFunctions extends TextBuiltin {
continue;
}
- if (RawText.isBinary(raw))
+ if (RawText.isBinary(raw, raw.length, true))
continue;
RawText txt = new RawText(raw);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
index 8e49a76a33..7fe5b0fa45 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
@@ -136,6 +136,9 @@ public class CLIText extends TranslationBundle {
/***/ public String dateInfo;
/***/ public String deletedBranch;
/***/ public String deletedRemoteBranch;
+ /***/ public String diffToolHelpSetToFollowing;
+ /***/ public String diffToolLaunch;
+ /***/ public String diffToolDied;
/***/ public String doesNotExist;
/***/ public String dontOverwriteLocalChanges;
/***/ public String everythingUpToDate;
diff --git a/org.eclipse.jgit.ssh.apache.agent/.classpath b/org.eclipse.jgit.ssh.apache.agent/.classpath
new file mode 100644
index 0000000000..df1b324f7f
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jgit.ssh.apache.agent/.fbprefs b/org.eclipse.jgit.ssh.apache.agent/.fbprefs
new file mode 100644
index 0000000000..81a0767ff6
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.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.apache.agent/.gitignore b/org.eclipse.jgit.ssh.apache.agent/.gitignore
new file mode 100644
index 0000000000..934e0e06ff
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.gitignore
@@ -0,0 +1,2 @@
+/bin
+/target
diff --git a/org.eclipse.jgit.ssh.apache.agent/.project b/org.eclipse.jgit.ssh.apache.agent/.project
new file mode 100644
index 0000000000..73358f4a6b
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jgit.ssh.apache.agent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..66ac15c47c
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Aug 11 16:46:12 PDT 2008
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000000..006e07ede5
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Mon Mar 24 18:55:50 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..d1f54bbe65
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,518 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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=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.reportPreviewFeatures=warning
+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.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
+org.eclipse.jdt.core.formatter.align_with_spaces=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49
+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_assertion_message=0
+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_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0
+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_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
+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_record_components=16
+org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0
+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_shift_operator=0
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=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_record_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_type_annotations=0
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+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_last_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=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_statement_group_in_switch=0
+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_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_record_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.align_tags_descriptions_grouped=false
+org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
+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.count_line_length_from_starting_position=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.indent_tag_description=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not 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=false
+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_record_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_enum_constant=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=do not 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_after_type_annotation=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_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=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_bitwise_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_record_components=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=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_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not 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_record_declaration=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_relational_operator=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_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=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_bitwise_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_record_declaration=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_record_components=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_switch_case_expressions=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_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=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_record_constructor=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_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_record_declaration=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_relational_operator=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_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=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_annotation_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
+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_enum_constant_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
+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_after_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+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.text_block_indentation=0
+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_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..5cfb8b6ac6
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.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=21
+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=<?xml version\="1.0" encoding\="UTF-8"?><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.apache.agent/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..823c0f56ae
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Tue Jul 19 20:11:28 CEST 2011
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..0cba949fb7
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Jul 19 20:11:28 CEST 2011
+commit.comment.template=${task.description} \n\nBug\: ${task.key}
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..c0030ded71
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.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.apache.agent/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000000..82793f2d27
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Thu Jan 14 14:34:32 CST 2010
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/org.eclipse.jgit.ssh.apache.agent/BUILD b/org.eclipse.jgit.ssh.apache.agent/BUILD
new file mode 100644
index 0000000000..0c8cf838d4
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/BUILD
@@ -0,0 +1,22 @@
+load("@rules_java//java:defs.bzl", "java_library")
+
+package(default_visibility = ["//visibility:public"])
+
+SRCS = glob(["src/**/*.java"])
+
+RESOURCES = glob(["resources/**"])
+
+java_library(
+ name = "ssh-apache-agent",
+ srcs = SRCS,
+ resource_strip_prefix = "org.eclipse.jgit.ssh.apache.agent/resources",
+ resources = RESOURCES,
+ deps = [
+ "//lib:jna",
+ "//lib:jna-platform",
+ "//lib:slf4j-api",
+ "//lib:sshd-osgi",
+ "//org.eclipse.jgit:jgit",
+ "//org.eclipse.jgit.ssh.apache:ssh-apache"
+ ],
+)
diff --git a/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..df97e3a1ca
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.agent;singleton:=true
+Bundle-Version: 6.1.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Fragment-Host: org.eclipse.jgit.ssh.apache;bundle-version="[6.1.0,6.2.0)"
+Bundle-ActivationPolicy: lazy
+Automatic-Module-Name: org.eclipse.jgit.ssh.apache.agent
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Import-Package: org.eclipse.jgit.transport.sshd;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)"
+Require-Bundle: com.sun.jna;bundle-version="[5.8.0,6.0.0)",
+ com.sun.jna.platform;bundle-version="[5.8.0,6.0.0)"
+Export-Package: org.eclipse.jgit.internal.transport.sshd.agent.connector;version="6.1.0";x-internal:=true
diff --git a/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF
new file mode 100644
index 0000000000..3fae07b9de
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.jgit.ssh.apache.agent - Sources
+Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.agent.source
+Bundle-Vendor: Eclipse.org - JGit
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache.agent;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.apache.agent/about.html b/org.eclipse.jgit.ssh.apache.agent/about.html
new file mode 100644
index 0000000000..f971af18d0
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/about.html
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Distribution License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ .ubc-name {
+ margin-left: 0.5in;
+ white-space: pre;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<p><b>Eclipse Distribution License - v 1.0</b></p>
+
+<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p>
+
+<p>All rights reserved.</p>
+<p>Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+<ul><li>Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer. </li>
+<li>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. </li>
+<li>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. </li></ul>
+</p>
+<p>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.</p>
+
+<hr>
+<p><b>SHA-1 UbcCheck - MIT</b></p>
+
+<p>Copyright (c) 2017:</p>
+<div class="ubc-name">
+Marc Stevens
+Cryptology Group
+Centrum Wiskunde & Informatica
+P.O. Box 94079, 1090 GB Amsterdam, Netherlands
+marc@marc-stevens.nl
+</div>
+<div class="ubc-name">
+Dan Shumow
+Microsoft Research
+danshu@microsoft.com
+</div>
+<p>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:
+</p>
+<ul><li>The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.</li></ul>
+<p>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.</p>
+
+</body>
+
+</html>
diff --git a/org.eclipse.jgit.ssh.apache.agent/build.properties b/org.eclipse.jgit.ssh.apache.agent/build.properties
new file mode 100644
index 0000000000..8148271ef3
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/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.apache.agent/plugin.properties b/org.eclipse.jgit.ssh.apache.agent/plugin.properties
new file mode 100644
index 0000000000..86df8f2e72
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/plugin.properties
@@ -0,0 +1,2 @@
+Bundle-Name=JGit Unix SSH agent client for Apache MINA sshd
+Bundle-Vendor=Eclipse JGit
diff --git a/org.eclipse.jgit.ssh.apache.agent/pom.xml b/org.eclipse.jgit.ssh.apache.agent/pom.xml
new file mode 100644
index 0000000000..848d22fd52
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/pom.xml
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0 which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit-parent</artifactId>
+ <version>6.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId>
+ <name>JGit - Apache sshd SSH agent support</name>
+
+ <description>
+ Support for ssh-agent for the Apache MINA sshd SSH connector
+ </description>
+
+ <properties>
+ <jna-version>5.8.0</jna-version>
+ <translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ssh.apache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna</artifactId>
+ <version>${jna-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna-platform</artifactId>
+ <version>${jna-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src/</sourceDirectory>
+
+ <resources>
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>plugin.properties</include>
+ <include>about.html</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>resources/</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>translate-source-qualifier</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true" />
+ <replace file="${source-bundle-manifest}">
+ <replacefilter token=".qualifier" value=".${maven.build.timestamp}" />
+ </replace>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <archive>
+ <manifestFile>${source-bundle-manifest}</manifestFile>
+ </archive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${bundle-manifest}</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <!-- New in 6.0; uncomment in 6.1
+ <plugin>
+ <groupId>com.github.siom79.japicmp</groupId>
+ <artifactId>japicmp-maven-plugin</artifactId>
+ <version>${japicmp-version}</version>
+ <configuration>
+ <oldVersion>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <version>${jgit-last-release-version}</version>
+ </dependency>
+ </oldVersion>
+ <newVersion>
+ <file>
+ <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
+ </file>
+ </newVersion>
+ <parameter>
+ <onlyModified>true</onlyModified>
+ <includes>
+ <include>org.eclipse.jgit.*</include>
+ </includes>
+ <accessModifier>public</accessModifier>
+ <breakBuildOnModifications>false</breakBuildOnModifications>
+ <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications>
+ <onlyBinaryIncompatible>false</onlyBinaryIncompatible>
+ <includeSynthetic>false</includeSynthetic>
+ <ignoreMissingClasses>false</ignoreMissingClasses>
+ <skipPomModules>true</skipPomModules>
+ </parameter>
+ <skip>false</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>cmp</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
+
+ <!-- New in 6.0, uncomment in 6.1
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>com.github.siom79.japicmp</groupId>
+ <artifactId>japicmp-maven-plugin</artifactId>
+ <version>${japicmp-version}</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>cmp-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ <configuration>
+ <oldVersion>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <version>${jgit-last-release-version}</version>
+ </dependency>
+ </oldVersion>
+ <newVersion>
+ <file>
+ <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
+ </file>
+ </newVersion>
+ <parameter>
+ <onlyModified>true</onlyModified>
+ <includes>
+ <include>org.eclipse.jgit.*</include>
+ </includes>
+ <accessModifier>public</accessModifier>
+ <breakBuildOnModifications>false</breakBuildOnModifications>
+ <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications>
+ <onlyBinaryIncompatible>false</onlyBinaryIncompatible>
+ <includeSynthetic>false</includeSynthetic>
+ <ignoreMissingClasses>false</ignoreMissingClasses>
+ <skipPomModules>true</skipPomModules>
+ </parameter>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ -->
+</project>
diff --git a/org.eclipse.jgit.ssh.apache.agent/resources/META-INF/services/org.eclipse.jgit.transport.sshd.agent.ConnectorFactory b/org.eclipse.jgit.ssh.apache.agent/resources/META-INF/services/org.eclipse.jgit.transport.sshd.agent.ConnectorFactory
new file mode 100644
index 0000000000..538888c770
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/resources/META-INF/services/org.eclipse.jgit.transport.sshd.agent.ConnectorFactory
@@ -0,0 +1 @@
+org.eclipse.jgit.internal.transport.sshd.agent.connector.Factory
diff --git a/org.eclipse.jgit.ssh.apache.agent/resources/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.properties b/org.eclipse.jgit.ssh.apache.agent/resources/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.properties
new file mode 100644
index 0000000000..6fce083668
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/resources/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.properties
@@ -0,0 +1,17 @@
+errCloseMappedFile=Cannot close mapped file: {0} - {1}
+errLastError=System message for error {0} could not be retrieved, got {1}
+errReleaseSharedMemory=Cannot release shared memory: {0} - {1}
+errUnknown=unknown error
+logErrorLoadLibrary=Cannot load socket library; SSH agent support is switched off
+msgCloseFailed=Cannot close SSH agent socket {0}
+msgConnectFailed=Could not connect to SSH agent via socket ''{0}''
+msgNoMappedFile=Could not create file mapping: {0} - {1}
+msgNoSharedMemory=Could not initialize shared memory: {0} - {1}
+msgPageantUnavailable=Could not connect to Pageant
+msgReadFailed=Reading {0} bytes from the SSH agent failed
+msgSendFailed=Sending {0} bytes to SSH agent failed; {0} bytes not written
+msgSendFailed2=Sending {0} bytes to SSH agent failed: {1} - {2}
+msgSharedMemoryFailed=Could not set up shared memory for communicating with Pageant
+msgShortRead=Short read from SSH agent, expected {0}bytes, got {1} bytes; last read() returned {2}
+pageant=Pageant
+unixDefaultAgent=ssh-agent
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Factory.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Factory.java
new file mode 100644
index 0000000000..d7409b0c3c
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Factory.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.jgit.transport.sshd.agent.Connector;
+import org.eclipse.jgit.transport.sshd.agent.ConnectorFactory;
+import org.eclipse.jgit.util.SystemReader;
+
+/**
+ * An {@link ConnectorFactory} for connecting to an OpenSSH SSH agent.
+ */
+public class Factory implements ConnectorFactory {
+
+ private static final String NAME = "jgit-builtin"; //$NON-NLS-1$
+
+ @Override
+ public Connector create(String identityAgent, File homeDir)
+ throws IOException {
+ if (SystemReader.getInstance().isWindows()) {
+ return new PageantConnector();
+ }
+ return new UnixDomainSocketConnector(identityAgent);
+ }
+
+ @Override
+ public boolean isSupported() {
+ return true;
+ }
+
+ @Override
+ public String getName() {
+ return NAME;
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p>
+ * This factory returns on Windows a
+ * {@link org.eclipse.jgit.transport.sshd.agent.ConnectorFactory.ConnectorDescriptor
+ * ConnectorDescriptor} for the internal name "pageant"; on Unix one for
+ * "SSH_AUTH_SOCK".
+ * </p>
+ */
+ @Override
+ public Collection<ConnectorDescriptor> getSupportedConnectors() {
+ return Collections.singleton(getDefaultConnector());
+ }
+
+ @Override
+ public ConnectorDescriptor getDefaultConnector() {
+ if (SystemReader.getInstance().isWindows()) {
+ return PageantConnector.DESCRIPTOR;
+ }
+ return UnixDomainSocketConnector.DESCRIPTOR;
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/LibraryHolder.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/LibraryHolder.java
new file mode 100644
index 0000000000..b09b55f817
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/LibraryHolder.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import java.text.MessageFormat;
+
+import com.sun.jna.LastErrorException;
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.Kernel32Util;
+import com.sun.jna.platform.win32.User32;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Delay loading the native libraries until needed.
+ */
+class LibraryHolder {
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(LibraryHolder.class);
+
+ private static LibraryHolder INSTANCE;
+
+ private static boolean libraryLoaded = false;
+
+ public static synchronized LibraryHolder getLibrary() {
+ if (!libraryLoaded) {
+ libraryLoaded = true;
+ try {
+ INSTANCE = new LibraryHolder();
+ } catch (Exception | UnsatisfiedLinkError
+ | NoClassDefFoundError e) {
+ LOG.error(Texts.get().logErrorLoadLibrary, e);
+ }
+ }
+ return INSTANCE;
+ }
+
+ User32 user;
+
+ Kernel32 kernel;
+
+ private LibraryHolder() {
+ user = User32.INSTANCE;
+ kernel = Kernel32.INSTANCE;
+ }
+
+ String systemError(String pattern) {
+ int lastError = kernel.GetLastError();
+ String msg;
+ try {
+ msg = Kernel32Util.formatMessageFromLastErrorCode(lastError);
+ } catch (Exception e) {
+ String err = e instanceof LastErrorException
+ ? Integer.toString(((LastErrorException) e).getErrorCode())
+ : Texts.get().errUnknown;
+ msg = MessageFormat.format(Texts.get().errLastError,
+ Integer.toString(lastError), err);
+ LOG.error(msg, e);
+ }
+ return MessageFormat.format(pattern, Integer.toString(lastError), msg);
+ }
+
+} \ No newline at end of file
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantConnector.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantConnector.java
new file mode 100644
index 0000000000..b0e3bce724
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantConnector.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import java.io.IOException;
+
+import org.eclipse.jgit.transport.sshd.agent.AbstractConnector;
+import org.eclipse.jgit.transport.sshd.agent.ConnectorFactory.ConnectorDescriptor;
+
+/**
+ * A connector using Pageant's shared memory IPC mechanism.
+ */
+public class PageantConnector extends AbstractConnector {
+
+ /**
+ * {@link ConnectorDescriptor} for the {@link PageantConnector}.
+ */
+ public static final ConnectorDescriptor DESCRIPTOR = new ConnectorDescriptor() {
+
+ @Override
+ public String getIdentityAgent() {
+ return "pageant"; //$NON-NLS-1$
+ }
+
+ @Override
+ public String getDisplayName() {
+ return Texts.get().pageant;
+ }
+ };
+
+ private final PageantLibrary lib;
+
+ /**
+ * Creates a new {@link PageantConnector}.
+ */
+ public PageantConnector() {
+ super(); // Use default maximum message size
+ this.lib = new PageantLibrary();
+ }
+
+ @Override
+ public boolean connect() throws IOException {
+ return lib.isPageantAvailable();
+ }
+
+ @Override
+ public void close() throws IOException {
+ // Nothing to do
+ }
+
+ @Override
+ public byte[] rpc(byte command, byte[] message) throws IOException {
+ try (PageantLibrary.Pipe pipe = lib
+ .createPipe(getClass().getSimpleName(),
+ getMaximumMessageLength())) {
+ prepareMessage(command, message);
+ pipe.send(message);
+ byte[] lengthBuf = new byte[4];
+ pipe.receive(lengthBuf);
+ int length = toLength(command, lengthBuf);
+ byte[] payload = new byte[length];
+ pipe.receive(payload);
+ return payload;
+ }
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantLibrary.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantLibrary.java
new file mode 100644
index 0000000000..9a30d804e7
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/PageantLibrary.java
@@ -0,0 +1,240 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.sun.jna.Memory;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.WinBase;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.platform.win32.WinDef.LPARAM;
+import com.sun.jna.platform.win32.WinDef.LRESULT;
+import com.sun.jna.platform.win32.WinNT;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinUser;
+
+/**
+ * The {@link PageantLibrary} encapsulates the shared memory access and provides
+ * a simple pipe abstraction.
+ */
+public final class PageantLibrary {
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(PageantLibrary.class);
+
+ /** Pageant's "class" and "window name". */
+ private static final String PAGEANT = "Pageant"; //$NON-NLS-1$
+
+ /**
+ * Magic constant from Pageant; ID for the CopyStruct used in SendMessage.
+ *
+ * @see <a href=
+ * "https://git.tartarus.org/?p=simon/putty.git;a=blob;f=windows/pageant.c;h=0e25cc5d48f0#l33">"random goop"</a>
+ */
+ private static final int PAGEANT_ID = 0x804e_50ba;
+
+ /**
+ * Determines whether Pageant is currently running.
+ *
+ * @return {@code true} if Pageant is running, {@code false} otherwise
+ */
+ boolean isPageantAvailable() {
+ LibraryHolder libs = LibraryHolder.getLibrary();
+ if (libs == null) {
+ return false;
+ }
+ HWND window = libs.user.FindWindow(PAGEANT, PAGEANT);
+ return window != null && !window.equals(WinBase.INVALID_HANDLE_VALUE);
+ }
+
+ /**
+ * An abstraction for a bi-directional pipe.
+ */
+ interface Pipe extends Closeable {
+
+ /**
+ * Send the given message.
+ *
+ * @param message
+ * to send
+ * @throws IOException
+ * on errors
+ */
+ void send(byte[] message) throws IOException;
+
+ /**
+ * Reads bytes from the pipe until {@code data} is full.
+ *
+ * @param data
+ * to read
+ * @throws IOException
+ * on errors
+ */
+ void receive(byte[] data) throws IOException;
+ }
+
+ /**
+ * Windows' COPYDATASTRUCT. Must be public for JNA.
+ */
+ public static class CopyStruct extends Structure {
+
+ /** Must be set the {@link #PAGEANT_ID}. */
+ public int dwData = PAGEANT_ID;
+
+ /** Data length; number of bytes in {@link #lpData}. */
+ public long cbData;
+
+ /** Points to {@link #cbData} bytes. */
+ public Pointer lpData;
+
+ @Override
+ protected List<String> getFieldOrder() {
+ return List.of("dwData", "cbData", "lpData"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
+
+ private static class PipeImpl implements Pipe {
+
+ private final LibraryHolder libs;
+
+ private final HWND window;
+
+ private final byte[] name;
+
+ private final HANDLE file;
+
+ private final Pointer memory;
+
+ private long readPos = 0;
+
+ PipeImpl(LibraryHolder libs, HWND window, String name, HANDLE file,
+ Pointer memory) {
+ this.libs = libs;
+ this.window = window;
+ this.name = name.getBytes(StandardCharsets.US_ASCII);
+ this.file = file;
+ this.memory = memory;
+ }
+
+ @Override
+ public void close() throws IOException {
+ PageantLibrary.close(libs, file, memory, false);
+ }
+
+ private Pointer init(CopyStruct c) {
+ c.cbData = name.length + 1;
+ c.lpData = new Memory(c.cbData);
+ c.lpData.write(0, name, 0, name.length);
+ c.lpData.setByte(name.length, (byte) 0);
+ c.write();
+ return c.getPointer();
+ }
+
+ @Override
+ public void send(byte[] message) throws IOException {
+ memory.write(0, message, 0, message.length);
+ CopyStruct c = new CopyStruct();
+ Pointer p = init(c);
+ LRESULT result = libs.user.SendMessage(window, WinUser.WM_COPYDATA,
+ null, new LPARAM(Pointer.nativeValue(p)));
+ if (result == null || result.longValue() == 0) {
+ throw new IOException(
+ libs.systemError(Texts.get().msgSendFailed2));
+ }
+ }
+
+ @Override
+ public void receive(byte[] data) throws IOException {
+ // Relies on Pageant handling the request synchronously, i.e.,
+ // SendMessage() above returning successfully only once Pageant
+ // has indeed written into the shared memory.
+ memory.read(readPos, data, 0, data.length);
+ readPos += data.length;
+ }
+ }
+
+ /**
+ * Creates a new {@link Pipe}.
+ *
+ * @param name
+ * for the pipe
+ * @param maxSize
+ * maximum size for messages
+ * @return the {@link Pipe}, or {@code null} if none created
+ * @throws IOException on errors
+ */
+ Pipe createPipe(String name, int maxSize) throws IOException {
+ LibraryHolder libs = LibraryHolder.getLibrary();
+ if (libs == null) {
+ throw new IllegalStateException("Libraries were not loaded"); //$NON-NLS-1$
+ }
+ HWND window = libs.user.FindWindow(PAGEANT, PAGEANT);
+ if (window == null || window.equals(WinBase.INVALID_HANDLE_VALUE)) {
+ throw new IOException(Texts.get().msgPageantUnavailable);
+ }
+ String fileName = name + libs.kernel.GetCurrentThreadId();
+ HANDLE file = null;
+ Pointer sharedMemory = null;
+ try {
+ file = libs.kernel.CreateFileMapping(WinBase.INVALID_HANDLE_VALUE,
+ null, WinNT.PAGE_READWRITE, 0, maxSize, fileName);
+ if (file == null || file.equals(WinBase.INVALID_HANDLE_VALUE)) {
+ throw new IOException(
+ libs.systemError(Texts.get().msgNoMappedFile));
+ }
+ sharedMemory = libs.kernel.MapViewOfFile(file,
+ WinNT.SECTION_MAP_WRITE, 0, 0, 0);
+ if (sharedMemory == null) {
+ throw new IOException(
+ libs.systemError(Texts.get().msgNoSharedMemory));
+ }
+ return new PipeImpl(libs, window, fileName, file, sharedMemory);
+ } catch (IOException e) {
+ close(libs, file, sharedMemory, true);
+ throw e;
+ } catch (Throwable e) {
+ close(libs, file, sharedMemory, true);
+ throw new IOException(Texts.get().msgSharedMemoryFailed, e);
+ }
+ }
+
+ private static void close(LibraryHolder libs, HANDLE file, Pointer memory,
+ boolean silent) throws IOException {
+ if (memory != null) {
+ if (!libs.kernel.UnmapViewOfFile(memory)) {
+ String msg = libs
+ .systemError(Texts.get().errReleaseSharedMemory);
+ if (silent) {
+ LOG.error(msg);
+ } else {
+ throw new IOException(msg);
+ }
+ }
+ }
+ if (file != null) {
+ if (!libs.kernel.CloseHandle(file)) {
+ String msg = libs.systemError(Texts.get().errCloseMappedFile);
+ if (silent) {
+ LOG.error(msg);
+ } else {
+ throw new IOException(msg);
+ }
+ }
+ }
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Sockets.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Sockets.java
new file mode 100644
index 0000000000..3d95bdb51c
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Sockets.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import java.nio.charset.Charset;
+
+import com.sun.jna.Structure;
+import com.sun.jna.Structure.FieldOrder;
+
+/**
+ * Common things for socket communication.
+ */
+public final class Sockets {
+
+ private Sockets() {
+ // No instantiation
+ }
+
+ /**
+ * Default SSH agent socket environment variable name.
+ */
+ public static final String ENV_SSH_AUTH_SOCK = "SSH_AUTH_SOCK"; //$NON-NLS-1$
+
+ /**
+ * Domain for Unix domain sockets.
+ */
+ public static final int AF_UNIX = 1;
+
+ /**
+ * Socket type for duplex sockets.
+ */
+ public static final int SOCK_STREAM = 1;
+
+ /**
+ * Default protocol selector.
+ */
+ public static final int DEFAULT_PROTOCOL = 0;
+
+ /**
+ * Very simple representation of the C SockAddr type.
+ */
+ @FieldOrder(value = { "sa_family", "sa_data" })
+ public static class SockAddr extends Structure {
+ // This is a "variable length struct" in C.
+
+ // Why 108 is apparently lost in time. But the file path for a Unix
+ // domain socket cannot be longer (including the terminating NUL).
+ private static final int MAX_DATA_LENGTH = 108;
+
+ /** Socket family */
+ public short sa_family = AF_UNIX;
+
+ /** Unix domain socket path. */
+ public byte[] sa_data = new byte[MAX_DATA_LENGTH];
+
+ /**
+ * Creates a new {@link SockAddr} for the given {@code path}.
+ *
+ * @param path
+ * for the Socket
+ * @param encoding
+ * to use to decode the {@code path} to a byte sequence
+ */
+ public SockAddr(String path, Charset encoding) {
+ byte[] bytes = path.getBytes(encoding);
+ int toCopy = Math.min(sa_data.length - 1, bytes.length);
+ System.arraycopy(bytes, 0, sa_data, 0, toCopy);
+ sa_data[toCopy] = 0;
+ }
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.java
new file mode 100644
index 0000000000..fb45b30dd2
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/Texts.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import org.eclipse.jgit.nls.NLS;
+import org.eclipse.jgit.nls.TranslationBundle;
+
+/**
+ * Externalized text messages for localization.
+ */
+public final class Texts extends TranslationBundle {
+
+ /**
+ * Get an instance of this translation bundle.
+ *
+ * @return an instance of this translation bundle
+ */
+ public static Texts get() {
+ return NLS.getBundleFor(Texts.class);
+ }
+
+ // @formatter:off
+ /***/ public String errCloseMappedFile;
+ /***/ public String errLastError;
+ /***/ public String errReleaseSharedMemory;
+ /***/ public String errUnknown;
+ /***/ public String logErrorLoadLibrary;
+ /***/ public String msgCloseFailed;
+ /***/ public String msgConnectFailed;
+ /***/ public String msgNoMappedFile;
+ /***/ public String msgNoSharedMemory;
+ /***/ public String msgPageantUnavailable;
+ /***/ public String msgReadFailed;
+ /***/ public String msgSendFailed;
+ /***/ public String msgSendFailed2;
+ /***/ public String msgSharedMemoryFailed;
+ /***/ public String msgShortRead;
+ /***/ public String pageant;
+ /***/ public String unixDefaultAgent;
+
+}
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixDomainSocketConnector.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixDomainSocketConnector.java
new file mode 100644
index 0000000000..3b75f3a7da
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixDomainSocketConnector.java
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import static org.eclipse.jgit.internal.transport.sshd.agent.connector.Sockets.AF_UNIX;
+import static org.eclipse.jgit.internal.transport.sshd.agent.connector.Sockets.DEFAULT_PROTOCOL;
+import static org.eclipse.jgit.internal.transport.sshd.agent.connector.Sockets.ENV_SSH_AUTH_SOCK;
+import static org.eclipse.jgit.internal.transport.sshd.agent.connector.Sockets.SOCK_STREAM;
+import static org.eclipse.jgit.internal.transport.sshd.agent.connector.UnixSockets.FD_CLOEXEC;
+import static org.eclipse.jgit.internal.transport.sshd.agent.connector.UnixSockets.F_SETFD;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.text.MessageFormat;
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.sshd.common.SshException;
+import org.eclipse.jgit.transport.sshd.agent.AbstractConnector;
+import org.eclipse.jgit.transport.sshd.agent.ConnectorFactory.ConnectorDescriptor;
+import org.eclipse.jgit.util.StringUtils;
+import org.eclipse.jgit.util.SystemReader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.sun.jna.LastErrorException;
+import com.sun.jna.Native;
+import com.sun.jna.platform.unix.LibCAPI;
+
+/**
+ * JNA-based implementation of communication through a Unix domain socket.
+ */
+public class UnixDomainSocketConnector extends AbstractConnector {
+
+ /**
+ * {@link ConnectorDescriptor} for the {@link UnixDomainSocketConnector}.
+ */
+ public static final ConnectorDescriptor DESCRIPTOR = new ConnectorDescriptor() {
+
+ @Override
+ public String getIdentityAgent() {
+ return ENV_SSH_AUTH_SOCK;
+ }
+
+ @Override
+ public String getDisplayName() {
+ return Texts.get().unixDefaultAgent;
+ }
+ };
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(UnixDomainSocketConnector.class);
+
+ private static UnixSockets library;
+
+ private static boolean libraryLoaded = false;
+
+ private static synchronized UnixSockets getLibrary() {
+ if (!libraryLoaded) {
+ libraryLoaded = true;
+ try {
+ library = Native.load(UnixSockets.LIBRARY_NAME, UnixSockets.class);
+ } catch (Exception | UnsatisfiedLinkError
+ | NoClassDefFoundError e) {
+ LOG.error(Texts.get().logErrorLoadLibrary, e);
+ }
+ }
+ return library;
+ }
+
+ private final String socketFile;
+
+ private AtomicBoolean connected = new AtomicBoolean();
+
+ private volatile int socketFd = -1;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param socketFile
+ * to use; if {@code null} or empty, use environment variable
+ * SSH_AUTH_SOCK
+ */
+ public UnixDomainSocketConnector(String socketFile) {
+ super();
+ String file = socketFile;
+ if (StringUtils.isEmptyOrNull(file)) {
+ file = SystemReader.getInstance().getenv(ENV_SSH_AUTH_SOCK);
+ }
+ this.socketFile = file;
+ }
+
+ @Override
+ public boolean connect() throws IOException {
+ if (StringUtils.isEmptyOrNull(socketFile)) {
+ return false;
+ }
+ int fd = socketFd;
+ synchronized (this) {
+ if (connected.get()) {
+ return true;
+ }
+ UnixSockets sockets = getLibrary();
+ if (sockets == null) {
+ return false;
+ }
+ try {
+ fd = sockets.socket(AF_UNIX, SOCK_STREAM, DEFAULT_PROTOCOL);
+ // OS X apparently doesn't have SOCK_CLOEXEC, so we can't set it
+ // atomically. Set it via fcntl, which exists on all systems
+ // we're interested in.
+ sockets.fcntl(fd, F_SETFD, FD_CLOEXEC);
+ Sockets.SockAddr sockAddr = new Sockets.SockAddr(socketFile,
+ StandardCharsets.UTF_8);
+ sockets.connect(fd, sockAddr, sockAddr.size());
+ connected.set(true);
+ } catch (LastErrorException e) {
+ if (fd >= 0) {
+ try {
+ sockets.close(fd);
+ } catch (LastErrorException e1) {
+ e.addSuppressed(e1);
+ }
+ }
+ throw new IOException(MessageFormat
+ .format(Texts.get().msgConnectFailed, socketFile), e);
+ }
+ }
+ socketFd = fd;
+ return connected.get();
+ }
+
+ @Override
+ public synchronized void close() throws IOException {
+ int fd = socketFd;
+ if (connected.getAndSet(false) && fd >= 0) {
+ socketFd = -1;
+ try {
+ getLibrary().close(fd);
+ } catch (LastErrorException e) {
+ throw new IOException(MessageFormat.format(
+ Texts.get().msgCloseFailed, Integer.toString(fd)), e);
+ }
+ }
+ }
+
+ @Override
+ public byte[] rpc(byte command, byte[] message) throws IOException {
+ prepareMessage(command, message);
+ int fd = socketFd;
+ if (!connected.get() || fd < 0) {
+ // No translation, internal error
+ throw new IllegalStateException("Not connected to SSH agent"); //$NON-NLS-1$
+ }
+ writeFully(fd, message);
+ // Now receive the reply
+ byte[] lengthBuf = new byte[4];
+ readFully(fd, lengthBuf);
+ int length = toLength(command, lengthBuf);
+ byte[] payload = new byte[length];
+ readFully(fd, payload);
+ return payload;
+ }
+
+ private void writeFully(int fd, byte[] message) throws IOException {
+ int toWrite = message.length;
+ try {
+ byte[] buf = message;
+ while (toWrite > 0) {
+ int written = getLibrary()
+ .write(fd, buf, new LibCAPI.size_t(buf.length))
+ .intValue();
+ if (written < 0) {
+ throw new IOException(
+ MessageFormat.format(Texts.get().msgSendFailed,
+ Integer.toString(message.length),
+ Integer.toString(toWrite)));
+ }
+ toWrite -= written;
+ if (written > 0 && toWrite > 0) {
+ buf = Arrays.copyOfRange(buf, written, buf.length);
+ }
+ }
+ } catch (LastErrorException e) {
+ throw new IOException(
+ MessageFormat.format(Texts.get().msgSendFailed,
+ Integer.toString(message.length),
+ Integer.toString(toWrite)),
+ e);
+ }
+ }
+
+ private void readFully(int fd, byte[] data) throws IOException {
+ int n = 0;
+ int offset = 0;
+ while (offset < data.length
+ && (n = read(fd, data, offset, data.length - offset)) > 0) {
+ offset += n;
+ }
+ if (offset < data.length) {
+ throw new SshException(
+ MessageFormat.format(Texts.get().msgShortRead,
+ Integer.toString(data.length),
+ Integer.toString(offset), Integer.toString(n)));
+ }
+ }
+
+ private int read(int fd, byte[] buffer, int offset, int length)
+ throws IOException {
+ try {
+ LibCAPI.size_t toRead = new LibCAPI.size_t(length);
+ if (offset == 0) {
+ return getLibrary().read(fd, buffer, toRead).intValue();
+ }
+ byte[] data = new byte[length];
+ int read = getLibrary().read(fd, data, toRead).intValue();
+ if (read > 0) {
+ System.arraycopy(data, 0, buffer, offset, read);
+ }
+ return read;
+ } catch (LastErrorException e) {
+ throw new IOException(
+ MessageFormat.format(Texts.get().msgReadFailed,
+ Integer.toString(length)),
+ e);
+ }
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java
new file mode 100644
index 0000000000..6f8153d000
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent.connector;
+
+import com.sun.jna.LastErrorException;
+import com.sun.jna.Library;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.unix.LibCAPI;
+
+/**
+ * Low-level Unix/Linux JNA socket API.
+ */
+interface UnixSockets extends LibCAPI, Library {
+
+ /**
+ * Library to load. These functions live in libc.
+ */
+ String LIBRARY_NAME = "c"; //$NON-NLS-1$
+
+ /**
+ * Command to set the close-on-exec flag on a file descriptor via
+ * {@link #fcntl(int, int, int)}.
+ */
+ int F_SETFD = 2;
+
+ /**
+ * Specifies that a file descriptor shall not be inherited by child
+ * processes.
+ */
+ int FD_CLOEXEC = 1;
+
+ /**
+ * Creates a socket and returns a file descriptor for it.
+ *
+ * @param domain
+ * socket domain; use {@link Sockets#AF_UNIX}
+ * @param type
+ * socket type; use {@link Sockets#SOCK_STREAM}
+ * @param protocol
+ * socket communication protocol; use
+ * {@link Sockets#DEFAULT_PROTOCOL}.
+ * @return file descriptor for the socket; should be closed eventually, or
+ * -1 on error.
+ * @throws LastErrorException
+ * on errors
+ * @see LibCAPI#close(int)
+ */
+ int socket(int domain, int type, int protocol) throws LastErrorException;
+
+ /**
+ * Simple binding to fcntl; used to set the FD_CLOEXEC flag. On OS X, we
+ * cannot include SOCK_CLOEXEC in the socket() call.
+ *
+ * @param fd
+ * file descriptor to operate on
+ * @param command
+ * set to {@link #F_SETFD}
+ * @param flag
+ * zero to clear the close-on-exec flag, {@link #FD_CLOEXEC} to
+ * set it
+ * @return -1 on error, otherwise a value >= 0
+ * @throws LastErrorException
+ */
+ int fcntl(int fd, int command, int flag) throws LastErrorException;
+
+ /**
+ * Connects a file descriptor, which must refer to a socket, to a
+ * {@link Sockets.SockAddr}.
+ *
+ * @param fd
+ * file descriptor of the socket, as returned by
+ * {@link #socket(int, int, int)}
+ * @param addr
+ * address to connect to
+ * @param addrLen
+ * Length of {@code addr}, use {@link Structure#size()}
+ * @return 0 on success; -1 otherwise
+ * @throws LastErrorException
+ * on errors
+ */
+ int connect(int fd, Sockets.SockAddr addr, int addrLen)
+ throws LastErrorException;
+
+ /**
+ * Read data from a file descriptor.
+ *
+ * @param fd
+ * file descriptor to read from
+ * @param buf
+ * buffer to read into
+ * @param bufLen
+ * maximum number of bytes to read; at most length of {@code buf}
+ * @return number of bytes actually read; zero for EOF, -1 on error
+ * @throws LastErrorException
+ * on errors
+ */
+ LibCAPI.ssize_t read(int fd, byte[] buf, LibCAPI.size_t bufLen)
+ throws LastErrorException;
+
+ /**
+ * Write data to a file descriptor.
+ *
+ * @param fd
+ * file descriptor to write to
+ * @param data
+ * data to write
+ * @param dataLen
+ * number of bytes to write
+ * @return number of bytes actually written; -1 on error
+ * @throws LastErrorException
+ * on errors
+ */
+ LibCAPI.ssize_t write(int fd, byte[] data, LibCAPI.size_t dataLen)
+ throws LastErrorException;
+}
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 b9a7ba9dc9..df99ea3cfd 100644
--- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ssh.apache.test
Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.test
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -21,15 +21,16 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.7.0,2.8.0)",
org.apache.sshd.core;version="[2.7.0,2.8.0)",
org.apache.sshd.server;version="[2.7.0,2.8.0)",
org.apache.sshd.server.forward;version="[2.7.0,2.8.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.transport.sshd.proxy;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit.ssh;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.sshd;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit.ssh;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.sshd;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.sshd.agent;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.hamcrest;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.experimental.theories;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.ssh.apache.test/pom.xml b/org.eclipse.jgit.ssh.apache.test/pom.xml
index 994fca1fc5..55a975188b 100644
--- a/org.eclipse.jgit.ssh.apache.test/pom.xml
+++ b/org.eclipse.jgit.ssh.apache.test/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshProtocol2Test.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshProtocol2Test.java
index 0ad96b9acf..eef0402b07 100644
--- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshProtocol2Test.java
+++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshProtocol2Test.java
@@ -26,12 +26,15 @@ public class ApacheSshProtocol2Test extends SshBasicTestBase {
@Override
protected SshSessionFactory createSessionFactory() {
- SshdSessionFactory result = new SshdSessionFactory(new JGitKeyCache(),
- null);
- // The home directory is mocked at this point!
- result.setHomeDirectory(FS.DETECTED.userHome());
- result.setSshDirectory(sshDir);
- return result;
+ return new SshdSessionFactoryBuilder()
+ // No proxies in tests
+ .setProxyDataFactory(null)
+ // No ssh-agent in tests
+ .setConnectorFactory(null)
+ // The home directory is mocked at this point!
+ .setHomeDirectory(FS.DETECTED.userHome())
+ .setSshDirectory(sshDir)
+ .build(new JGitKeyCache());
}
@Override
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 c1f5fef3cd..ccaf98ced0 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
@@ -65,12 +65,15 @@ public class ApacheSshTest extends SshTestBase {
@Override
protected SshSessionFactory createSessionFactory() {
- SshdSessionFactory result = new SshdSessionFactory(new JGitKeyCache(),
- null);
- // The home directory is mocked at this point!
- result.setHomeDirectory(FS.DETECTED.userHome());
- result.setSshDirectory(sshDir);
- return result;
+ return new SshdSessionFactoryBuilder()
+ // No proxies in tests
+ .setProxyDataFactory(null)
+ // No ssh-agent in tests
+ .setConnectorFactory(null)
+ // The home directory is mocked at this point!
+ .setHomeDirectory(FS.DETECTED.userHome())
+ .setSshDirectory(sshDir)
+ .build(new JGitKeyCache());
}
@Override
@@ -352,6 +355,21 @@ public class ApacheSshTest extends SshTestBase {
}
@Test
+ public void testJumpHostNone() throws Exception {
+ // Should not try to go through the non-existing proxy
+ cloneWith("ssh://server/doesntmatter", defaultCloneDir, null, //
+ "Host server", //
+ "HostName localhost", //
+ "Port " + testPort, //
+ "User " + TEST_USER, //
+ "IdentityFile " + privateKey1.getAbsolutePath(), //
+ "ProxyJump none", //
+ "", //
+ "Host *", //
+ "ProxyJump " + TEST_USER + "@localhost:1234");
+ }
+
+ @Test
public void testJumpHostWrongKeyAtProxy() throws Exception {
// Test that we find the proxy server's URI in the exception message
SshdSocketAddress[] forwarded = { null };
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 9d64adc95e..fd51e0cf47 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
@@ -50,6 +50,10 @@ public class NoFilesSshBuilderTest extends SshTestHarness {
@Override
protected SshSessionFactory createSessionFactory() {
return new SshdSessionFactoryBuilder() //
+ // No proxies in tests
+ .setProxyDataFactory(null)
+ // No ssh-agent in tests
+ .setConnectorFactory(null)
.setConfigStoreFactory((h, f, u) -> null)
.setDefaultKeysProvider(f -> new KeyAuthenticator())
.setServerKeyDatabase((h, s) -> new ServerKeyDatabase() {
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 7b6e508c31..04c1c605d8 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
@@ -33,6 +33,7 @@ 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.sshd.agent.ConnectorFactory;
import org.eclipse.jgit.util.FS;
import org.junit.After;
import org.junit.Test;
@@ -81,6 +82,12 @@ public class NoFilesSshTest extends SshTestHarness {
}
@Override
+ protected ConnectorFactory getConnectorFactory() {
+ // No ssh-agent in tests
+ return null;
+ }
+
+ @Override
protected Iterable<KeyPair> getDefaultKeys(File dir) {
// This would work for this simple test case:
// return Collections.singletonList(testUserKey);
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
index 1f48841bc3..d874c73bc9 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
@@ -6,9 +6,9 @@ Bundle-SymbolicName: org.eclipse.jgit.ssh.apache
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.0.0";x-internal:=true;
+Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.1.0";x-internal:=true;
uses:="org.apache.sshd.client,
org.apache.sshd.client.auth,
org.apache.sshd.client.auth.keyboard,
@@ -23,15 +23,17 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.0.0";x-inter
org.apache.sshd.common.signature,
org.apache.sshd.common.util.buffer,
org.eclipse.jgit.transport",
- org.eclipse.jgit.internal.transport.sshd.auth;version="6.0.0";x-internal:=true,
- org.eclipse.jgit.internal.transport.sshd.proxy;version="6.0.0";x-friends:="org.eclipse.jgit.ssh.apache.test",
- org.eclipse.jgit.transport.sshd;version="6.0.0";
+ org.eclipse.jgit.internal.transport.sshd.agent;version="6.1.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.sshd.auth;version="6.1.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="6.1.0";x-friends:="org.eclipse.jgit.ssh.apache.test",
+ org.eclipse.jgit.transport.sshd;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.apache.sshd.client.config.hosts,
org.apache.sshd.common.keyprovider,
org.eclipse.jgit.util,
org.apache.sshd.client.session,
- org.apache.sshd.client.keyverifier"
+ org.apache.sshd.client.keyverifier",
+ org.eclipse.jgit.transport.sshd.agent;version="6.1.0"
Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)",
org.apache.sshd.agent;version="[2.7.0,2.8.0)",
org.apache.sshd.client;version="[2.7.0,2.8.0)",
@@ -71,6 +73,7 @@ Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)",
org.apache.sshd.common.util.buffer;version="[2.7.0,2.8.0)",
org.apache.sshd.common.util.closeable;version="[2.7.0,2.8.0)",
org.apache.sshd.common.util.io;version="[2.7.0,2.8.0)",
+ org.apache.sshd.common.util.io.functors;version="[2.7.0,2.8.0)",
org.apache.sshd.common.util.io.resource;version="[2.7.0,2.8.0)",
org.apache.sshd.common.util.logging;version="[2.7.0,2.8.0)",
org.apache.sshd.common.util.net;version="[2.7.0,2.8.0)",
@@ -80,12 +83,12 @@ Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)",
org.apache.sshd.sftp;version="[2.7.0,2.8.0)",
org.apache.sshd.sftp.client;version="[2.7.0,2.8.0)",
org.apache.sshd.sftp.common;version="[2.7.0,2.8.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.fnmatch;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.fnmatch;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.slf4j;version="[1.7.0,2.0.0)"
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF
index f4eac25e08..3de224288a 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.ssh.apache - Sources
Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.apache/README.md b/org.eclipse.jgit.ssh.apache/README.md
new file mode 100644
index 0000000000..cba87ac9cc
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/README.md
@@ -0,0 +1,61 @@
+# JGit SSH support via Apache MINA sshd
+
+This bundle provides an implementation of git transport over SSH implemented via
+[Apache MINA sshd](https://mina.apache.org/sshd-project/).
+
+## Service registration
+
+This bundle declares a service for the `java.util.ServiceLoader` for interface
+`org.eclipse.jgit.transport.ssh.SshSessionFactory`. The core JGit bundle uses the service
+loader to pick up an implementation of that interface.
+
+Note that JGit simply uses the first `SshSessionFactory` provided by the `ServiceLoader`.
+
+If the service loader cannot find the session factory, either ensure that the service
+declaration is on the Classpath of bundle `org.eclipse.jgit`, or set the factory explicitly
+(see below).
+
+In an OSGi environment, one might need a service loader bridge, or have a little OSGi
+fragment for bundle `org.eclipse.jgit` that puts the right service declaration onto the
+Classpath of that bundle. (OSGi fragments become part of the Classpath of their host
+bundle.)
+
+## Configuring an SSH implementation for JGit
+
+The simplest way to set an SSH implementation for JGit is to install it globally via
+`SshSessionFactory.setInstance()`. This instance will be used by JGit for all SSH
+connections by default.
+
+It is also possible to set the SSH implementation individually for any git command
+that needs a transport (`TransportCommand`) via a `org.eclipse.jgit.api.TransportConfigCallback`.
+
+To do so, set the wanted `SshSessionFactory` on the SSH transport, like:
+
+```java
+SshSessionFactory customFactory = ...; // Get it from wherever
+FetchCommand fetch = git.fetch()
+ .setTransportConfigCallback(transport -> {
+ if (transport instanceof SshTransport) {
+ ((SshTransport) transport).setSshSessionFactory(customFactory);
+ }
+ })
+ ...
+ .call();
+```
+
+## Using a different SSH implementation
+
+To use a different SSH implementation:
+
+* Do not include this bundle in your product.
+* Include the bundle of the alternate implementation.
+ * If the service loader finds the alternate implementation, nothing more is needed.
+ * Otherwise ensure the service declaration from the other bundle is on the Classpath of bundle `org.eclipse.jgit`,
+ * or set the `SshSessionFactory` for JGit explicitly (see above).
+
+## Using an external SSH executable
+
+JGit has built-in support for not using any Java SSH implementation but an external SSH
+executable. To use an external SSH executable, set environment variable **GIT_SSH** to
+the path of the executable. JGit will create a sub-process to run the executable and
+communicate with this sub-process to perform the git operation.
diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml
index 6027a20955..ea17425124 100644
--- a/org.eclipse.jgit.ssh.apache/pom.xml
+++ b/org.eclipse.jgit.ssh.apache/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
@@ -105,15 +105,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>process-classes</phase>
- <goals>
- <goal>jar</goal>
- </goals>
+ <artifactId>maven-source-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
<configuration>
<archive>
<manifestFile>${source-bundle-manifest}</manifestFile>
diff --git a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties
index defcbdcfc1..2bba736aad 100644
--- a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties
+++ b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties
@@ -19,6 +19,7 @@ identityFileNoKey=No keys found in identity {0}
identityFileMultipleKeys=Multiple key pairs found in identity {0}
identityFileNotFound=Skipping identity ''{0}'': file not found
identityFileUnsupportedFormat=Unsupported format in identity {0}
+invalidSignatureAlgorithm=Signature algorithm ''{0}'' is not valid for a key of type ''{1}''
kexServerKeyInvalid=Server key did not validate
keyEncryptedMsg=Key ''{0}'' is encrypted. Enter the passphrase to decrypt it.
keyEncryptedPrompt=Passphrase
@@ -84,6 +85,10 @@ serverIdTooLong=Server identification is longer than 255 characters (including l
serverIdWithNul=Server identification contains a NUL character: {0}
sessionCloseFailed=Closing the session failed
sessionWithoutUsername=SSH session created without user name; cannot authenticate
+sshAgentReplyLengthError=Invalid SSH agent reply message length {0} after command {1}
+sshAgentReplyUnexpected=Unexpected reply from ssh-agent: {0}
+sshAgentShortReadBuffer=Short read from SSH agent
+sshAgentWrongNumberOfKeys=Invalid number of SSH agent keys: {0}
sshClosingDown=Apache MINA sshd session factory is closing down; cannot create new ssh sessions on this factory
sshCommandTimeout={0} timed out after {1} seconds while opening the channel
sshProcessStillRunning={0} is not yet completed, cannot get exit code
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java
index f7b37d7816..e2dbb4c466 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java
@@ -71,9 +71,9 @@ public class JGitClientSession extends ClientSessionImpl {
/**
* Default setting for the maximum number of bytes to read in the initial
- * protocol version exchange. 64kb is what OpenSSH < 8.0 read; OpenSSH 8.0
- * changed it to 8Mb, but that seems excessive for the purpose stated in RFC
- * 4253. The Apache MINA sshd default in
+ * protocol version exchange. 64kb is what OpenSSH &lt; 8.0 read; OpenSSH
+ * 8.0 changed it to 8Mb, but that seems excessive for the purpose stated in
+ * RFC 4253. The Apache MINA sshd default in
* {@link org.apache.sshd.core.CoreModuleProperties#MAX_IDENTIFICATION_SIZE}
* is 16kb.
*/
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
index 08da18f5aa..c082a9a963 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
@@ -12,8 +12,12 @@ package org.eclipse.jgit.internal.transport.sshd;
import static java.text.MessageFormat.format;
import static org.eclipse.jgit.transport.SshConstants.PUBKEY_ACCEPTED_ALGORITHMS;
+import java.util.Iterator;
import java.util.List;
+import java.util.NoSuchElementException;
+import org.apache.sshd.client.auth.pubkey.KeyAgentIdentity;
+import org.apache.sshd.client.auth.pubkey.PublicKeyIdentity;
import org.apache.sshd.client.auth.pubkey.UserAuthPublicKey;
import org.apache.sshd.client.config.hosts.HostConfigEntry;
import org.apache.sshd.client.session.ClientSession;
@@ -38,7 +42,7 @@ public class JGitPublicKeyAuthentication extends UserAuthPublicKey {
throw new IllegalStateException("Wrong session type: " //$NON-NLS-1$
+ rawSession.getClass().getCanonicalName());
}
- JGitClientSession session = ((JGitClientSession) rawSession);
+ JGitClientSession session = (JGitClientSession) rawSession;
HostConfigEntry hostConfig = session.getHostConfigEntry();
// Set signature algorithms for public key authentication
String pubkeyAlgos = hostConfig.getProperty(PUBKEY_ACCEPTED_ALGORITHMS);
@@ -60,5 +64,48 @@ public class JGitPublicKeyAuthentication extends UserAuthPublicKey {
// If we don't set signature factories here, the default ones from the
// session will be used.
super.init(session, service);
+ // In sshd 2.7.0, we end up now with a key iterator that uses keys
+ // provided by an ssh-agent even if IdentitiesOnly is true. So if
+ // needed, filter out any KeyAgentIdentity.
+ if (hostConfig.isIdentitiesOnly()) {
+ Iterator<PublicKeyIdentity> original = keys;
+ // The original iterator will already have gotten the identities
+ // from the agent. Unfortunately there's nothing we can do about
+ // that; it'll have to be fixed upstream. (As will, ultimately,
+ // respecting isIdentitiesOnly().) At least we can simply not
+ // use the keys the agent provided.
+ //
+ // See https://issues.apache.org/jira/browse/SSHD-1218
+ keys = new Iterator<>() {
+
+ private PublicKeyIdentity value;
+
+ @Override
+ public boolean hasNext() {
+ if (value != null) {
+ return true;
+ }
+ PublicKeyIdentity next = null;
+ while (original.hasNext()) {
+ next = original.next();
+ if (!(next instanceof KeyAgentIdentity)) {
+ value = next;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public PublicKeyIdentity next() {
+ if (hasNext()) {
+ PublicKeyIdentity result = value;
+ value = null;
+ return result;
+ }
+ throw new NoSuchElementException();
+ }
+ };
+ }
}
}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java
index 32819aea21..71e8e61585 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java
@@ -32,8 +32,10 @@ import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
+import java.util.function.Supplier;
import java.util.stream.Collectors;
+import org.apache.sshd.agent.SshAgentFactory;
import org.apache.sshd.client.SshClient;
import org.apache.sshd.client.config.hosts.HostConfigEntry;
import org.apache.sshd.client.future.ConnectFuture;
@@ -100,6 +102,8 @@ public class JGitSshClient extends SshClient {
private ProxyDataFactory proxyDatabase;
+ private Supplier<SshAgentFactory> agentFactorySupplier = () -> null;
+
@Override
protected SessionFactory createSessionFactory() {
// Override the parent's default
@@ -368,6 +372,22 @@ public class JGitSshClient extends SshClient {
return credentialsProvider;
}
+ @Override
+ public SshAgentFactory getAgentFactory() {
+ return agentFactorySupplier.get();
+ }
+
+ @Override
+ protected void checkConfig() {
+ // The super class requires channel factories for agent forwarding if a
+ // factory for an SSH agent is set. We haven't implemented this yet, and
+ // we don't do SSH agent forwarding for now. Unfortunately, there is no
+ // way to bypass this check in the super class except making
+ // getAgentFactory() return null until after the check.
+ super.checkConfig();
+ agentFactorySupplier = super::getAgentFactory;
+ }
+
/**
* A {@link SessionFactory} to create our own specialized
* {@link JGitClientSession}s.
@@ -439,7 +459,7 @@ public class JGitSshClient extends SshClient {
@Override
public KeyPair next() {
- if (hasElement == null && !hasNext()
+ if ((hasElement == null && !hasNext())
|| !hasElement.booleanValue()) {
throw new NoSuchElementException();
}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java
index 85e406f422..d8bf449acf 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java
@@ -34,6 +34,7 @@ import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Random;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier;
@@ -138,6 +139,8 @@ public class OpenSshServerKeyDatabase
private final List<HostKeyFile> defaultFiles = new ArrayList<>();
+ private Random prng;
+
/**
* Creates a new {@link OpenSshServerKeyDatabase}.
*
@@ -680,7 +683,9 @@ public class OpenSshServerKeyDatabase
// or to Apache MINA sshd.
NamedFactory<Mac> digester = KnownHostDigest.SHA1;
Mac mac = digester.create();
- SecureRandom prng = new SecureRandom();
+ if (prng == null) {
+ prng = new SecureRandom();
+ }
byte[] salt = new byte[mac.getDefaultBlockSize()];
for (SshdSocketAddress address : patterns) {
if (result.length() > 0) {
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java
index c0f5719629..00ee62d6dd 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java
@@ -1,3 +1,12 @@
+/*
+ * Copyright (C) 2018, 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
package org.eclipse.jgit.internal.transport.sshd;
import org.eclipse.jgit.nls.NLS;
@@ -39,6 +48,7 @@ public final class SshdText extends TranslationBundle {
/***/ public String identityFileMultipleKeys;
/***/ public String identityFileNotFound;
/***/ public String identityFileUnsupportedFormat;
+ /***/ public String invalidSignatureAlgorithm;
/***/ public String kexServerKeyInvalid;
/***/ public String keyEncryptedMsg;
/***/ public String keyEncryptedPrompt;
@@ -96,6 +106,10 @@ public final class SshdText extends TranslationBundle {
/***/ public String serverIdWithNul;
/***/ public String sessionCloseFailed;
/***/ public String sessionWithoutUsername;
+ /***/ public String sshAgentReplyLengthError;
+ /***/ public String sshAgentReplyUnexpected;
+ /***/ public String sshAgentShortReadBuffer;
+ /***/ public String sshAgentWrongNumberOfKeys;
/***/ public String sshClosingDown;
/***/ public String sshCommandTimeout;
/***/ public String sshProcessStillRunning;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/ConnectorFactoryProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/ConnectorFactoryProvider.java
new file mode 100644
index 0000000000..aba7a76459
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/ConnectorFactoryProvider.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent;
+
+import java.util.Iterator;
+import java.util.ServiceLoader;
+
+import org.eclipse.jgit.transport.sshd.agent.ConnectorFactory;
+
+/**
+ * Provides a {@link ConnectorFactory} obtained via the {@link ServiceLoader}.
+ */
+public final class ConnectorFactoryProvider {
+
+ private static volatile ConnectorFactory INSTANCE = loadDefaultFactory();
+
+ private static ConnectorFactory loadDefaultFactory() {
+ ServiceLoader<ConnectorFactory> loader = ServiceLoader
+ .load(ConnectorFactory.class);
+ Iterator<ConnectorFactory> iter = loader.iterator();
+ while (iter.hasNext()) {
+ ConnectorFactory candidate = iter.next();
+ if (candidate.isSupported()) {
+ return candidate;
+ }
+ }
+ return null;
+
+ }
+
+ /**
+ * Retrieves the currently set default {@link ConnectorFactory}.
+ *
+ * @return the {@link ConnectorFactory}, or {@code null} if none.
+ */
+ public static ConnectorFactory getDefaultFactory() {
+ return INSTANCE;
+ }
+
+ /**
+ * Sets the default {@link ConnectorFactory}.
+ *
+ * @param factory
+ * {@link ConnectorFactory} to use, or {@code null} to use the
+ * factory discovered via the {@link ServiceLoader}.
+ */
+ public static void setDefaultFactory(ConnectorFactory factory) {
+ INSTANCE = factory == null ? loadDefaultFactory() : factory;
+ }
+
+ private ConnectorFactoryProvider() {
+ // No instantiation
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/JGitSshAgentFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/JGitSshAgentFactory.java
new file mode 100644
index 0000000000..1ed2ab9d78
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/JGitSshAgentFactory.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.sshd.agent.SshAgent;
+import org.apache.sshd.agent.SshAgentFactory;
+import org.apache.sshd.agent.SshAgentServer;
+import org.apache.sshd.common.FactoryManager;
+import org.apache.sshd.common.channel.ChannelFactory;
+import org.apache.sshd.common.session.ConnectionService;
+import org.eclipse.jgit.annotations.NonNull;
+import org.eclipse.jgit.transport.sshd.agent.ConnectorFactory;
+
+/**
+ * A factory for creating {@link SshAgentClient}s.
+ */
+public class JGitSshAgentFactory implements SshAgentFactory {
+
+ private final @NonNull ConnectorFactory factory;
+
+ private final File homeDir;
+
+ /**
+ * Creates a new {@link JGitSshAgentFactory}.
+ *
+ * @param factory
+ * {@link JGitSshAgentFactory} to wrap
+ * @param homeDir
+ * for obtaining the current local user's home directory
+ */
+ public JGitSshAgentFactory(@NonNull ConnectorFactory factory,
+ File homeDir) {
+ this.factory = factory;
+ this.homeDir = homeDir;
+ }
+
+ @Override
+ public List<ChannelFactory> getChannelForwardingFactories(
+ FactoryManager manager) {
+ // No agent forwarding supported yet.
+ return Collections.emptyList();
+ }
+
+ @Override
+ public SshAgent createClient(FactoryManager manager) throws IOException {
+ // sshd 2.8.0 will pass us the session here. At that point, we can get
+ // the HostConfigEntry and extract and handle the IdentityAgent setting.
+ // For now, pass null to let the ConnectorFactory do its default
+ // behavior (Pageant on Windows, SSH_AUTH_SOCK on Unixes with the
+ // jgit-builtin factory).
+ return new SshAgentClient(factory.create(null, homeDir));
+ }
+
+ @Override
+ public SshAgentServer createServer(ConnectionService service)
+ throws IOException {
+ // This should be called in a server only.
+ return null;
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java
new file mode 100644
index 0000000000..08483e4c20
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java
@@ -0,0 +1,246 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd.agent;
+
+import java.io.IOException;
+import java.security.KeyPair;
+import java.security.PublicKey;
+import java.text.MessageFormat;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.sshd.agent.SshAgent;
+import org.apache.sshd.agent.SshAgentConstants;
+import org.apache.sshd.common.SshException;
+import org.apache.sshd.common.config.keys.KeyUtils;
+import org.apache.sshd.common.session.SessionContext;
+import org.apache.sshd.common.util.buffer.Buffer;
+import org.apache.sshd.common.util.buffer.BufferException;
+import org.apache.sshd.common.util.buffer.BufferUtils;
+import org.apache.sshd.common.util.buffer.ByteArrayBuffer;
+import org.eclipse.jgit.internal.transport.sshd.SshdText;
+import org.eclipse.jgit.transport.sshd.agent.Connector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A client for an SSH2 agent. This client supports only querying identities and
+ * signature requests.
+ *
+ * @see <a href="https://tools.ietf.org/html/draft-miller-ssh-agent-04">SSH
+ * Agent Protocol, RFC draft</a>
+ */
+public class SshAgentClient implements SshAgent {
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(SshAgentClient.class);
+
+ // OpenSSH limit
+ private static final int MAX_NUMBER_OF_KEYS = 2048;
+
+ private final AtomicBoolean closed = new AtomicBoolean();
+
+ private final Connector connector;
+
+ /**
+ * Creates a new {@link SshAgentClient} implementing the SSH2 ssh agent
+ * protocol, using the given {@link Connector} to connect to the SSH agent
+ * and to exchange messages.
+ *
+ * @param connector
+ * {@link Connector} to use
+ */
+ public SshAgentClient(Connector connector) {
+ this.connector = connector;
+ }
+
+ private boolean open(boolean debugging) throws IOException {
+ if (closed.get()) {
+ if (debugging) {
+ LOG.debug("SSH agent connection already closed"); //$NON-NLS-1$
+ }
+ return false;
+ }
+ boolean connected = connector != null && connector.connect();
+ if (!connected) {
+ if (debugging) {
+ LOG.debug("No SSH agent (SSH_AUTH_SOCK not set)"); //$NON-NLS-1$
+ }
+ }
+ return connected;
+ }
+
+ @Override
+ public void close() throws IOException {
+ if (!closed.getAndSet(true) && connector != null) {
+ connector.close();
+ }
+ }
+
+ @Override
+ public Iterable<? extends Map.Entry<PublicKey, String>> getIdentities()
+ throws IOException {
+ boolean debugging = LOG.isDebugEnabled();
+ if (!open(debugging)) {
+ return Collections.emptyList();
+ }
+ if (debugging) {
+ LOG.debug("Requesting identities from SSH agent"); //$NON-NLS-1$
+ }
+ try {
+ Buffer reply = rpc(
+ SshAgentConstants.SSH2_AGENTC_REQUEST_IDENTITIES);
+ byte cmd = reply.getByte();
+ if (cmd != SshAgentConstants.SSH2_AGENT_IDENTITIES_ANSWER) {
+ throw new SshException(MessageFormat.format(
+ SshdText.get().sshAgentReplyUnexpected,
+ SshAgentConstants.getCommandMessageName(cmd)));
+ }
+ int numberOfKeys = reply.getInt();
+ if (numberOfKeys < 0 || numberOfKeys > MAX_NUMBER_OF_KEYS) {
+ throw new SshException(MessageFormat.format(
+ SshdText.get().sshAgentWrongNumberOfKeys,
+ Integer.toString(numberOfKeys)));
+ }
+ if (numberOfKeys == 0) {
+ if (debugging) {
+ LOG.debug("SSH agent has no keys"); //$NON-NLS-1$
+ }
+ return Collections.emptyList();
+ }
+ if (debugging) {
+ LOG.debug("Got {} key(s) from the SSH agent", //$NON-NLS-1$
+ Integer.toString(numberOfKeys));
+ }
+ boolean tracing = LOG.isTraceEnabled();
+ List<Map.Entry<PublicKey, String>> keys = new ArrayList<>(
+ numberOfKeys);
+ for (int i = 0; i < numberOfKeys; i++) {
+ PublicKey key = reply.getPublicKey();
+ String comment = reply.getString();
+ if (tracing) {
+ LOG.trace("Got SSH agent {} key: {} {}", //$NON-NLS-1$
+ KeyUtils.getKeyType(key),
+ KeyUtils.getFingerPrint(key), comment);
+ }
+ keys.add(new AbstractMap.SimpleImmutableEntry<>(key, comment));
+ }
+ return keys;
+ } catch (BufferException e) {
+ throw new SshException(SshdText.get().sshAgentShortReadBuffer, e);
+ }
+ }
+
+ @Override
+ public Map.Entry<String, byte[]> sign(SessionContext session, PublicKey key,
+ String algorithm, byte[] data) throws IOException {
+ boolean debugging = LOG.isDebugEnabled();
+ String keyType = KeyUtils.getKeyType(key);
+ String signatureAlgorithm;
+ if (algorithm != null) {
+ if (!KeyUtils.getCanonicalKeyType(algorithm).equals(keyType)) {
+ throw new IllegalArgumentException(MessageFormat.format(
+ SshdText.get().invalidSignatureAlgorithm, algorithm,
+ keyType));
+ }
+ signatureAlgorithm = algorithm;
+ } else {
+ signatureAlgorithm = keyType;
+ }
+ if (!open(debugging)) {
+ return null;
+ }
+ int flags = 0;
+ switch (signatureAlgorithm) {
+ case KeyUtils.RSA_SHA512_KEY_TYPE_ALIAS:
+ case KeyUtils.RSA_SHA512_CERT_TYPE_ALIAS:
+ flags = 4;
+ break;
+ case KeyUtils.RSA_SHA256_KEY_TYPE_ALIAS:
+ case KeyUtils.RSA_SHA256_CERT_TYPE_ALIAS:
+ flags = 2;
+ break;
+ default:
+ break;
+ }
+ ByteArrayBuffer msg = new ByteArrayBuffer();
+ msg.putInt(0);
+ msg.putByte(SshAgentConstants.SSH2_AGENTC_SIGN_REQUEST);
+ msg.putPublicKey(key);
+ msg.putBytes(data);
+ msg.putInt(flags);
+ if (debugging) {
+ LOG.debug(
+ "sign({}): signing request to SSH agent for {} key, {} signature; flags={}", //$NON-NLS-1$
+ session, keyType, signatureAlgorithm,
+ Integer.toString(flags));
+ }
+ Buffer reply = rpc(SshAgentConstants.SSH2_AGENTC_SIGN_REQUEST,
+ msg.getCompactData());
+ byte cmd = reply.getByte();
+ if (cmd != SshAgentConstants.SSH2_AGENT_SIGN_RESPONSE) {
+ throw new SshException(
+ MessageFormat.format(SshdText.get().sshAgentReplyUnexpected,
+ SshAgentConstants.getCommandMessageName(cmd)));
+ }
+ try {
+ Buffer signatureReply = new ByteArrayBuffer(reply.getBytes());
+ String actualAlgorithm = signatureReply.getString();
+ byte[] signature = signatureReply.getBytes();
+ if (LOG.isTraceEnabled()) {
+ LOG.trace(
+ "sign({}): signature reply from SSH agent for {} key: {} signature={}", //$NON-NLS-1$
+ session, keyType, actualAlgorithm,
+ BufferUtils.toHex(':', signature));
+
+ } else if (LOG.isDebugEnabled()) {
+ LOG.debug(
+ "sign({}): signature reply from SSH agent for {} key, {} signature", //$NON-NLS-1$
+ session, keyType, actualAlgorithm);
+ }
+ return new AbstractMap.SimpleImmutableEntry<>(actualAlgorithm,
+ signature);
+ } catch (BufferException e) {
+ throw new SshException(SshdText.get().sshAgentShortReadBuffer, e);
+ }
+ }
+
+ private Buffer rpc(byte command, byte[] message) throws IOException {
+ return new ByteArrayBuffer(connector.rpc(command, message));
+ }
+
+ private Buffer rpc(byte command) throws IOException {
+ return new ByteArrayBuffer(connector.rpc(command));
+ }
+
+ @Override
+ public boolean isOpen() {
+ return !closed.get();
+ }
+
+ @Override
+ public void addIdentity(KeyPair key, String comment) throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeIdentity(PublicKey key) throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeAllIdentities() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java
index eae0d75355..e5f884e299 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java
@@ -95,8 +95,8 @@ public abstract class BasicAuthentication<ParameterType, TokenType>
@Override
public final void start() throws Exception {
- if (user != null && !user.isEmpty()
- || password != null && password.length > 0) {
+ if ((user != null && !user.isEmpty())
+ || (password != null && password.length > 0)) {
return;
}
askCredentials();
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
index 54e2cbcebf..a8e33af35e 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/AbstractClientProxyConnector.java
@@ -31,7 +31,7 @@ public abstract class AbstractClientProxyConnector
.toMillis(30L);
/** Guards {@link #done} and {@link #bufferedCommands}. */
- private Object lock = new Object();
+ private final Object lock = new Object();
private boolean done;
@@ -105,7 +105,7 @@ public abstract class AbstractClientProxyConnector
/**
* Obtains the timeout for the whole rest of the proxy connection protocol.
*
- * @return the timeout in milliseconds, always > 0L
+ * @return the timeout in milliseconds, always &gt; 0L
*/
protected long getTimeout() {
long last = lastProxyOperationTime;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpClientConnector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpClientConnector.java
index e5d1e80f74..b7deb29dc4 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpClientConnector.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpClientConnector.java
@@ -113,8 +113,8 @@ public class HttpClientConnector extends AbstractClientProxyConnector {
IoSession session = sshSession.getIoSession();
session.addCloseFutureListener(f -> close());
StringBuilder msg = connect();
- if (proxyUser != null && !proxyUser.isEmpty()
- || proxyPassword != null && proxyPassword.length > 0) {
+ if ((proxyUser != null && !proxyUser.isEmpty())
+ || (proxyPassword != null && proxyPassword.length > 0)) {
authenticator = basic;
basic.setParams(null);
basic.start();
@@ -232,7 +232,8 @@ public class HttpClientConnector extends AbstractClientProxyConnector {
} catch (HttpParser.ParseException e) {
throw new IOException(
format(SshdText.get().proxyHttpUnexpectedReply,
- proxyAddress, reply.get(0)));
+ proxyAddress, reply.get(0)),
+ e);
}
}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java
index 0500a63428..ece22af1ce 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java
@@ -31,6 +31,23 @@ public final class HttpParser {
private static final long serialVersionUID = -1634090143702048640L;
+ /**
+ * Creates a new {@link ParseException} without cause.
+ */
+ public ParseException() {
+ super();
+ }
+
+ /**
+ * Creates a new {@link ParseException} with the given {@code cause}.
+ *
+ * @param cause
+ * {@link Throwable} that caused this exception, or
+ * {@code null} if none
+ */
+ public ParseException(Throwable cause) {
+ super(cause);
+ }
}
private HttpParser() {
@@ -64,7 +81,7 @@ public final class HttpParser {
resultCode = Integer.parseUnsignedInt(
line.substring(firstBlank + 1, secondBlank));
} catch (NumberFormatException e) {
- throw new ParseException();
+ throw new ParseException(e);
}
// Again, accept even if the reason is missing
String reason = ""; //$NON-NLS-1$
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/Socks5ClientConnector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/Socks5ClientConnector.java
index 8844efa6b7..bb227bbac8 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/Socks5ClientConnector.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/Socks5ClientConnector.java
@@ -94,7 +94,7 @@ public class Socks5ClientConnector extends AbstractClientProxyConnector {
// JSON(9),
NONE_ACCEPTABLE(0xFF);
- private byte value;
+ private final byte value;
SocksAuthenticationMethod(int value) {
this.value = (byte) value;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java
index acc11cefb1..ed9fe37d5c 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java
@@ -31,7 +31,7 @@ public interface KeyPasswordProvider {
* identifying the key resource that is being attempted to be
* loaded
* @param attempt
- * the number of previous attempts to get a passphrase; >= 0
+ * the number of previous attempts to get a passphrase; &gt;= 0
* @return the passphrase
* @throws IOException
* if no password can be obtained
@@ -44,7 +44,7 @@ public interface KeyPasswordProvider {
*
* @param maxNumberOfAttempts
* number of times to ask for a passphrase;
- * {@link IllegalArgumentException} may be thrown if <= 0
+ * {@link IllegalArgumentException} may be thrown if &lt;= 0
*/
void setAttempts(int maxNumberOfAttempts);
@@ -53,7 +53,7 @@ public interface KeyPasswordProvider {
* attempted for one identity resource through this provider. The default
* return 1.
*
- * @return the number of times to ask for a passphrase; should be >= 1.
+ * @return the number of times to ask for a passphrase; should be &gt;= 1.
*/
default int getAttempts() {
return 1;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java
index 33b234b1f1..c270b44956 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ * Copyright (C) 2018, 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -28,7 +28,6 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;
import java.util.regex.Pattern;
@@ -44,9 +43,9 @@ import org.apache.sshd.common.SshException;
import org.apache.sshd.common.future.CloseFuture;
import org.apache.sshd.common.future.SshFutureListener;
import org.apache.sshd.common.util.io.IoUtils;
+import org.apache.sshd.common.util.io.functors.IOFunction;
import org.apache.sshd.common.util.net.SshdSocketAddress;
import org.apache.sshd.sftp.client.SftpClient;
-import org.apache.sshd.sftp.client.SftpClient.CloseableHandle;
import org.apache.sshd.sftp.client.SftpClient.CopyMode;
import org.apache.sshd.sftp.client.SftpClientFactory;
import org.apache.sshd.sftp.common.SftpException;
@@ -220,7 +219,8 @@ public class SshdSession implements RemoteSession2 {
HostConfigEntry hostConfig, String host) throws IOException {
if (currentHops.isEmpty()) {
String jumpHosts = hostConfig.getProperty(SshConstants.PROXY_JUMP);
- if (!StringUtils.isEmptyOrNull(jumpHosts)) {
+ if (!StringUtils.isEmptyOrNull(jumpHosts)
+ && !SshConstants.NONE.equals(jumpHosts)) {
try {
return parseProxyJump(jumpHosts);
} catch (URISyntaxException e) {
@@ -416,20 +416,6 @@ public class SshdSession implements RemoteSession2 {
}
}
- /**
- * Helper interface like {@link Supplier}, but possibly raising an
- * {@link IOException}.
- *
- * @param <T>
- * return type
- */
- @FunctionalInterface
- private interface FtpOperation<T> {
-
- T call() throws IOException;
-
- }
-
private class SshdFtpChannel implements FtpChannel {
private SftpClient ftp;
@@ -485,9 +471,9 @@ public class SshdSession implements RemoteSession2 {
return path;
}
- private <T> T map(FtpOperation<T> op) throws IOException {
+ private <T> T map(IOFunction<Void, T> op) throws IOException {
try {
- return op.call();
+ return op.apply(null);
} catch (IOException e) {
if (e instanceof SftpException) {
throw new FtpChannel.FtpException(e.getLocalizedMessage(),
@@ -499,7 +485,7 @@ public class SshdSession implements RemoteSession2 {
@Override
public void cd(String path) throws IOException {
- cwd = map(() -> ftp.canonicalPath(absolute(path)));
+ cwd = map(x -> ftp.canonicalPath(absolute(path)));
if (cwd.isEmpty()) {
cwd += '/';
}
@@ -512,39 +498,28 @@ public class SshdSession implements RemoteSession2 {
@Override
public Collection<DirEntry> ls(String path) throws IOException {
- return map(() -> {
+ return map(x -> {
List<DirEntry> result = new ArrayList<>();
- try (CloseableHandle handle = ftp.openDir(absolute(path))) {
- AtomicReference<Boolean> atEnd = new AtomicReference<>(
- Boolean.FALSE);
- while (!atEnd.get().booleanValue()) {
- List<SftpClient.DirEntry> chunk = ftp.readDir(handle,
- atEnd);
- if (chunk == null) {
- break;
+ for (SftpClient.DirEntry remote : ftp.readDir(absolute(path))) {
+ result.add(new DirEntry() {
+
+ @Override
+ public String getFilename() {
+ return remote.getFilename();
}
- for (SftpClient.DirEntry remote : chunk) {
- result.add(new DirEntry() {
-
- @Override
- public String getFilename() {
- return remote.getFilename();
- }
-
- @Override
- public long getModifiedTime() {
- return remote.getAttributes()
- .getModifyTime().toMillis();
- }
-
- @Override
- public boolean isDirectory() {
- return remote.getAttributes().isDirectory();
- }
-
- });
+
+ @Override
+ public long getModifiedTime() {
+ return remote.getAttributes().getModifyTime()
+ .toMillis();
}
- }
+
+ @Override
+ public boolean isDirectory() {
+ return remote.getAttributes().isDirectory();
+ }
+
+ });
}
return result;
});
@@ -552,7 +527,7 @@ public class SshdSession implements RemoteSession2 {
@Override
public void rmdir(String path) throws IOException {
- map(() -> {
+ map(x -> {
ftp.rmdir(absolute(path));
return null;
});
@@ -561,7 +536,7 @@ public class SshdSession implements RemoteSession2 {
@Override
public void mkdir(String path) throws IOException {
- map(() -> {
+ map(x -> {
ftp.mkdir(absolute(path));
return null;
});
@@ -569,17 +544,17 @@ public class SshdSession implements RemoteSession2 {
@Override
public InputStream get(String path) throws IOException {
- return map(() -> ftp.read(absolute(path)));
+ return map(x -> ftp.read(absolute(path)));
}
@Override
public OutputStream put(String path) throws IOException {
- return map(() -> ftp.write(absolute(path)));
+ return map(x -> ftp.write(absolute(path)));
}
@Override
public void rm(String path) throws IOException {
- map(() -> {
+ map(x -> {
ftp.remove(absolute(path));
return null;
});
@@ -587,7 +562,7 @@ public class SshdSession implements RemoteSession2 {
@Override
public void rename(String from, String to) throws IOException {
- map(() -> {
+ map(x -> {
String src = absolute(from);
String dest = absolute(to);
try {
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 cad959c904..58cf8e1ddd 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
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ * Copyright (C) 2018, 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -56,11 +56,14 @@ import org.eclipse.jgit.internal.transport.sshd.JGitUserInteraction;
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.internal.transport.sshd.agent.JGitSshAgentFactory;
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;
+import org.eclipse.jgit.transport.sshd.agent.Connector;
+import org.eclipse.jgit.transport.sshd.agent.ConnectorFactory;
import org.eclipse.jgit.util.FS;
/**
@@ -102,9 +105,9 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
/**
* Creates a new {@link SshdSessionFactory} using the given {@link KeyCache}
- * and {@link ProxyDataFactory}. The {@code keyCache} is used for all sessions
- * created through this session factory; cached keys are destroyed when the
- * session factory is {@link #close() closed}.
+ * and {@link ProxyDataFactory}. The {@code keyCache} is used for all
+ * sessions created through this session factory; cached keys are destroyed
+ * when the session factory is {@link #close() closed}.
* <p>
* Caching ssh keys in memory for an extended period of time is generally
* considered bad practice, but there may be circumstances where using a
@@ -114,13 +117,21 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
* to use a {@link #createKeyPasswordProvider(CredentialsProvider)
* KeyPasswordProvider} that has access to some secure storage and can save
* and retrieve passwords from there without user interaction. Another
- * approach is to use an ssh agent.
+ * approach is to use an SSH agent.
* </p>
* <p>
* Note that the underlying ssh library (Apache MINA sshd) may or may not
* keep ssh keys in memory for unspecified periods of time irrespective of
* the use of a {@link KeyCache}.
* </p>
+ * <p>
+ * By default, the factory uses the {@link java.util.ServiceLoader} to find
+ * a {@link ConnectorFactory} for creating a {@link Connector} to connect to
+ * a running SSH agent. If it finds one, the SSH agent is used in publickey
+ * authentication. If there is none, no SSH agent will ever be contacted.
+ * Note that one can define {@code IdentitiesOnly yes} for a host entry in
+ * the {@code ~/.ssh/config} file to bypass the SSH agent in any case.
+ * </p>
*
* @param keyCache
* {@link KeyCache} to use for caching ssh keys, or {@code null}
@@ -216,6 +227,11 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
new JGitUserInteraction(credentialsProvider));
client.setUserAuthFactories(getUserAuthFactories());
client.setKeyIdentityProvider(defaultKeysProvider);
+ ConnectorFactory connectors = getConnectorFactory();
+ if (connectors != null) {
+ client.setAgentFactory(
+ new JGitSshAgentFactory(connectors, home));
+ }
// JGit-specific things:
JGitSshClient jgitClient = (JGitSshClient) client;
jgitClient.setKeyCache(getKeyCache());
@@ -437,6 +453,20 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
}
/**
+ * Gets a {@link ConnectorFactory}. If this returns {@code null}, SSH agents
+ * are not supported.
+ * <p>
+ * The default implementation uses {@link ConnectorFactory#getDefault()}
+ * </p>
+ *
+ * @return the factory, or {@code null} if no SSH agent support is desired
+ * @since 6.0
+ */
+ protected ConnectorFactory getConnectorFactory() {
+ return ConnectorFactory.getDefault();
+ }
+
+ /**
* Gets the list of default user known hosts files. The default returns
* ~/.ssh/known_hosts and ~/.ssh/known_hosts2. The ssh config
* {@code UserKnownHostsFile} overrides this default.
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
index 2147c2bd58..7ed9b5ea3b 100644
--- 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
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ * Copyright (C) 2020, 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -20,6 +20,7 @@ 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.transport.sshd.agent.ConnectorFactory;
import org.eclipse.jgit.util.StringUtils;
/**
@@ -114,7 +115,7 @@ public final class SshdSessionFactoryBuilder {
}
/**
- * A factory interface for creating a @link SshConfigStore}.
+ * A factory interface for creating a {@link SshConfigStore}.
*/
@FunctionalInterface
public interface ConfigStoreFactory {
@@ -233,6 +234,41 @@ public final class SshdSessionFactoryBuilder {
}
/**
+ * Sets an explicit {@link ConnectorFactory}. If {@code null}, there will be
+ * no support for SSH agents.
+ * <p>
+ * If not set, the created {@link SshdSessionFactory} will use the
+ * {@link java.util.ServiceLoader} to find an {@link ConnectorFactory}.
+ * </p>
+ *
+ * @param factory
+ * {@link ConnectorFactory} to use
+ * @return this {@link SshdSessionFactoryBuilder}
+ * @since 6.0
+ */
+ public SshdSessionFactoryBuilder setConnectorFactory(
+ ConnectorFactory factory) {
+ this.state.connectorFactory = factory;
+ this.state.connectorFactorySet = true;
+ return this;
+ }
+
+ /**
+ * Removes a previously set {@link ConnectorFactory}. The created
+ * {@link SshdSessionFactory} will use the {@link java.util.ServiceLoader}
+ * to find an {@link ConnectorFactory}. This is also the default if
+ * {@link #setConnectorFactory(ConnectorFactory)} isn't called at all.
+ *
+ * @return this {@link SshdSessionFactoryBuilder}
+ * @since 6.0
+ */
+ public SshdSessionFactoryBuilder withDefaultConnectorFactory() {
+ this.state.connectorFactory = null;
+ this.state.connectorFactorySet = false;
+ return this;
+ }
+
+ /**
* Builds a {@link SshdSessionFactory} as configured, using the given
* {@link KeyCache} for caching keys.
* <p>
@@ -277,6 +313,10 @@ public final class SshdSessionFactoryBuilder {
BiFunction<File, File, ServerKeyDatabase> serverKeyDatabaseCreator;
+ ConnectorFactory connectorFactory;
+
+ boolean connectorFactorySet;
+
State copy() {
State c = new State();
c.proxyDataFactory = proxyDataFactory;
@@ -290,6 +330,8 @@ public final class SshdSessionFactoryBuilder {
c.defaultKeyFileFinder = defaultKeyFileFinder;
c.defaultKeysProvider = defaultKeysProvider;
c.serverKeyDatabaseCreator = serverKeyDatabaseCreator;
+ c.connectorFactory = connectorFactory;
+ c.connectorFactorySet = connectorFactorySet;
return c;
}
@@ -388,6 +430,15 @@ public final class SshdSessionFactoryBuilder {
return super.createSshConfigStore(homeDir, configFile,
localUserName);
}
+
+ @Override
+ protected ConnectorFactory getConnectorFactory() {
+ if (connectorFactorySet) {
+ return connectorFactory;
+ }
+ // Use default via ServiceLoader
+ return super.getConnectorFactory();
+ }
}
}
}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/AbstractConnector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/AbstractConnector.java
new file mode 100644
index 0000000000..71ddc3b003
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/AbstractConnector.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.transport.sshd.agent;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.Objects;
+
+import org.apache.sshd.agent.SshAgentConstants;
+import org.apache.sshd.common.SshException;
+import org.apache.sshd.common.util.buffer.BufferUtils;
+import org.eclipse.jgit.internal.transport.sshd.SshdText;
+
+/**
+ * Provides some utility methods for implementing {@link Connector}s.
+ *
+ * @since 6.0
+ */
+public abstract class AbstractConnector implements Connector {
+
+ // A somewhat sane lower bound for the maximum reply length
+ private static final int MIN_REPLY_LENGTH = 8 * 1024;
+
+ /**
+ * Default maximum reply length. 256kB is the OpenSSH limit.
+ */
+ protected static final int DEFAULT_MAX_REPLY_LENGTH = 256 * 1024;
+
+ private final int maxReplyLength;
+
+ /**
+ * Creates a new instance using the {@link #DEFAULT_MAX_REPLY_LENGTH}.
+ */
+ protected AbstractConnector() {
+ this(DEFAULT_MAX_REPLY_LENGTH);
+ }
+
+ /**
+ * Creates a new instance.
+ *
+ * @param maxReplyLength
+ * maximum number of payload bytes we're ready to accept
+ */
+ protected AbstractConnector(int maxReplyLength) {
+ if (maxReplyLength < MIN_REPLY_LENGTH) {
+ throw new IllegalArgumentException(
+ "Maximum payload length too small"); //$NON-NLS-1$
+ }
+ this.maxReplyLength = maxReplyLength;
+ }
+
+ /**
+ * Retrieves the maximum message length this {@link AbstractConnector} is
+ * configured for.
+ *
+ * @return the maximum message length
+ */
+ protected int getMaximumMessageLength() {
+ return this.maxReplyLength;
+ }
+
+ /**
+ * Prepares a message for sending by inserting the command and message
+ * length.
+ *
+ * @param command
+ * SSH agent command the request is for
+ * @param message
+ * about to be sent, including the 5 spare bytes at the front
+ * @throws IllegalArgumentException
+ * if {@code message} has less than 5 bytes
+ */
+ protected void prepareMessage(byte command, byte[] message)
+ throws IllegalArgumentException {
+ Objects.requireNonNull(message);
+ if (message.length < 5) {
+ // No translation; internal error
+ throw new IllegalArgumentException("Message buffer for " //$NON-NLS-1$
+ + SshAgentConstants.getCommandMessageName(command)
+ + " must have at least 5 bytes; have only " //$NON-NLS-1$
+ + message.length);
+ }
+ BufferUtils.putUInt(message.length - 4, message);
+ message[4] = command;
+ }
+
+ /**
+ * Checks the received length of a reply.
+ *
+ * @param command
+ * SSH agent command the reply is for
+ * @param length
+ * length as received: number of payload bytes
+ * @return the length as an {@code int}
+ * @throws IOException
+ * if the length is invalid
+ */
+ protected int toLength(byte command, byte[] length)
+ throws IOException {
+ long l = BufferUtils.getUInt(length);
+ if (l <= 0 || l > maxReplyLength - 4) {
+ throw new SshException(MessageFormat.format(
+ SshdText.get().sshAgentReplyLengthError,
+ Long.toString(l),
+ SshAgentConstants.getCommandMessageName(command)));
+ }
+ return (int) l;
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java
new file mode 100644
index 0000000000..d8dfbfc94d
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.transport.sshd.agent;
+
+import java.io.Closeable;
+import java.io.IOException;
+
+/**
+ * Simple interface for connecting to something and making RPC-style
+ * request-reply calls.
+ *
+ * @see ConnectorFactory
+ * @since 6.0
+ */
+public interface Connector extends Closeable {
+
+ /**
+ * Connects to an SSH agent if there is one running. If called when already
+ * connected just returns {@code true}.
+ *
+ * @return {@code true} if an SSH agent is available and connected,
+ * {@false} if no SSH agent is available
+ * @throws IOException
+ * if connecting to the SSH agent failed
+ */
+ boolean connect() throws IOException;
+
+ /**
+ * Performs a remote call to the SSH agent and returns the result.
+ *
+ * @param command
+ * to send
+ * @param message
+ * to send; must have at least 5 bytes, and must have 5 unused
+ * bytes at the front.
+ * @return the result received
+ * @throws IOException
+ * if an error occurs
+ */
+ byte[] rpc(byte command, byte[] message) throws IOException;
+
+ /**
+ * Performs a remote call sending only a command without any parameters to
+ * the SSH agent and returns the result.
+ *
+ * @param command
+ * to send
+ * @return the result received
+ * @throws IOException
+ * if an error occurs
+ */
+ default byte[] rpc(byte command) throws IOException {
+ return rpc(command, new byte[5]);
+ }
+}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/ConnectorFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/ConnectorFactory.java
new file mode 100644
index 0000000000..da98ea7fe0
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/ConnectorFactory.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.transport.sshd.agent;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+
+import org.eclipse.jgit.annotations.NonNull;
+import org.eclipse.jgit.internal.transport.sshd.agent.ConnectorFactoryProvider;
+
+/**
+ * A factory for creating {@link Connector}s. This is a service provider
+ * interface; implementations are discovered via the
+ * {@link java.util.ServiceLoader}, or can be set explicitly on a
+ * {@link org.eclipse.jgit.transport.sshd.SshdSessionFactory}.
+ *
+ * @since 6.0
+ */
+public interface ConnectorFactory {
+
+ /**
+ * Retrieves the currently set default {@link ConnectorFactory}. This is the
+ * factory that is used unless overridden by the
+ * {@link org.eclipse.jgit.transport.sshd.SshdSessionFactory}.
+ *
+ * @return the current default factory; may be {@code null} if none is set
+ * and the {@link java.util.ServiceLoader} cannot find any suitable
+ * implementation
+ */
+ static ConnectorFactory getDefault() {
+ return ConnectorFactoryProvider.getDefaultFactory();
+ }
+
+ /**
+ * Sets a default {@link ConnectorFactory}. This is the factory that is used
+ * unless overridden by the
+ * {@link org.eclipse.jgit.transport.sshd.SshdSessionFactory}.
+ * <p>
+ * If no default factory is set programmatically, an implementation is
+ * discovered via the {@link java.util.ServiceLoader}.
+ * </p>
+ *
+ * @param factory
+ * {@link ConnectorFactory} to set, or {@code null} to revert to
+ * the default behavior of using the
+ * {@link java.util.ServiceLoader}.
+ */
+ static void setDefault(ConnectorFactory factory) {
+ ConnectorFactoryProvider.setDefaultFactory(factory);
+ }
+
+ /**
+ * Creates a new {@link Connector}.
+ *
+ * @param identityAgent
+ * identifies the wanted agent connection; if {@code null}, the
+ * factory is free to provide a {@link Connector} to a default
+ * agent. The value will typically come from the
+ * {@code IdentityAgent} setting in {@code ~/.ssh/config}.
+ * @param homeDir
+ * the current local user's home directory as configured in the
+ * {@link org.eclipse.jgit.transport.sshd.SshdSessionFactory}
+ * @return a new {@link Connector}
+ * @throws IOException
+ * if no connector can be created
+ */
+ @NonNull
+ Connector create(String identityAgent, File homeDir)
+ throws IOException;
+
+ /**
+ * Tells whether this {@link ConnectorFactory} is applicable on the
+ * currently running platform.
+ *
+ * @return {@code true} if the factory can be used, {@code false} otherwise
+ */
+ boolean isSupported();
+
+ /**
+ * Retrieves a name for this factory.
+ *
+ * @return the name
+ */
+ String getName();
+
+ /**
+ * {@link ConnectorDescriptor}s describe available {@link Connector}s a
+ * {@link ConnectorFactory} may provide.
+ * <p>
+ * A {@link ConnectorFactory} may support connecting to different SSH
+ * agents. Agents are identified by name; a user can choose a specific agent
+ * for instance via the {@code IdentityAgent} setting in
+ * {@code ~/.ssh/config}.
+ * </p>
+ * <p>
+ * OpenSSH knows two built-in names: "none" for not using any agent, and
+ * "SSH_AUTH_SOCK" for using an agent that communicates over a Unix domain
+ * socket given by the value of environment variable {@code SSH_AUTH_SOCK}.
+ * Other agents can be specified in OpenSSH by specifying the socket file
+ * directly. (The "standard" OpenBSD OpenSSH knows only this communication
+ * mechanism.) "SSH_AUTH_SOCK" is also the default in OpenBSD OpenSSH if
+ * nothing is configured.
+ * </p>
+ * <p>
+ * A particular {@link ConnectorFactory} may support more communication
+ * mechanisms or different agents. For instance, a factory on Windows might
+ * support Pageant, Win32-OpenSSH, or even git bash ssh-agent, and might
+ * accept internal names like "pageant", "openssh", "SSH_AUTH_SOCK" in
+ * {@link ConnectorFactory#create(String, File)} to choose among them.
+ * </p>
+ * The {@link ConnectorDescriptor} interface and the
+ * {@link ConnectorFactory#getSupportedConnectors()} and
+ * {@link ConnectorFactory#getDefaultConnector()} methods provide a way for
+ * code using a {@link ConnectorFactory} to learn what the factory supports
+ * and thus implement some way by which a user can influence the default
+ * behavior if {@code IdentityAgent} is not set or
+ * {@link ConnectorFactory#create(String, File)} is called with
+ * {@code identityAgent == null}.
+ */
+ interface ConnectorDescriptor {
+
+ /**
+ * Retrieves the internal name of a supported {@link Connector}. The
+ * internal name is the one a user can specify for instance in the
+ * {@code IdentityAgent} setting in {@code ~/.ssh/config} to select the
+ * connector.
+ *
+ * @return the internal name; not empty
+ */
+ @NonNull
+ String getIdentityAgent();
+
+ /**
+ * Retrieves a display name for a {@link Connector}, suitable for
+ * showing in a UI.
+ *
+ * @return the display name; properly localized and not empty
+ */
+ @NonNull
+ String getDisplayName();
+ }
+
+ /**
+ * Tells which kinds of SSH agents this {@link ConnectorFactory} supports.
+ * <p>
+ * An implementation of this method should document the possible values it
+ * returns.
+ * </p>
+ *
+ * @return an immutable collection of {@link ConnectorDescriptor}s,
+ * including {@link #getDefaultConnector()} and not including a
+ * descriptor for internal name "none"
+ */
+ @NonNull
+ Collection<ConnectorDescriptor> getSupportedConnectors();
+
+ /**
+ * Tells what kind of {@link Connector} this {@link ConnectorFactory}
+ * creates if {@link ConnectorFactory#create(String, File)} is called with
+ * {@code identityAgent == null}.
+ *
+ * @return a {@link ConnectorDescriptor} for the default connector
+ */
+ ConnectorDescriptor getDefaultConnector();
+}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/package-info.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/package-info.java
new file mode 100644
index 0000000000..71ca43f3d5
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Service provider interfaces for connecting to an SSH agent. Implementations
+ * are discovered via the {@link java.util.ServiceLoader}, or can be set
+ * explicitly on a {@link org.eclipse.jgit.transport.sshd.SshdSessionFactory}.
+ */
+package org.eclipse.jgit.transport.sshd.agent;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/package-info.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/package-info.java
new file mode 100644
index 0000000000..926234a3bd
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Provides a JGit {@link org.eclipse.jgit.transport.SshSessionFactory}
+ * implemented via <a href="https://mina.apache.org/sshd-project/">Apache MINA
+ * sshd</a>.
+ */
+package org.eclipse.jgit.transport.sshd;
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 a155ccf020..d2bf04752a 100644
--- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
@@ -3,18 +3,18 @@ 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: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit.ssh;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.ssh.jsch;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit.ssh;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.ssh.jsch;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
org.hamcrest;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
org.junit.experimental.theories;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.ssh.jsch.test/pom.xml b/org.eclipse.jgit.ssh.jsch.test/pom.xml
index a890e96c41..c1e522a9a8 100644
--- a/org.eclipse.jgit.ssh.jsch.test/pom.xml
+++ b/org.eclipse.jgit.ssh.jsch.test/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.jsch.test</artifactId>
diff --git a/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfigTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfigTest.java
index 4399ad9be6..9a61cc4c55 100644
--- a/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfigTest.java
+++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfigTest.java
@@ -138,7 +138,7 @@ public class OpenSshConfigTest extends RepositoryTestCase {
assertEquals(2222, osc.lookup("unquoted").getPort());
assertEquals(2222, osc.lookup("hosts").getPort());
assertEquals(" spaced\ttld ", osc.lookup("spaced").getHostName());
- assertEquals("bad.tld\"", osc.lookup("bad").getHostName());
+ assertEquals("bad.tld", osc.lookup("bad").getHostName());
}
@Test
@@ -229,7 +229,7 @@ public class OpenSshConfigTest extends RepositoryTestCase {
@Test
public void testAlias_InheritPreferredAuthentications() throws Exception {
config("Host orcz\n" + "\tHostName repo.or.cz\n" + "\n" + "Host *\n"
- + "\tPreferredAuthentications publickey, hostbased\n");
+ + "\tPreferredAuthentications 'publickey, hostbased'\n");
final Host h = osc.lookup("orcz");
assertNotNull(h);
assertEquals("publickey,hostbased", h.getPreferredAuthentications());
diff --git a/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/ServiceLoaderTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/ServiceLoaderTest.java
new file mode 100644
index 0000000000..2bae221e29
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/ssh/jsch/ServiceLoaderTest.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.transport.ssh.jsch;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.eclipse.jgit.transport.SshSessionFactory;
+import org.junit.Test;
+
+public class ServiceLoaderTest {
+
+ @Test
+ public void testDefaultFactoryFound() {
+ SshSessionFactory defaultFactory = SshSessionFactory.getInstance();
+ assertNotNull(defaultFactory);
+ }
+}
diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
index 1a498ce371..3c53d4f625 100644
--- a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
@@ -3,19 +3,19 @@ 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="[6.0.0,6.1.0)"
+Fragment-Host: org.eclipse.jgit;bundle-version="[6.1.0,6.2.0)"
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.jgit.transport.ssh.jsch;version="6.0.0"
+Export-Package: org.eclipse.jgit.transport.ssh.jsch;version="6.1.0"
Import-Package: com.jcraft.jsch;version="[0.1.37,0.2.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.io;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.io;version="[6.1.0,6.2.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
index 5d1f9a3332..817e0aa177 100644
--- a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ 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: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.jsch/README.md b/org.eclipse.jgit.ssh.jsch/README.md
new file mode 100644
index 0000000000..b64bef3f77
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/README.md
@@ -0,0 +1,59 @@
+# JGit SSH support via JSch
+
+This bundle provides an implementation of git transport over SSH implemented via JSch.
+
+**This bundle should be considered deprecated**. It is essentially unmaintained, and
+the JGit project may decide anytime to remove it completely without further ado.
+
+The officially supported SSH transport is in bundle `org.eclipse.jgit.ssh.apache` and is
+built upon [Apache MINA sshd](https://mina.apache.org/sshd-project/).
+
+## Service registration
+
+This bundle declares a service for the `java.util.ServiceLoader` for interface
+`org.eclipse.jgit.transport.ssh.SshSessionFactory`. The core JGit bundle uses the service
+loader to pick up an implementation of that interface. The bundle in an OSGi fragment
+to ensure that the service loader works in an OSGi environment without the need to
+install a service loader bridge.
+
+Note that JGit simply uses the first `SshSessionFactory` provided by the `ServiceLoader`.
+
+## Using a different SSH implementation
+
+To use a different SSH implementation:
+
+* Do not include this bundle in your product.
+* Include the bundle of the alternate implementation.
+ * If the service loader finds the alternate implementation, nothing more is needed.
+ * Otherwise ensure the service declaration from the other bundle is on the Classpath of bundle `org.eclipse.jgit`,
+ * or set the `SshSessionFactory` for JGit explicitly (see below).
+
+## Configuring an SSH implementation for JGit
+
+The simplest way to set an SSH implementation for JGit is to install it globally via
+`SshSessionFactory.setInstance()`. This instance will be used by JGit for all SSH
+connections by default.
+
+It is also possible to set the SSH implementation individually for any git command
+that needs a transport (`TransportCommand`) via a `org.eclipse.jgit.api.TransportConfigCallback`.
+
+To do so, set the wanted `SshSessionFactory` on the SSH transport, like:
+
+```java
+SshSessionFactory customFactory = ...; // Get it from wherever
+FetchCommand fetch = git.fetch()
+ .setTransportConfigCallback(transport -> {
+ if (transport instanceof SshTransport) {
+ ((SshTransport) transport).setSshSessionFactory(customFactory);
+ }
+ })
+ ...
+ .call();
+```
+
+## Using an external SSH executable
+
+JGit has built-in support for not using any Java SSH implementation but an external SSH
+executable. To use an external SSH executable, set environment variable **GIT_SSH** to
+the path of the executable. JGit will create a sub-process to run the executable and
+communicate with this sub-process to perform the git operation.
diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml
index 95a20b50ab..62d363adc5 100644
--- a/org.eclipse.jgit.ssh.jsch/pom.xml
+++ b/org.eclipse.jgit.ssh.jsch/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
@@ -96,15 +96,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>process-classes</phase>
- <goals>
- <goal>jar</goal>
- </goals>
+ <artifactId>maven-source-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
<configuration>
<archive>
<manifestFile>${source-bundle-manifest}</manifestFile>
diff --git a/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.ssh.jsch.SshSessionFactory b/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
index aca489659e..aca489659e 100644
--- a/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.ssh.jsch.SshSessionFactory
+++ b/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java
index 453433e0c4..77b68bb034 100644
--- a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java
+++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java
@@ -45,6 +45,7 @@ import org.eclipse.jgit.transport.SshConstants;
import org.eclipse.jgit.transport.SshSessionFactory;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -417,14 +418,26 @@ public class JschConfigSessionFactory extends SshSessionFactory {
*/
protected JSch createDefaultJSch(FS fs) throws JSchException {
final JSch jsch = new JSch();
- JSch.setConfig("ssh-rsa", JSch.getConfig("signature.rsa")); //$NON-NLS-1$ //$NON-NLS-2$
- JSch.setConfig("ssh-dss", JSch.getConfig("signature.dss")); //$NON-NLS-1$ //$NON-NLS-2$
+ // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=537790 and
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=576604
+ copyGlobalConfigIfNotSet("signature.rsa", "ssh-rsa"); //$NON-NLS-1$ //$NON-NLS-2$
+ copyGlobalConfigIfNotSet("signature.dss", "ssh-dss"); //$NON-NLS-1$ //$NON-NLS-2$
configureJSch(jsch);
knownHosts(jsch, fs);
identities(jsch, fs);
return jsch;
}
+ private void copyGlobalConfigIfNotSet(String from, String to) {
+ String toValue = JSch.getConfig(to);
+ if (StringUtils.isEmptyOrNull(toValue)) {
+ String fromValue = JSch.getConfig(from);
+ if (!StringUtils.isEmptyOrNull(fromValue)) {
+ JSch.setConfig(to, fromValue);
+ }
+ }
+ }
+
private static void knownHosts(JSch sch, FS fs) throws JSchException {
final File home = fs.userHome();
if (home == null)
diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/package-info.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/package-info.java
new file mode 100644
index 0000000000..dc2915a09f
--- /dev/null
+++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/package-info.java
@@ -0,0 +1,14 @@
+/**
+ * Provides a JGit {@link org.eclipse.jgit.transport.SshSessionFactory}
+ * implemented via JSch.
+ * <p>
+ * This package should be considered <b>deprecated</b>. It is essentially
+ * unmaintained and the JGit project may decide to remove it completely without
+ * further ado at any time.
+ * </p>
+ * <p>
+ * The officially supported Java SSH implementation for JGit is in bundle
+ * {@code org.eclipse.jgit.ssh.apache} and is built upon
+ * <a href="https://mina.apache.org/sshd-project/">Apache MINA sshd</a>.
+ */
+package org.eclipse.jgit.transport.ssh.jsch;
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index b550bea59a..95c03a0a4a 100644
--- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.test
Bundle-SymbolicName: org.eclipse.jgit.test
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -16,59 +16,61 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)",
org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)",
org.assertj.core.api;version="[3.14.0,4.0.0)",
- org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.archive;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.attributes;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.awtui;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.blame;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.diff;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.dircache;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.events;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.fnmatch;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.gitrepo;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.hooks;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.ignore;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.ignore.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.fsck;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.io;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.pack;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.transport.connectivity;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.transport.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.internal.transport.parser;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.junit.time;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lfs;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.logging;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.merge;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.notes;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.patch;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.pgm;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.pgm.internal;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revplot;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.file;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.storage.pack;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.submodule;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.http;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport.resolver;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.io;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util.sha1;version="[6.0.0,6.1.0)",
+ org.eclipse.jgit.annotations;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.api.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.archive;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.attributes;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.awtui;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.blame;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.diff;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.dircache;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.events;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.fnmatch;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.gitrepo;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.hooks;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.ignore;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.ignore.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.diffmergetool;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.fsck;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.io;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.connectivity;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.junit.time;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lfs;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.logging;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.merge;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.notes;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.patch;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.pgm;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.pgm.internal;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revplot;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.file;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.storage.pack;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.submodule;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.http;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.io;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util.sha1;version="[6.1.0,6.2.0)",
org.hamcrest;version="[1.1.0,3.0.0)",
org.hamcrest.collection;version="[1.1.0,3.0.0)",
org.junit;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml
index fd581fcab0..29fd8d4dce 100644
--- a/org.eclipse.jgit.test/pom.xml
+++ b/org.eclipse.jgit.test/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.test</artifactId>
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/EolStreamTypeUtilTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/EolStreamTypeUtilTest.java
index 2a553ce1a2..f8a6632918 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/EolStreamTypeUtilTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/EolStreamTypeUtilTest.java
@@ -81,14 +81,17 @@ public class EolStreamTypeUtilTest {
testCheckout(TEXT_CRLF, AUTO_CRLF, "\n", "\r\n");
testCheckout(TEXT_CRLF, AUTO_CRLF, "\r\n", "\r\n");
- testCheckout(TEXT_CRLF, AUTO_CRLF, "\n\r", "\r\n\r");
+ testCheckout(TEXT_CRLF, null, "\n\r", "\r\n\r");
+ testCheckout(null, AUTO_CRLF, "\n\r", "\n\r"); // Lone CR
- testCheckout(TEXT_CRLF, AUTO_CRLF, "\n\r\n", "\r\n\r\n");
+ testCheckout(null, AUTO_CRLF, "\n\r\n", "\n\r\n");
+ testCheckout(TEXT_CRLF, null, "\n\r\n", "\r\n\r\n");
testCheckout(TEXT_CRLF, AUTO_CRLF, "\r\n\r", "\r\n\r");
testCheckout(TEXT_CRLF, AUTO_CRLF, "a\nb\n", "a\r\nb\r\n");
testCheckout(TEXT_CRLF, AUTO_CRLF, "a\rb\r", "a\rb\r");
- testCheckout(TEXT_CRLF, AUTO_CRLF, "a\n\rb\n\r", "a\r\n\rb\r\n\r");
+ testCheckout(TEXT_CRLF, null, "a\n\rb\n\r", "a\r\n\rb\r\n\r");
+ testCheckout(null, AUTO_CRLF, "a\n\rb\n\r", "a\n\rb\n\r"); // Lone CR
testCheckout(TEXT_CRLF, AUTO_CRLF, "a\r\nb\r\n", "a\r\nb\r\n");
}
@@ -198,7 +201,8 @@ public class EolStreamTypeUtilTest {
testCheckin(TEXT_LF, AUTO_LF, "\n\r", "\n\r");
testCheckin(TEXT_LF, AUTO_LF, "\n\r\n", "\n\n");
- testCheckin(TEXT_LF, AUTO_LF, "\r\n\r", "\n\r");
+ testCheckin(TEXT_LF, null, "\r\n\r", "\n\r");
+ testCheckin(null, AUTO_LF, "\r\n\r", "\r\n\r"); // Lone CR
testCheckin(TEXT_LF, AUTO_LF, "a\nb\n", "a\nb\n");
testCheckin(TEXT_LF, AUTO_LF, "a\rb\r", "a\rb\r");
@@ -213,14 +217,16 @@ public class EolStreamTypeUtilTest {
testCheckin(TEXT_CRLF, AUTO_CRLF, "\n", "\r\n");
testCheckin(TEXT_CRLF, AUTO_CRLF, "\r\n", "\r\n");
- testCheckin(TEXT_CRLF, AUTO_CRLF, "\n\r", "\r\n\r");
+ testCheckin(TEXT_CRLF, null, "\n\r", "\r\n\r");
+ testCheckin(null, AUTO_CRLF, "\n\r", "\n\r"); // Lone CR
testCheckin(TEXT_CRLF, AUTO_CRLF, "\n\r\n", "\r\n\r\n");
testCheckin(TEXT_CRLF, AUTO_CRLF, "\r\n\r", "\r\n\r");
testCheckin(TEXT_CRLF, AUTO_CRLF, "a\nb\n", "a\r\nb\r\n");
testCheckin(TEXT_CRLF, AUTO_CRLF, "a\rb\r", "a\rb\r");
- testCheckin(TEXT_CRLF, AUTO_CRLF, "a\n\rb\n\r", "a\r\n\rb\r\n\r");
+ testCheckin(TEXT_CRLF, null, "a\n\rb\n\r", "a\r\n\rb\r\n\r");
+ testCheckin(null, AUTO_CRLF, "a\n\rb\n\r", "a\n\rb\n\r"); // Lone CR
testCheckin(TEXT_CRLF, AUTO_CRLF, "a\r\nb\r\n", "a\r\nb\r\n");
}
@@ -256,47 +262,55 @@ public class EolStreamTypeUtilTest {
byte[] inputBytes = input.getBytes(UTF_8);
byte[] expectedConversionBytes = expectedConversion.getBytes(UTF_8);
- // test using input text and assuming it was declared TEXT
- try (InputStream in = EolStreamTypeUtil.wrapInputStream(
- new ByteArrayInputStream(inputBytes),
- streamTypeText)) {
- byte[] b = new byte[1024];
- int len = IO.readFully(in, b, 0);
- assertArrayEquals(expectedConversionBytes, Arrays.copyOf(b, len));
+ if (streamTypeText != null) {
+ // test using input text and assuming it was declared TEXT
+ try (InputStream in = EolStreamTypeUtil.wrapInputStream(
+ new ByteArrayInputStream(inputBytes), streamTypeText)) {
+ byte[] b = new byte[1024];
+ int len = IO.readFully(in, b, 0);
+ assertArrayEquals(expectedConversionBytes,
+ Arrays.copyOf(b, len));
+ }
}
- // test using input text and assuming it was declared AUTO, using binary
- // detection
- try (InputStream in = EolStreamTypeUtil.wrapInputStream(
- new ByteArrayInputStream(inputBytes),
- streamTypeWithBinaryCheck)) {
- byte[] b = new byte[1024];
- int len = IO.readFully(in, b, 0);
- assertArrayEquals(expectedConversionBytes, Arrays.copyOf(b, len));
+ if (streamTypeWithBinaryCheck != null) {
+ // test using input text and assuming it was declared AUTO, using
+ // binary detection
+ try (InputStream in = EolStreamTypeUtil.wrapInputStream(
+ new ByteArrayInputStream(inputBytes),
+ streamTypeWithBinaryCheck)) {
+ byte[] b = new byte[1024];
+ int len = IO.readFully(in, b, 0);
+ assertArrayEquals(expectedConversionBytes,
+ Arrays.copyOf(b, len));
+ }
}
-
// now pollute input text with some binary bytes
inputBytes = extendWithBinaryData(inputBytes);
expectedConversionBytes = extendWithBinaryData(expectedConversionBytes);
- // again, test using input text and assuming it was declared TEXT
- try (InputStream in = EolStreamTypeUtil.wrapInputStream(
- new ByteArrayInputStream(inputBytes), streamTypeText)) {
- byte[] b = new byte[1024];
- int len = IO.readFully(in, b, 0);
- assertArrayEquals(expectedConversionBytes, Arrays.copyOf(b, len));
+ if (streamTypeText != null) {
+ // again, test using input text and assuming it was declared TEXT
+ try (InputStream in = EolStreamTypeUtil.wrapInputStream(
+ new ByteArrayInputStream(inputBytes), streamTypeText)) {
+ byte[] b = new byte[1024];
+ int len = IO.readFully(in, b, 0);
+ assertArrayEquals(expectedConversionBytes,
+ Arrays.copyOf(b, len));
+ }
}
- // again, test using input text and assuming it was declared AUTO, using
- // binary
- // detection
- try (InputStream in = EolStreamTypeUtil.wrapInputStream(
- new ByteArrayInputStream(inputBytes),
- streamTypeWithBinaryCheck)) {
- byte[] b = new byte[1024];
- int len = IO.readFully(in, b, 0);
- // expect no conversion
- assertArrayEquals(inputBytes, Arrays.copyOf(b, len));
+ if (streamTypeWithBinaryCheck != null) {
+ // again, test using input text and assuming it was declared AUTO,
+ // using binary detection
+ try (InputStream in = EolStreamTypeUtil.wrapInputStream(
+ new ByteArrayInputStream(inputBytes),
+ streamTypeWithBinaryCheck)) {
+ byte[] b = new byte[1024];
+ int len = IO.readFully(in, b, 0);
+ // expect no conversion
+ assertArrayEquals(inputBytes, Arrays.copyOf(b, len));
+ }
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
index b694f4aaf7..a093cc78de 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
@@ -608,7 +608,7 @@ public class DiffFormatterTest extends RepositoryTestCase {
public void testDiffAutoCrlfMediumFile() throws Exception {
String content = mediumCrLfString();
String expectedDiff = "diff --git a/test.txt b/test.txt\n"
- + "index 215c502..c10f08c 100644\n" //
+ + "index 6d9ffed..50d7b5a 100644\n" //
+ "--- a/test.txt\n" //
+ "+++ b/test.txt\n" //
+ "@@ -1,4 +1,5 @@\n" //
@@ -624,7 +624,7 @@ public class DiffFormatterTest extends RepositoryTestCase {
public void testDiffAutoCrlfLargeFile() throws Exception {
String content = largeCrLfString();
String expectedDiff = "diff --git a/test.txt b/test.txt\n"
- + "index 7014942..c0487a7 100644\n" //
+ + "index d6399a1..de26ce5 100644\n" //
+ "--- a/test.txt\n" //
+ "+++ b/test.txt\n" //
+ "@@ -1,4 +1,5 @@\n"
@@ -665,9 +665,9 @@ public class DiffFormatterTest extends RepositoryTestCase {
private static String largeCrLfString() {
String line = "012345678901234567890123456789012345678901234567\r\n";
- StringBuilder builder = new StringBuilder(
- 2 * RawText.FIRST_FEW_BYTES);
- while (builder.length() < 2 * RawText.FIRST_FEW_BYTES) {
+ int bufferSize = RawText.getBufferSize();
+ StringBuilder builder = new StringBuilder(2 * bufferSize);
+ while (builder.length() < 2 * bufferSize) {
builder.append(line);
}
return builder.toString();
@@ -677,9 +677,9 @@ public class DiffFormatterTest extends RepositoryTestCase {
// Create a CR-LF string longer than RawText.FIRST_FEW_BYTES whose
// canonical representation is shorter than RawText.FIRST_FEW_BYTES.
String line = "01234567\r\n"; // 10 characters
- StringBuilder builder = new StringBuilder(
- RawText.FIRST_FEW_BYTES + line.length());
- while (builder.length() <= RawText.FIRST_FEW_BYTES) {
+ int bufferSize = RawText.getBufferSize();
+ StringBuilder builder = new StringBuilder(bufferSize + line.length());
+ while (builder.length() <= bufferSize) {
builder.append(line);
}
return builder.toString();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalDiffToolTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalDiffToolTest.java
new file mode 100644
index 0000000000..f07d9d1afc
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalDiffToolTest.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2020-2021, Simeon Andreev <simeon.danailov.andreev@gmail.com> 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.diffmergetool;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.jgit.lib.internal.BooleanTriState;
+import org.eclipse.jgit.storage.file.FileBasedConfig;
+import org.junit.Test;
+
+/**
+ * Testing external diff tools.
+ */
+public class ExternalDiffToolTest extends ExternalToolTest {
+
+ @Test
+ public void testToolNames() {
+ DiffTools manager = new DiffTools(db);
+ Set<String> actualToolNames = manager.getToolNames();
+ Set<String> expectedToolNames = Collections.emptySet();
+ assertEquals("Incorrect set of external diff tool names",
+ expectedToolNames,
+ actualToolNames);
+ }
+
+ @Test
+ public void testAllTools() {
+ DiffTools manager = new DiffTools(db);
+ Set<String> actualToolNames = manager.getAvailableTools().keySet();
+ Set<String> expectedToolNames = Collections.emptySet();
+ assertEquals("Incorrect set of available external diff tools",
+ expectedToolNames,
+ actualToolNames);
+ }
+
+ @Test
+ public void testUserDefinedTools() {
+ DiffTools manager = new DiffTools(db);
+ Set<String> actualToolNames = manager.getUserDefinedTools().keySet();
+ Set<String> expectedToolNames = Collections.emptySet();
+ assertEquals("Incorrect set of user defined external diff tools",
+ expectedToolNames,
+ actualToolNames);
+ }
+
+ @Test
+ public void testNotAvailableTools() {
+ DiffTools manager = new DiffTools(db);
+ Set<String> actualToolNames = manager.getNotAvailableTools().keySet();
+ Set<String> expectedToolNames = Collections.emptySet();
+ assertEquals("Incorrect set of not available external diff tools",
+ expectedToolNames,
+ actualToolNames);
+ }
+
+ @Test
+ public void testCompare() {
+ DiffTools manager = new DiffTools(db);
+
+ String newPath = "";
+ String oldPath = "";
+ String newId = "";
+ String oldId = "";
+ String toolName = "";
+ BooleanTriState prompt = BooleanTriState.UNSET;
+ BooleanTriState gui = BooleanTriState.UNSET;
+ BooleanTriState trustExitCode = BooleanTriState.UNSET;
+
+ int expectedCompareResult = 0;
+ int compareResult = manager.compare(newPath, oldPath, newId, oldId,
+ toolName, prompt, gui, trustExitCode);
+ assertEquals("Incorrect compare result for external diff tool",
+ expectedCompareResult,
+ compareResult);
+ }
+
+ @Test
+ public void testDefaultTool() throws Exception {
+ FileBasedConfig config = db.getConfig();
+ // the default diff tool is configured without a subsection
+ String subsection = null;
+ config.setString("diff", subsection, "tool", "customTool");
+
+ DiffTools manager = new DiffTools(db);
+ BooleanTriState gui = BooleanTriState.UNSET;
+ String defaultToolName = manager.getDefaultToolName(gui);
+ assertEquals(
+ "Expected configured difftool to be the default external diff tool",
+ "my_default_toolname", defaultToolName);
+
+ gui = BooleanTriState.TRUE;
+ String defaultGuiToolName = manager.getDefaultToolName(gui);
+ assertEquals(
+ "Expected configured difftool to be the default external diff tool",
+ "my_gui_tool", defaultGuiToolName);
+
+ config.setString("diff", subsection, "guitool", "customGuiTool");
+ manager = new DiffTools(db);
+ defaultGuiToolName = manager.getDefaultToolName(gui);
+ assertEquals(
+ "Expected configured difftool to be the default external diff guitool",
+ "my_gui_tool", defaultGuiToolName);
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalToolTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalToolTest.java
new file mode 100644
index 0000000000..c7c8eca714
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalToolTest.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2020-2021, Simeon Andreev <simeon.danailov.andreev@gmail.com> 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.diffmergetool;
+
+import java.io.File;
+import java.nio.file.Files;
+
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FS_POSIX;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+
+/**
+ * Base test case for external merge and diff tool tests.
+ */
+public abstract class ExternalToolTest extends RepositoryTestCase {
+
+ protected static final String DEFAULT_CONTENT = "line1";
+
+ protected File localFile;
+
+ protected File remoteFile;
+
+ protected File mergedFile;
+
+ protected File baseFile;
+
+ protected File commandResult;
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ localFile = writeTrashFile("localFile.txt", DEFAULT_CONTENT + "\n");
+ localFile.deleteOnExit();
+ remoteFile = writeTrashFile("remoteFile.txt", DEFAULT_CONTENT + "\n");
+ remoteFile.deleteOnExit();
+ mergedFile = writeTrashFile("mergedFile.txt", "");
+ mergedFile.deleteOnExit();
+ baseFile = writeTrashFile("baseFile.txt", "");
+ baseFile.deleteOnExit();
+ commandResult = writeTrashFile("commandResult.txt", "");
+ commandResult.deleteOnExit();
+ }
+
+ @After
+ @Override
+ public void tearDown() throws Exception {
+ Files.delete(localFile.toPath());
+ Files.delete(remoteFile.toPath());
+ Files.delete(mergedFile.toPath());
+ Files.delete(baseFile.toPath());
+ Files.delete(commandResult.toPath());
+
+ super.tearDown();
+ }
+
+
+ protected static void assumePosixPlatform() {
+ Assume.assumeTrue(
+ "This test can run only in Linux tests",
+ FS.DETECTED instanceof FS_POSIX);
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
index 4f300bcd8d..4f1314057f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheTest.java
@@ -10,6 +10,7 @@
package org.eclipse.jgit.internal.storage.dfs;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -20,12 +21,17 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.LongStream;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import org.eclipse.jgit.internal.storage.pack.PackExt;
+import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.junit.TestRng;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.ObjectReader;
+import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -36,10 +42,12 @@ public class DfsBlockCacheTest {
public TestName testName = new TestName();
private TestRng rng;
private DfsBlockCache cache;
+ private ExecutorService pool;
@Before
public void setUp() {
rng = new TestRng(testName.getMethodName());
+ pool = Executors.newFixedThreadPool(10);
resetCache();
}
@@ -144,10 +152,184 @@ public class DfsBlockCacheTest {
assertEquals(0, cache.getEvictions()[PackExt.INDEX.getPosition()]);
}
+ @SuppressWarnings("resource")
+ @Test
+ public void noConcurrencySerializedReads_oneRepo() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test");
+ // Reset cache with concurrency Level at 1 i.e. no concurrency.
+ resetCache(1);
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ for (DfsPackFile pack : r1.getObjectDatabase().getPacks()) {
+ // Only load non-garbage pack with bitmap.
+ if (pack.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack.getBitmapIndex(reader));
+ asyncRun(() -> pack.getPackIndex(reader));
+ asyncRun(() -> pack.getBitmapIndex(reader));
+ }
+ waitForExecutorPoolTermination();
+
+ assertEquals(1, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ assertEquals(1, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ // Reverse index has no pack extension, it defaults to 0.
+ assertEquals(1, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void noConcurrencySerializedReads_twoRepos() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test1");
+ InMemoryRepository r2 = createRepoWithBitmap("test2");
+ resetCache(1);
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
+ DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
+ // Safety check that both repos have the same number of packs.
+ assertEquals(r1Packs.length, r2Packs.length);
+
+ for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
+ DfsPackFile pack1 = r1Packs[i];
+ DfsPackFile pack2 = r2Packs[i];
+ if (pack1.isGarbage() || pack2.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack1.getBitmapIndex(reader));
+ asyncRun(() -> pack2.getBitmapIndex(reader));
+ }
+
+ waitForExecutorPoolTermination();
+ assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void lowConcurrencyParallelReads_twoRepos() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test1");
+ InMemoryRepository r2 = createRepoWithBitmap("test2");
+ resetCache(2);
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
+ DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
+ // Safety check that both repos have the same number of packs.
+ assertEquals(r1Packs.length, r2Packs.length);
+
+ for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
+ DfsPackFile pack1 = r1Packs[i];
+ DfsPackFile pack2 = r2Packs[i];
+ if (pack1.isGarbage() || pack2.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack1.getBitmapIndex(reader));
+ asyncRun(() -> pack2.getBitmapIndex(reader));
+ }
+
+ waitForExecutorPoolTermination();
+ assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void lowConcurrencyParallelReads_twoReposAndIndex()
+ throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test1");
+ InMemoryRepository r2 = createRepoWithBitmap("test2");
+ resetCache(2);
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
+ DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
+ // Safety check that both repos have the same number of packs.
+ assertEquals(r1Packs.length, r2Packs.length);
+
+ for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
+ DfsPackFile pack1 = r1Packs[i];
+ DfsPackFile pack2 = r2Packs[i];
+ if (pack1.isGarbage() || pack2.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack1.getBitmapIndex(reader));
+ asyncRun(() -> pack1.getPackIndex(reader));
+ asyncRun(() -> pack2.getBitmapIndex(reader));
+ }
+ waitForExecutorPoolTermination();
+
+ assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ // Index is loaded once for each repo.
+ assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(2, cache.getMissCount()[0]);
+ }
+
+ @SuppressWarnings("resource")
+ @Test
+ public void highConcurrencyParallelReads_oneRepo() throws Exception {
+ InMemoryRepository r1 = createRepoWithBitmap("test");
+ resetCache();
+
+ DfsReader reader = (DfsReader) r1.newObjectReader();
+ for (DfsPackFile pack : r1.getObjectDatabase().getPacks()) {
+ // Only load non-garbage pack with bitmap.
+ if (pack.isGarbage()) {
+ continue;
+ }
+ asyncRun(() -> pack.getBitmapIndex(reader));
+ asyncRun(() -> pack.getPackIndex(reader));
+ asyncRun(() -> pack.getBitmapIndex(reader));
+ }
+ waitForExecutorPoolTermination();
+
+ assertEquals(1, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
+ assertEquals(1, cache.getMissCount()[PackExt.INDEX.ordinal()]);
+ assertEquals(1, cache.getMissCount()[0]);
+ }
+
private void resetCache() {
- DfsBlockCache.reconfigure(new DfsBlockCacheConfig()
- .setBlockSize(512)
- .setBlockLimit(1 << 20));
+ resetCache(32);
+ }
+
+ private void resetCache(int concurrencyLevel) {
+ DfsBlockCache.reconfigure(new DfsBlockCacheConfig().setBlockSize(512)
+ .setConcurrencyLevel(concurrencyLevel).setBlockLimit(1 << 20));
cache = DfsBlockCache.getInstance();
}
+
+ private InMemoryRepository createRepoWithBitmap(String repoName)
+ throws Exception {
+ DfsRepositoryDescription repoDesc = new DfsRepositoryDescription(
+ repoName);
+ InMemoryRepository repo = new InMemoryRepository(repoDesc);
+ try (TestRepository<InMemoryRepository> repository = new TestRepository<>(
+ repo)) {
+ RevCommit commit = repository.branch("/refs/ref1" + repoName)
+ .commit().add("blob1", "blob1" + repoName).create();
+ repository.branch("/refs/ref2" + repoName).commit()
+ .add("blob2", "blob2" + repoName).parent(commit).create();
+ }
+ new DfsGarbageCollector(repo).pack(null);
+ return repo;
+ }
+
+ private void asyncRun(Callable<?> call) {
+ pool.execute(() -> {
+ try {
+ call.call();
+ } catch (Exception e) {
+ // Ignore.
+ }
+ });
+ }
+
+ private void waitForExecutorPoolTermination() throws Exception {
+ pool.shutdown();
+ pool.awaitTermination(500, MILLISECONDS);
+ assertTrue("Threads did not complete, likely due to a deadlock.",
+ pool.isTerminated());
+ }
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFileTest.java
new file mode 100644
index 0000000000..11741b41aa
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFileTest.java
@@ -0,0 +1,636 @@
+/*
+ * Copyright (C) 2008, 2021 Google Inc. and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.internal.transport.ssh;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.time.Instant;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.transport.SshConfigStore.HostConfig;
+import org.eclipse.jgit.transport.SshConstants;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
+import org.eclipse.jgit.util.SystemReader;
+import org.junit.Before;
+import org.junit.Test;
+
+public class OpenSshConfigFileTest extends RepositoryTestCase {
+
+ private File home;
+
+ private File configFile;
+
+ private OpenSshConfigFile osc;
+
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+
+ home = new File(trash, "home");
+ FileUtils.mkdir(home);
+
+ configFile = new File(new File(home, ".ssh"), Constants.CONFIG);
+ FileUtils.mkdir(configFile.getParentFile());
+
+ mockSystemReader.setProperty(Constants.OS_USER_NAME_KEY, "jex_junit");
+ mockSystemReader.setProperty("TST_VAR", "TEST");
+ osc = new OpenSshConfigFile(home, configFile, "jex_junit");
+ }
+
+ private void config(String data) throws IOException {
+ FS fs = FS.DETECTED;
+ long resolution = FS.getFileStoreAttributes(configFile.toPath())
+ .getFsTimestampResolution().toNanos();
+ Instant lastMtime = fs.lastModifiedInstant(configFile);
+ do {
+ try (final OutputStreamWriter fw = new OutputStreamWriter(
+ new FileOutputStream(configFile), UTF_8)) {
+ fw.write(data);
+ TimeUnit.NANOSECONDS.sleep(resolution);
+ } catch (InterruptedException e) {
+ Thread.interrupted();
+ }
+ } while (lastMtime.equals(fs.lastModifiedInstant(configFile)));
+ }
+
+ private HostConfig lookup(String hostname) {
+ return osc.lookupDefault(hostname, 0, null);
+ }
+
+ private void assertHost(String expected, HostConfig h) {
+ assertEquals(expected, h.getValue(SshConstants.HOST_NAME));
+ }
+
+ private void assertUser(String expected, HostConfig h) {
+ assertEquals(expected, h.getValue(SshConstants.USER));
+ }
+
+ private void assertPort(int expected, HostConfig h) {
+ assertEquals(expected,
+ OpenSshConfigFile.positive(h.getValue(SshConstants.PORT)));
+ }
+
+ private void assertIdentity(File expected, HostConfig h) {
+ String actual = h.getValue(SshConstants.IDENTITY_FILE);
+ if (expected == null) {
+ assertNull(actual);
+ } else {
+ assertEquals(expected, new File(actual));
+ }
+ }
+
+ private void assertAttempts(int expected, HostConfig h) {
+ assertEquals(expected, OpenSshConfigFile
+ .positive(h.getValue(SshConstants.CONNECTION_ATTEMPTS)));
+ }
+
+ @Test
+ public void testNoConfig() {
+ final HostConfig h = lookup("repo.or.cz");
+ assertNotNull(h);
+ assertHost("repo.or.cz", h);
+ assertUser("jex_junit", h);
+ assertPort(22, h);
+ assertAttempts(1, h);
+ assertIdentity(null, h);
+ }
+
+ @Test
+ public void testSeparatorParsing() throws Exception {
+ config("Host\tfirst\n" +
+ "\tHostName\tfirst.tld\n" +
+ "\n" +
+ "Host second\n" +
+ " HostName\tsecond.tld\n" +
+ "Host=third\n" +
+ "HostName=third.tld\n\n\n" +
+ "\t Host = fourth\n\n\n" +
+ " \t HostName\t=fourth.tld\n" +
+ "Host\t = last\n" +
+ "HostName \t last.tld");
+ assertNotNull(lookup("first"));
+ assertHost("first.tld", lookup("first"));
+ assertNotNull(lookup("second"));
+ assertHost("second.tld", lookup("second"));
+ assertNotNull(lookup("third"));
+ assertHost("third.tld", lookup("third"));
+ assertNotNull(lookup("fourth"));
+ assertHost("fourth.tld", lookup("fourth"));
+ assertNotNull(lookup("last"));
+ assertHost("last.tld", lookup("last"));
+ }
+
+ @Test
+ public void testQuoteParsing() throws Exception {
+ config("Host \"good\"\n" +
+ " HostName=\"good.tld\"\n" +
+ " Port=\"6007\"\n" +
+ " User=\"gooduser\"\n" +
+ "Host multiple unquoted and \"quoted\" \"hosts\"\n" +
+ " Port=\"2222\"\n" +
+ "Host \"spaced\"\n" +
+ "# Bad host name, but testing preservation of spaces\n" +
+ " HostName=\" spaced\ttld \"\n" +
+ "# Misbalanced quotes\n" +
+ "Host \"bad\"\n" +
+ "# OpenSSH doesn't allow this but ...\n" +
+ " HostName=bad.tld\"\n");
+ assertHost("good.tld", lookup("good"));
+ assertUser("gooduser", lookup("good"));
+ assertPort(6007, lookup("good"));
+ assertPort(2222, lookup("multiple"));
+ assertPort(2222, lookup("quoted"));
+ assertPort(2222, lookup("and"));
+ assertPort(2222, lookup("unquoted"));
+ assertPort(2222, lookup("hosts"));
+ assertHost(" spaced\ttld ", lookup("spaced"));
+ assertHost("bad.tld", lookup("bad"));
+ }
+
+ @Test
+ public void testAdvancedParsing() throws Exception {
+ // Escaped quotes, and line comments
+ config("Host foo\n"
+ + " HostName=\"foo\\\"d.tld\"\n"
+ + " User= someone#foo\n"
+ + "Host bar\n"
+ + " User ' some one#two' # Comment\n"
+ + " GlobalKnownHostsFile '/a folder/with spaces/hosts' '/other/more hosts' # Comment\n"
+ + "Host foobar\n"
+ + " User a\\ u\\ thor\n"
+ + "Host backslash\n"
+ + " User some\\one\\\\\\ foo\n"
+ + "Host backslash_before_quote\n"
+ + " User \\\"someone#\"el#se\" #Comment\n"
+ + "Host backslash_in_quote\n"
+ + " User 'some\\one\\\\\\ foo'\n");
+ assertHost("foo\"d.tld", lookup("foo"));
+ assertUser("someone#foo", lookup("foo"));
+ HostConfig c = lookup("bar");
+ assertUser(" some one#two", c);
+ assertArrayEquals(
+ new Object[] { "/a folder/with spaces/hosts",
+ "/other/more hosts" },
+ c.getValues("GlobalKnownHostsFile").toArray());
+ assertUser("a u thor", lookup("foobar"));
+ assertUser("some\\one\\ foo", lookup("backslash"));
+ assertUser("\"someone#el#se", lookup("backslash_before_quote"));
+ assertUser("some\\one\\\\ foo", lookup("backslash_in_quote"));
+ }
+
+ @Test
+ public void testCaseInsensitiveKeyLookup() throws Exception {
+ config("Host orcz\n" + "Port 29418\n"
+ + "\tHostName repo.or.cz\nStrictHostKeyChecking yes\n");
+ final HostConfig c = lookup("orcz");
+ String exactCase = c.getValue("StrictHostKeyChecking");
+ assertEquals("yes", exactCase);
+ assertEquals(exactCase, c.getValue("stricthostkeychecking"));
+ assertEquals(exactCase, c.getValue("STRICTHOSTKEYCHECKING"));
+ assertEquals(exactCase, c.getValue("sTrIcThostKEYcheckING"));
+ assertNull(c.getValue("sTrIcThostKEYcheckIN"));
+ }
+
+ @Test
+ public void testAlias_DoesNotMatch() throws Exception {
+ config("Host orcz\n" + "Port 29418\n"
+ + "\tHostName repo.or.cz\n");
+ final HostConfig h = lookup("repo.or.cz");
+ assertNotNull(h);
+ assertHost("repo.or.cz", h);
+ assertUser("jex_junit", h);
+ assertPort(22, h);
+ assertIdentity(null, h);
+ final HostConfig h2 = lookup("orcz");
+ assertHost("repo.or.cz", h);
+ assertUser("jex_junit", h);
+ assertPort(29418, h2);
+ assertIdentity(null, h);
+ }
+
+ @Test
+ public void testAlias_OptionsSet() throws Exception {
+ config("Host orcz\n" + "\tHostName repo.or.cz\n" + "\tPort 2222\n"
+ + "\tUser jex\n" + "\tIdentityFile .ssh/id_jex\n"
+ + "\tForwardX11 no\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertHost("repo.or.cz", h);
+ assertUser("jex", h);
+ assertPort(2222, h);
+ assertIdentity(new File(home, ".ssh/id_jex"), h);
+ }
+
+ @Test
+ public void testAlias_OptionsKeywordCaseInsensitive() throws Exception {
+ config("hOsT orcz\n" + "\thOsTnAmE repo.or.cz\n" + "\tPORT 2222\n"
+ + "\tuser jex\n" + "\tidentityfile .ssh/id_jex\n"
+ + "\tForwardX11 no\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertHost("repo.or.cz", h);
+ assertUser("jex", h);
+ assertPort(2222, h);
+ assertIdentity(new File(home, ".ssh/id_jex"), h);
+ }
+
+ @Test
+ public void testAlias_OptionsInherit() throws Exception {
+ config("Host orcz\n" + "\tHostName repo.or.cz\n" + "\n" + "Host *\n"
+ + "\tHostName not.a.host.example.com\n" + "\tPort 2222\n"
+ + "\tUser jex\n" + "\tIdentityFile .ssh/id_jex\n"
+ + "\tForwardX11 no\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertHost("repo.or.cz", h);
+ assertUser("jex", h);
+ assertPort(2222, h);
+ assertIdentity(new File(home, ".ssh/id_jex"), h);
+ }
+
+ @Test
+ public void testAlias_PreferredAuthenticationsDefault() throws Exception {
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertNull(h.getValue(SshConstants.PREFERRED_AUTHENTICATIONS));
+ }
+
+ @Test
+ public void testAlias_PreferredAuthentications() throws Exception {
+ config("Host orcz\n" + "\tPreferredAuthentications publickey\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertEquals("publickey",
+ h.getValue(SshConstants.PREFERRED_AUTHENTICATIONS));
+ }
+
+ @Test
+ public void testAlias_InheritPreferredAuthentications() throws Exception {
+ config("Host orcz\n" + "\tHostName repo.or.cz\n" + "\n" + "Host *\n"
+ + "\tPreferredAuthentications 'publickey, hostbased'\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertEquals("publickey,hostbased",
+ h.getValue(SshConstants.PREFERRED_AUTHENTICATIONS));
+ }
+
+ @Test
+ public void testAlias_BatchModeDefault() throws Exception {
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertNull(h.getValue(SshConstants.BATCH_MODE));
+ }
+
+ @Test
+ public void testAlias_BatchModeYes() throws Exception {
+ config("Host orcz\n" + "\tBatchMode yes\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertTrue(OpenSshConfigFile.flag(h.getValue(SshConstants.BATCH_MODE)));
+ }
+
+ @Test
+ public void testAlias_InheritBatchMode() throws Exception {
+ config("Host orcz\n" + "\tHostName repo.or.cz\n" + "\n" + "Host *\n"
+ + "\tBatchMode yes\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertTrue(OpenSshConfigFile.flag(h.getValue(SshConstants.BATCH_MODE)));
+ }
+
+ @Test
+ public void testAlias_ConnectionAttemptsDefault() throws Exception {
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertAttempts(1, h);
+ }
+
+ @Test
+ public void testAlias_ConnectionAttempts() throws Exception {
+ config("Host orcz\n" + "\tConnectionAttempts 5\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertAttempts(5, h);
+ }
+
+ @Test
+ public void testAlias_invalidConnectionAttempts() throws Exception {
+ config("Host orcz\n" + "\tConnectionAttempts -1\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertAttempts(1, h);
+ }
+
+ @Test
+ public void testAlias_badConnectionAttempts() throws Exception {
+ config("Host orcz\n" + "\tConnectionAttempts xxx\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertAttempts(1, h);
+ }
+
+ @Test
+ public void testDefaultBlock() throws Exception {
+ config("ConnectionAttempts 5\n\nHost orcz\nConnectionAttempts 3\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertAttempts(5, h);
+ }
+
+ @Test
+ public void testHostCaseInsensitive() throws Exception {
+ config("hOsT orcz\nConnectionAttempts 3\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertAttempts(3, h);
+ }
+
+ @Test
+ public void testListValueSingle() throws Exception {
+ config("Host orcz\nUserKnownHostsFile /foo/bar\n");
+ final HostConfig c = lookup("orcz");
+ assertNotNull(c);
+ assertEquals("/foo/bar", c.getValue("UserKnownHostsFile"));
+ }
+
+ @Test
+ public void testListValueMultiple() throws Exception {
+ // Tilde expansion occurs within the parser
+ config("Host orcz\nUserKnownHostsFile \"~/foo/ba z\" /foo/bar \n");
+ final HostConfig c = lookup("orcz");
+ assertNotNull(c);
+ assertArrayEquals(new Object[] { new File(home, "foo/ba z").getPath(),
+ "/foo/bar" },
+ c.getValues("UserKnownHostsFile").toArray());
+ }
+
+ @Test
+ public void testRepeatedLookupsWithModification() throws Exception {
+ config("Host orcz\n" + "\tConnectionAttempts -1\n");
+ final HostConfig h1 = lookup("orcz");
+ assertNotNull(h1);
+ assertAttempts(1, h1);
+ config("Host orcz\n" + "\tConnectionAttempts 5\n");
+ final HostConfig h2 = lookup("orcz");
+ assertNotNull(h2);
+ assertNotSame(h1, h2);
+ assertAttempts(5, h2);
+ assertAttempts(1, h1);
+ assertNotSame(h1, h2);
+ }
+
+ @Test
+ public void testIdentityFile() throws Exception {
+ config("Host orcz\nIdentityFile \"~/foo/ba z\"\nIdentityFile /foo/bar");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ // Does tilde replacement
+ assertArrayEquals(new Object[] { new File(home, "foo/ba z").getPath(),
+ "/foo/bar" },
+ h.getValues(SshConstants.IDENTITY_FILE).toArray());
+ }
+
+ @Test
+ public void testMultiIdentityFile() throws Exception {
+ config("IdentityFile \"~/foo/ba z\"\nHost orcz\nIdentityFile /foo/bar\nHOST *\nIdentityFile /foo/baz");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertArrayEquals(new Object[] { new File(home, "foo/ba z").getPath(),
+ "/foo/bar", "/foo/baz" },
+ h.getValues(SshConstants.IDENTITY_FILE).toArray());
+ }
+
+ @Test
+ public void testNegatedPattern() throws Exception {
+ config("Host repo.or.cz\nIdentityFile ~/foo/bar\nHOST !*.or.cz\nIdentityFile /foo/baz");
+ final HostConfig h = lookup("repo.or.cz");
+ assertNotNull(h);
+ assertIdentity(new File(home, "foo/bar"), h);
+ assertArrayEquals(new Object[] { new File(home, "foo/bar").getPath() },
+ h.getValues(SshConstants.IDENTITY_FILE).toArray());
+ }
+
+ @Test
+ public void testPattern() throws Exception {
+ config("Host repo.or.cz\nIdentityFile ~/foo/bar\nHOST *.or.cz\nIdentityFile /foo/baz");
+ final HostConfig h = lookup("repo.or.cz");
+ assertNotNull(h);
+ assertIdentity(new File(home, "foo/bar"), h);
+ assertArrayEquals(new Object[] { new File(home, "foo/bar").getPath(),
+ "/foo/baz" },
+ h.getValues(SshConstants.IDENTITY_FILE).toArray());
+ }
+
+ @Test
+ public void testMultiHost() throws Exception {
+ config("Host orcz *.or.cz\nIdentityFile ~/foo/bar\nHOST *.or.cz\nIdentityFile /foo/baz");
+ final HostConfig h1 = lookup("repo.or.cz");
+ assertNotNull(h1);
+ assertIdentity(new File(home, "foo/bar"), h1);
+ assertArrayEquals(new Object[] { new File(home, "foo/bar").getPath(),
+ "/foo/baz" },
+ h1.getValues(SshConstants.IDENTITY_FILE).toArray());
+ final HostConfig h2 = lookup("orcz");
+ assertNotNull(h2);
+ assertIdentity(new File(home, "foo/bar"), h2);
+ assertArrayEquals(new Object[] { new File(home, "foo/bar").getPath() },
+ h2.getValues(SshConstants.IDENTITY_FILE).toArray());
+ }
+
+ @Test
+ public void testEqualsSign() throws Exception {
+ config("Host=orcz\n\tConnectionAttempts = 5\n\tUser=\t foobar\t\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertAttempts(5, h);
+ assertUser("foobar", h);
+ }
+
+ @Test
+ public void testMissingArgument() throws Exception {
+ config("Host=orcz\n\tSendEnv\nIdentityFile\t\nForwardX11\n\tUser=\t foobar\t\n");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertUser("foobar", h);
+ assertEquals("[]", h.getValues("SendEnv").toString());
+ assertIdentity(null, h);
+ assertNull(h.getValue("ForwardX11"));
+ }
+
+ @Test
+ public void testHomeDirUserReplacement() throws Exception {
+ config("Host=orcz\n\tIdentityFile %d/.ssh/%u_id_dsa");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertIdentity(new File(new File(home, ".ssh"), "jex_junit_id_dsa"), h);
+ }
+
+ @Test
+ public void testHostnameReplacement() throws Exception {
+ config("Host=orcz\nHost *.*\n\tHostname %h\nHost *\n\tHostname %h.example.org");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertHost("orcz.example.org", h);
+ }
+
+ @Test
+ public void testRemoteUserReplacement() throws Exception {
+ config("Host=orcz\n\tUser foo\n" + "Host *.*\n\tHostname %h\n"
+ + "Host *\n\tHostname %h.ex%%20ample.org\n\tIdentityFile ~/.ssh/%h_%r_id_dsa");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertIdentity(
+ new File(new File(home, ".ssh"),
+ "orcz.ex%20ample.org_foo_id_dsa"),
+ h);
+ }
+
+ @Test
+ public void testLocalhostFQDNReplacement() throws Exception {
+ String localhost = SystemReader.getInstance().getHostname();
+ config("Host=orcz\n\tIdentityFile ~/.ssh/%l_id_dsa");
+ final HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertIdentity(
+ new File(new File(home, ".ssh"), localhost + "_id_dsa"),
+ h);
+ }
+
+ @Test
+ public void testPubKeyAcceptedAlgorithms() throws Exception {
+ config("Host=orcz\n\tPubkeyAcceptedAlgorithms ^ssh-rsa");
+ HostConfig h = lookup("orcz");
+ assertEquals("^ssh-rsa",
+ h.getValue(SshConstants.PUBKEY_ACCEPTED_ALGORITHMS));
+ assertEquals("^ssh-rsa", h.getValue("PubkeyAcceptedKeyTypes"));
+ }
+
+ @Test
+ public void testPubKeyAcceptedKeyTypes() throws Exception {
+ config("Host=orcz\n\tPubkeyAcceptedKeyTypes ^ssh-rsa");
+ HostConfig h = lookup("orcz");
+ assertEquals("^ssh-rsa",
+ h.getValue(SshConstants.PUBKEY_ACCEPTED_ALGORITHMS));
+ assertEquals("^ssh-rsa", h.getValue("PubkeyAcceptedKeyTypes"));
+ }
+
+ @Test
+ public void testEolComments() throws Exception {
+ config("#Comment\nHost=orcz #Comment\n\tPubkeyAcceptedAlgorithms ^ssh-rsa # Comment\n#Comment");
+ HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertEquals("^ssh-rsa",
+ h.getValue(SshConstants.PUBKEY_ACCEPTED_ALGORITHMS));
+ }
+
+ @Test
+ public void testEnVarSubstitution() throws Exception {
+ config("Host orcz\nIdentityFile /tmp/${TST_VAR}\n"
+ + "CertificateFile /tmp/${}/foo\nUser ${TST_VAR}\nIdentityAgent /tmp/${TST_VAR/bar");
+ HostConfig h = lookup("orcz");
+ assertNotNull(h);
+ assertEquals("/tmp/TEST",
+ h.getValue(SshConstants.IDENTITY_FILE));
+ // No variable name
+ assertEquals("/tmp/${}/foo", h.getValue(SshConstants.CERTIFICATE_FILE));
+ // User doesn't get env var substitution:
+ assertUser("${TST_VAR}", h);
+ // Unterminated:
+ assertEquals("/tmp/${TST_VAR/bar",
+ h.getValue(SshConstants.IDENTITY_AGENT));
+ }
+
+ @Test
+ public void testNegativeMatch() throws Exception {
+ config("Host foo.bar !foobar.baz *.baz\n" + "Port 29418\n");
+ HostConfig h = lookup("foo.bar");
+ assertNotNull(h);
+ assertPort(29418, h);
+ h = lookup("foobar.baz");
+ assertNotNull(h);
+ assertPort(22, h);
+ h = lookup("foo.baz");
+ assertNotNull(h);
+ assertPort(29418, h);
+ }
+
+ @Test
+ public void testNegativeMatch2() throws Exception {
+ // Negative match after the positive match.
+ config("Host foo.bar *.baz !foobar.baz\n" + "Port 29418\n");
+ HostConfig h = lookup("foo.bar");
+ assertNotNull(h);
+ assertPort(29418, h);
+ h = lookup("foobar.baz");
+ assertNotNull(h);
+ assertPort(22, h);
+ h = lookup("foo.baz");
+ assertNotNull(h);
+ assertPort(29418, h);
+ }
+
+ @Test
+ public void testNoMatch() throws Exception {
+ config("Host !host1 !host2\n" + "Port 29418\n");
+ HostConfig h = lookup("host1");
+ assertNotNull(h);
+ assertPort(22, h);
+ h = lookup("host2");
+ assertNotNull(h);
+ assertPort(22, h);
+ h = lookup("host3");
+ assertNotNull(h);
+ assertPort(22, h);
+ }
+
+ @Test
+ public void testMultipleMatch() throws Exception {
+ config("Host foo.bar\nPort 29418\nIdentityFile /foo\n\n"
+ + "Host *.bar\nPort 22\nIdentityFile /bar\n"
+ + "Host foo.bar\nPort 47\nIdentityFile /baz\n");
+ HostConfig h = lookup("foo.bar");
+ assertNotNull(h);
+ assertPort(29418, h);
+ assertArrayEquals(new Object[] { "/foo", "/bar", "/baz" },
+ h.getValues(SshConstants.IDENTITY_FILE).toArray());
+ }
+
+ @Test
+ public void testWhitespace() throws Exception {
+ config("Host foo \tbar baz\nPort 29418\n");
+ HostConfig h = lookup("foo");
+ assertNotNull(h);
+ assertPort(29418, h);
+ h = lookup("bar");
+ assertNotNull(h);
+ assertPort(29418, h);
+ h = lookup("baz");
+ assertNotNull(h);
+ assertPort(29418, h);
+ h = lookup("\tbar");
+ assertNotNull(h);
+ assertPort(22, h);
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
index fe3c1db502..9ee54d5b60 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.junit.JGitTestUtil;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.merge.MergeConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig;
+import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
@@ -1471,14 +1472,17 @@ public class ConfigTest {
// no values defined nowhere
Config config = new Config(null);
assertNull(config.get(CommitConfig.KEY).getCommitTemplatePath());
- assertNull(config.get(CommitConfig.KEY).getCommitTemplateContent());
+ assertNull(config.get(CommitConfig.KEY)
+ .getCommitTemplateContent(null));
}
@Test
public void testCommitTemplateConfig()
throws ConfigInvalidException, IOException {
+ File workTree = tmp.newFolder("dummy-worktree");
File tempFile = tmp.newFile("testCommitTemplate-");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
String expectedTemplatePath = tempFile.getPath();
@@ -1492,7 +1496,32 @@ public class ConfigTest {
.getCommitEncoding();
assertEquals(expectedTemplatePath, templatePath);
assertEquals(templateContent,
- config.get(CommitConfig.KEY).getCommitTemplateContent());
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
+ assertNull("no commitEncoding has been set so it must be null",
+ commitEncoding);
+ }
+
+ @Test
+ public void testCommitTemplateConfigRelativePath()
+ throws ConfigInvalidException, IOException {
+
+ File workTree = tmp.newFolder("dummy-worktree");
+ File tempFile = tmp.newFile("testCommitTemplate-");
+ String templateContent = "content of the template";
+ JGitTestUtil.write(tempFile, templateContent);
+ String expectedTemplatePath = "../" + tempFile.getName();
+
+ Config config = parse(
+ "[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
+
+ String templatePath = config.get(CommitConfig.KEY)
+ .getCommitTemplatePath();
+ String commitEncoding = config.get(CommitConfig.KEY)
+ .getCommitEncoding();
+ assertEquals(expectedTemplatePath, templatePath);
+ assertEquals(templateContent, config.get(CommitConfig.KEY)
+ .getCommitTemplateContent(
+ new RepositoryBuilder().setWorkTree(workTree).build()));
assertNull("no commitEncoding has been set so it must be null",
commitEncoding);
}
@@ -1501,6 +1530,8 @@ public class ConfigTest {
public void testCommitTemplateEncoding()
throws ConfigInvalidException, IOException {
Config config = new Config(null);
+ File workTree = tmp.newFolder("dummy-worktree");
+ Repository repo = FileRepositoryBuilder.create(workTree);
File tempFile = tmp.newFile("testCommitTemplate-");
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
@@ -1508,7 +1539,7 @@ public class ConfigTest {
config = parse("[i18n]\n\tcommitEncoding = utf-8\n"
+ "[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
assertEquals(templateContent,
- config.get(CommitConfig.KEY).getCommitTemplateContent());
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
String commitEncoding = config.get(CommitConfig.KEY)
.getCommitEncoding();
assertEquals("commitEncoding has been set to utf-8 it must be utf-8",
@@ -1520,6 +1551,8 @@ public class ConfigTest {
throws ConfigInvalidException, IOException {
Config config = new Config(null);
File tempFile = tmp.newFile("testCommitTemplate-");
+ File workTree = tmp.newFolder("dummy-worktree");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
// proper evaluation of the ~/ directory
@@ -1535,35 +1568,39 @@ public class ConfigTest {
.getCommitTemplatePath();
assertEquals(expectedTemplatePath, templatePath);
assertEquals(templateContent,
- config.get(CommitConfig.KEY).getCommitTemplateContent());
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
}
@Test(expected = ConfigInvalidException.class)
public void testCommitTemplateWithInvalidEncoding()
throws ConfigInvalidException, IOException {
Config config = new Config(null);
+ File workTree = tmp.newFolder("dummy-worktree");
File tempFile = tmp.newFile("testCommitTemplate-");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
config = parse("[i18n]\n\tcommitEncoding = invalidEcoding\n"
+ "[commit]\n\ttemplate = " + tempFile.getPath() + "\n");
- config.get(CommitConfig.KEY).getCommitTemplateContent();
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo);
}
@Test(expected = FileNotFoundException.class)
public void testCommitTemplateWithInvalidPath()
throws ConfigInvalidException, IOException {
Config config = new Config(null);
+ File workTree = tmp.newFolder("dummy-worktree");
File tempFile = tmp.newFile("testCommitTemplate-");
+ Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
// commit message encoding
- String expectedTemplatePath = "nonExistingTemplate";
+ String expectedTemplatePath = "/nonExistingTemplate";
config = parse("[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
String templatePath = config.get(CommitConfig.KEY)
.getCommitTemplatePath();
assertEquals(expectedTemplatePath, templatePath);
- config.get(CommitConfig.KEY).getCommitTemplateContent();
+ config.get(CommitConfig.KEY).getCommitTemplateContent(repo);
}
private static void assertValueRoundTrip(String value)
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java
index b943486b1b..af8a58f6f0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java
@@ -337,6 +337,34 @@ public class DirCacheCheckoutTest extends RepositoryTestCase {
"first line\r\nsecond line\r\n", "f text=auto eol=crlf");
}
+ @Test
+ public void testCheckoutMixedAutoEolCrLf() throws Exception {
+ checkoutLineEndings("first line\nsecond line\r\n",
+ "first line\nsecond line\r\n", "f text=auto eol=crlf");
+ }
+
+ @Test
+ public void testCheckoutMixedAutoEolLf() throws Exception {
+ checkoutLineEndings("first line\nsecond line\r\n",
+ "first line\nsecond line\r\n", "f text=auto eol=lf");
+ }
+
+ @Test
+ public void testCheckoutMixedTextCrLf() throws Exception {
+ // Huh? Is this a bug in git? Both git 2.18.0 and git 2.33.0 do
+ // write the file with CRLF (and consequently report the file as
+ // modified in "git status" after check-out), however the CRLF in the
+ // repository is _not_ replaced by LF with eol=lf (see test below).
+ checkoutLineEndings("first line\nsecond line\r\n",
+ "first line\r\nsecond line\r\n", "f text eol=crlf");
+ }
+
+ @Test
+ public void testCheckoutMixedTextLf() throws Exception {
+ checkoutLineEndings("first line\nsecond line\r\nfoo",
+ "first line\nsecond line\r\nfoo", "f text eol=lf");
+ }
+
private DirCacheCheckout resetHard(RevCommit commit)
throws NoWorkTreeException,
CorruptObjectException, IOException {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java
index 6cbb4a89b2..dd8573d2bc 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java
@@ -33,6 +33,7 @@ import org.eclipse.jgit.api.RebaseResult;
import org.eclipse.jgit.api.errors.CheckoutConflictException;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.JGitInternalException;
+import org.eclipse.jgit.diff.RawText;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheEditor;
import org.eclipse.jgit.dircache.DirCacheEntry;
@@ -826,6 +827,8 @@ public class MergerTest extends RepositoryTestCase {
RevCommit sideCommit = git.commit().setAll(true)
.setMessage("modified file l 1500").call();
+ int originalBufferSize = RawText.getBufferSize();
+ int smallBufferSize = RawText.setBufferSize(8000);
try (ObjectInserter ins = db.newObjectInserter()) {
// Check that we don't read the large blobs.
ObjectInserter forbidInserter = new ObjectInserter.Filter() {
@@ -836,7 +839,8 @@ public class MergerTest extends RepositoryTestCase {
@Override
public ObjectReader newReader() {
- return new BigReadForbiddenReader(super.newReader(), 8000);
+ return new BigReadForbiddenReader(super.newReader(),
+ smallBufferSize);
}
};
@@ -844,6 +848,8 @@ public class MergerTest extends RepositoryTestCase {
(ResolveMerger) strategy.newMerger(forbidInserter, db.getConfig());
boolean noProblems = merger.merge(masterCommit, sideCommit);
assertFalse(noProblems);
+ } finally {
+ RawText.setBufferSize(originalBufferSize);
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
index ffea980f11..d1e5446827 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
@@ -142,7 +142,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
rp.setAdvertiseRefsHook(new AdvertiseRefsHook() {
@Override
public void advertiseRefs(ReceivePack rp2)
- throws ServiceMayNotContinueException {
+ throws IOException {
rp.setAdvertisedRefs(rp.getRepository().getAllRefs(),
null);
new HidePrivateHook().advertiseRefs(rp);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
index f4bbb4c9f8..1c5a521801 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
@@ -34,7 +34,6 @@ import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.storage.dfs.DfsGarbageCollector;
import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.internal.storage.pack.CachedPack;
import org.eclipse.jgit.internal.storage.pack.CachedPackUriProvider;
import org.eclipse.jgit.junit.TestRepository;
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
index 8de7ba6c1d..171d80c3da 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
@@ -19,7 +19,6 @@ import static org.junit.Assume.assumeTrue;
import java.io.File;
import java.io.IOException;
-import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
@@ -182,7 +181,7 @@ public class FSTest {
FS.readPipe(fs.userHome(),
new String[] { "/bin/sh", "-c", "exit 1" },
- Charset.defaultCharset().name());
+ SystemReader.getInstance().getDefaultCharset().name());
}
@Test(expected = CommandFailedException.class)
@@ -192,7 +191,7 @@ public class FSTest {
FS.readPipe(fs.userHome(),
new String[] { "this-command-does-not-exist" },
- Charset.defaultCharset().name());
+ SystemReader.getInstance().getDefaultCharset().name());
}
@Test
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java
index 82c0afec5f..aa7247e105 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java
@@ -12,6 +12,7 @@ package org.eclipse.jgit.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
@@ -70,4 +71,86 @@ public class StringUtilsTest {
assertEquals("a b c d",
StringUtils.replaceLineBreaksWithSpace("a\r\nb\nc d"));
}
+
+ @Test
+ public void testFormatWithSuffix() {
+ assertEquals("1023", StringUtils.formatWithSuffix(1023));
+ assertEquals("1k", StringUtils.formatWithSuffix(1024));
+ assertEquals("1025", StringUtils.formatWithSuffix(1025));
+ assertEquals("1048575", StringUtils.formatWithSuffix(1024 * 1024 - 1));
+ assertEquals("1m", StringUtils.formatWithSuffix(1024 * 1024));
+ assertEquals("1048577", StringUtils.formatWithSuffix(1024 * 1024 + 1));
+ assertEquals("1073741823",
+ StringUtils.formatWithSuffix(1024 * 1024 * 1024 - 1));
+ assertEquals("1g", StringUtils.formatWithSuffix(1024 * 1024 * 1024));
+ assertEquals("1073741825",
+ StringUtils.formatWithSuffix(1024 * 1024 * 1024 + 1));
+ assertEquals("3k", StringUtils.formatWithSuffix(3 * 1024));
+ assertEquals("3m", StringUtils.formatWithSuffix(3 * 1024 * 1024));
+ assertEquals("2050k",
+ StringUtils.formatWithSuffix(2 * 1024 * 1024 + 2048));
+ assertEquals("3g",
+ StringUtils.formatWithSuffix(3L * 1024 * 1024 * 1024));
+ assertEquals("3000", StringUtils.formatWithSuffix(3000));
+ assertEquals("3000000", StringUtils.formatWithSuffix(3_000_000));
+ assertEquals("1953125k", StringUtils.formatWithSuffix(2_000_000_000));
+ assertEquals("2000000010", StringUtils.formatWithSuffix(2_000_000_010));
+ assertEquals("3000000000",
+ StringUtils.formatWithSuffix(3_000_000_000L));
+ }
+
+ @Test
+ public void testParseWithSuffix() {
+ assertEquals(1024, StringUtils.parseIntWithSuffix("1k", true));
+ assertEquals(1024, StringUtils.parseIntWithSuffix("1 k", true));
+ assertEquals(1024, StringUtils.parseIntWithSuffix("1 k", true));
+ assertEquals(1024, StringUtils.parseIntWithSuffix(" \t1 k \n", true));
+ assertEquals(1024, StringUtils.parseIntWithSuffix("1k", false));
+ assertEquals(1024, StringUtils.parseIntWithSuffix("1K", false));
+ assertEquals(1024 * 1024, StringUtils.parseIntWithSuffix("1m", false));
+ assertEquals(1024 * 1024, StringUtils.parseIntWithSuffix("1M", false));
+ assertEquals(-1024 * 1024,
+ StringUtils.parseIntWithSuffix("-1M", false));
+ assertEquals(1_000_000,
+ StringUtils.parseIntWithSuffix(" 1000000\r\n", false));
+ assertEquals(1024 * 1024 * 1024,
+ StringUtils.parseIntWithSuffix("1g", false));
+ assertEquals(1024 * 1024 * 1024,
+ StringUtils.parseIntWithSuffix("1G", false));
+ assertEquals(3L * 1024 * 1024 * 1024,
+ StringUtils.parseLongWithSuffix("3g", false));
+ assertEquals(3L * 1024 * 1024 * 1024,
+ StringUtils.parseLongWithSuffix("3G", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseIntWithSuffix("2G", false));
+ assertEquals(2L * 1024 * 1024 * 1024,
+ StringUtils.parseLongWithSuffix("2G", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("-1m", true));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("-1000", true));
+ assertThrows(StringIndexOutOfBoundsException.class,
+ () -> StringUtils.parseLongWithSuffix("", false));
+ assertThrows(StringIndexOutOfBoundsException.class,
+ () -> StringUtils.parseLongWithSuffix(" \t \n", false));
+ assertThrows(StringIndexOutOfBoundsException.class,
+ () -> StringUtils.parseLongWithSuffix("k", false));
+ assertThrows(StringIndexOutOfBoundsException.class,
+ () -> StringUtils.parseLongWithSuffix("m", false));
+ assertThrows(StringIndexOutOfBoundsException.class,
+ () -> StringUtils.parseLongWithSuffix("g", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("1T", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("1t", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("Nonumber", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("0x001f", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("beef", false));
+ assertThrows(NumberFormatException.class,
+ () -> StringUtils.parseLongWithSuffix("8000000000000000000G",
+ false));
+ }
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFInputStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFInputStreamTest.java
index ae8c7ec7a7..94429924b0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFInputStreamTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFInputStreamTest.java
@@ -17,6 +17,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import org.eclipse.jgit.diff.RawText;
import org.junit.Assert;
import org.junit.Test;
@@ -29,16 +30,17 @@ public class AutoCRLFInputStreamTest {
assertNoCrLf("\r\n", "\n");
assertNoCrLf("\r\n", "\r\n");
assertNoCrLf("\r\r", "\r\r");
- assertNoCrLf("\r\n\r", "\n\r");
+ assertNoCrLf("\n\r", "\n\r"); // Lone CR
assertNoCrLf("\r\n\r\r", "\r\n\r\r");
assertNoCrLf("\r\n\r\n", "\r\n\r\n");
- assertNoCrLf("\r\n\r\n\r", "\n\r\n\r");
+ assertNoCrLf("\n\r\n\r", "\n\r\n\r"); // Lone CR
assertNoCrLf("\0\n", "\0\n");
}
@Test
public void testBoundary() throws IOException {
- for (int i = AutoCRLFInputStream.BUFFER_SIZE - 10; i < AutoCRLFInputStream.BUFFER_SIZE + 10; i++) {
+ int boundary = RawText.getBufferSize();
+ for (int i = boundary - 10; i < boundary + 10; i++) {
String s1 = Strings.repeat("a", i);
assertNoCrLf(s1, s1);
String s2 = Strings.repeat("\0", i);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFOutputStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFOutputStreamTest.java
index 85ce5381f3..791727f734 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFOutputStreamTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/AutoCRLFOutputStreamTest.java
@@ -19,6 +19,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import org.eclipse.jgit.diff.RawText;
import org.junit.Assert;
import org.junit.Test;
@@ -31,16 +32,17 @@ public class AutoCRLFOutputStreamTest {
assertNoCrLf("\r\n", "\n");
assertNoCrLf("\r\n", "\r\n");
assertNoCrLf("\r\r", "\r\r");
- assertNoCrLf("\r\n\r", "\n\r");
+ assertNoCrLf("\n\r", "\n\r"); // Lone CR
assertNoCrLf("\r\n\r\r", "\r\n\r\r");
assertNoCrLf("\r\n\r\n", "\r\n\r\n");
- assertNoCrLf("\r\n\r\n\r", "\n\r\n\r");
+ assertNoCrLf("\n\r\n\r", "\n\r\n\r");
assertNoCrLf("\0\n", "\0\n");
}
@Test
public void testBoundary() throws IOException {
- for (int i = AutoCRLFOutputStream.BUFFER_SIZE - 10; i < AutoCRLFOutputStream.BUFFER_SIZE + 10; i++) {
+ int bufferSize = RawText.getBufferSize();
+ for (int i = bufferSize - 10; i < bufferSize + 10; i++) {
String s1 = Strings.repeat("a", i);
assertNoCrLf(s1, s1);
String s2 = Strings.repeat("\0", i);
diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
index eca60b79ef..14511cd6ab 100644
--- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
@@ -4,14 +4,14 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ui
Bundle-SymbolicName: org.eclipse.jgit.ui
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.jgit.awtui;version="6.0.0"
-Import-Package: org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.lib;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.nls;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revplot;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.revwalk;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.transport;version="[6.0.0,6.1.0)",
- org.eclipse.jgit.util;version="[6.0.0,6.1.0)"
+Export-Package: org.eclipse.jgit.awtui;version="6.1.0"
+Import-Package: org.eclipse.jgit.errors;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.lib;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.nls;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revplot;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.revwalk;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.transport;version="[6.1.0,6.2.0)",
+ org.eclipse.jgit.util;version="[6.1.0,6.2.0)"
diff --git a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
index df2ffdfc3a..3128bcd83e 100644
--- a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.ui - Sources
Bundle-SymbolicName: org.eclipse.jgit.ui.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ui;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ui;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml
index 139c7d824c..2dd9c80ec3 100644
--- a/org.eclipse.jgit.ui/pom.xml
+++ b/org.eclipse.jgit.ui/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ui</artifactId>
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index a6f9e48141..90e5ccba09 100644
--- a/org.eclipse.jgit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/MANIFEST.MF
@@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit
Bundle-SymbolicName: org.eclipse.jgit
-Bundle-Version: 6.0.0.qualifier
+Bundle-Version: 6.1.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Eclipse-ExtensibleAPI: true
-Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
- org.eclipse.jgit.api;version="6.0.0";
+Export-Package: org.eclipse.jgit.annotations;version="6.1.0",
+ org.eclipse.jgit.api;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.notes,
org.eclipse.jgit.dircache,
@@ -23,18 +23,18 @@ Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
org.eclipse.jgit.revwalk.filter,
org.eclipse.jgit.blame,
org.eclipse.jgit.merge",
- org.eclipse.jgit.api.errors;version="6.0.0";
+ org.eclipse.jgit.api.errors;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.errors",
- org.eclipse.jgit.attributes;version="6.0.0";
+ org.eclipse.jgit.attributes;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk",
- org.eclipse.jgit.blame;version="6.0.0";
+ org.eclipse.jgit.blame;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff",
- org.eclipse.jgit.diff;version="6.0.0";
+ org.eclipse.jgit.diff;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.attributes,
org.eclipse.jgit.revwalk,
@@ -42,44 +42,47 @@ Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.util",
- org.eclipse.jgit.dircache;version="6.0.0";
+ org.eclipse.jgit.dircache;version="6.1.0";
uses:="org.eclipse.jgit.events,
org.eclipse.jgit.lib,
org.eclipse.jgit.attributes,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.util",
- org.eclipse.jgit.errors;version="6.0.0";
+ org.eclipse.jgit.errors;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
org.eclipse.jgit.internal.storage.pack",
- org.eclipse.jgit.events;version="6.0.0";
+ org.eclipse.jgit.events;version="6.1.0";
uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.fnmatch;version="6.0.0",
- org.eclipse.jgit.gitrepo;version="6.0.0";
+ org.eclipse.jgit.fnmatch;version="6.1.0",
+ org.eclipse.jgit.gitrepo;version="6.1.0";
uses:="org.xml.sax.helpers,
org.eclipse.jgit.api,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.xml.sax",
- org.eclipse.jgit.gitrepo.internal;version="6.0.0";x-internal:=true,
- org.eclipse.jgit.hooks;version="6.0.0";uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.ignore;version="6.0.0",
- org.eclipse.jgit.ignore.internal;version="6.0.0";
+ org.eclipse.jgit.gitrepo.internal;version="6.1.0";x-internal:=true,
+ org.eclipse.jgit.hooks;version="6.1.0";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.ignore;version="6.1.0",
+ org.eclipse.jgit.ignore.internal;version="6.1.0";
x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal;version="6.0.0";
+ org.eclipse.jgit.internal;version="6.1.0";
x-friends:="org.eclipse.jgit.test,
org.eclipse.jgit.http.test",
- org.eclipse.jgit.internal.fsck;version="6.0.0";
+ org.eclipse.jgit.internal.diffmergetool;version="6.1.0";
+ x-friends:="org.eclipse.jgit.test,
+ org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.fsck;version="6.1.0";
x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.revwalk;version="6.0.0";
+ org.eclipse.jgit.internal.revwalk;version="6.1.0";
x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.storage.dfs;version="6.0.0";
+ org.eclipse.jgit.internal.storage.dfs;version="6.1.0";
x-friends:="org.eclipse.jgit.test,
org.eclipse.jgit.http.server,
org.eclipse.jgit.http.test,
org.eclipse.jgit.lfs.test",
- org.eclipse.jgit.internal.storage.file;version="6.0.0";
+ org.eclipse.jgit.internal.storage.file;version="6.1.0";
x-friends:="org.eclipse.jgit.test,
org.eclipse.jgit.junit,
org.eclipse.jgit.junit.http,
@@ -88,31 +91,32 @@ Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
org.eclipse.jgit.pgm,
org.eclipse.jgit.pgm.test,
org.eclipse.jgit.ssh.apache",
- org.eclipse.jgit.internal.storage.io;version="6.0.0";
+ org.eclipse.jgit.internal.storage.io;version="6.1.0";
x-friends:="org.eclipse.jgit.junit,
org.eclipse.jgit.test,
org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.pack;version="6.0.0";
+ org.eclipse.jgit.internal.storage.pack;version="6.1.0";
x-friends:="org.eclipse.jgit.junit,
org.eclipse.jgit.test,
org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.reftable;version="6.0.0";
+ org.eclipse.jgit.internal.storage.reftable;version="6.1.0";
x-friends:="org.eclipse.jgit.http.test,
org.eclipse.jgit.junit,
org.eclipse.jgit.test,
org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.submodule;version="6.0.0";x-internal:=true,
- org.eclipse.jgit.internal.transport.connectivity;version="6.0.0";
+ org.eclipse.jgit.internal.submodule;version="6.1.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.connectivity;version="6.1.0";
x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.http;version="6.0.0";
+ org.eclipse.jgit.internal.transport.http;version="6.1.0";
x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.parser;version="6.0.0";
+ org.eclipse.jgit.internal.transport.parser;version="6.1.0";
x-friends:="org.eclipse.jgit.http.server,
org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.ssh;version="6.0.0";
+ org.eclipse.jgit.internal.transport.ssh;version="6.1.0";
x-friends:="org.eclipse.jgit.ssh.apache,
- org.eclipse.jgit.ssh.jsch",
- org.eclipse.jgit.lib;version="6.0.0";
+ org.eclipse.jgit.ssh.jsch,
+ org.eclipse.jgit.test",
+ org.eclipse.jgit.lib;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.util.sha1,
org.eclipse.jgit.dircache,
@@ -126,10 +130,10 @@ Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
org.eclipse.jgit.util,
org.eclipse.jgit.submodule,
org.eclipse.jgit.util.time",
- org.eclipse.jgit.lib.internal;version="6.0.0";
+ org.eclipse.jgit.lib.internal;version="6.1.0";
x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.logging;version="6.0.0",
- org.eclipse.jgit.merge;version="6.0.0";
+ org.eclipse.jgit.logging;version="6.1.0",
+ org.eclipse.jgit.merge;version="6.1.0";
uses:="org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
@@ -138,40 +142,40 @@ Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
org.eclipse.jgit.util,
org.eclipse.jgit.api,
org.eclipse.jgit.attributes",
- org.eclipse.jgit.nls;version="6.0.0",
- org.eclipse.jgit.notes;version="6.0.0";
+ org.eclipse.jgit.nls;version="6.1.0",
+ org.eclipse.jgit.notes;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.merge",
- org.eclipse.jgit.patch;version="6.0.0";
+ org.eclipse.jgit.patch;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.diff",
- org.eclipse.jgit.revplot;version="6.0.0";
+ org.eclipse.jgit.revplot;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk",
- org.eclipse.jgit.revwalk;version="6.0.0";
+ org.eclipse.jgit.revwalk;version="6.1.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="6.0.0";
+ org.eclipse.jgit.revwalk.filter;version="6.1.0";
uses:="org.eclipse.jgit.revwalk,
org.eclipse.jgit.lib,
org.eclipse.jgit.util",
- org.eclipse.jgit.storage.file;version="6.0.0";
+ org.eclipse.jgit.storage.file;version="6.1.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.util",
- org.eclipse.jgit.storage.pack;version="6.0.0";
+ org.eclipse.jgit.storage.pack;version="6.1.0";
uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.submodule;version="6.0.0";
+ org.eclipse.jgit.submodule;version="6.1.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="6.0.0";
+ org.eclipse.jgit.transport;version="6.1.0";
uses:="javax.crypto,
org.eclipse.jgit.util.io,
org.eclipse.jgit.lib,
@@ -184,21 +188,21 @@ Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.storage.pack,
org.eclipse.jgit.errors",
- org.eclipse.jgit.transport.http;version="6.0.0";
+ org.eclipse.jgit.transport.http;version="6.1.0";
uses:="javax.net.ssl",
- org.eclipse.jgit.transport.resolver;version="6.0.0";
+ org.eclipse.jgit.transport.resolver;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.lib",
- org.eclipse.jgit.treewalk;version="6.0.0";
+ org.eclipse.jgit.treewalk;version="6.1.0";
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.treewalk.filter;version="6.0.0";
+ org.eclipse.jgit.treewalk.filter;version="6.1.0";
uses:="org.eclipse.jgit.treewalk",
- org.eclipse.jgit.util;version="6.0.0";
+ org.eclipse.jgit.util;version="6.1.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.hooks,
org.eclipse.jgit.revwalk,
@@ -211,12 +215,12 @@ Export-Package: org.eclipse.jgit.annotations;version="6.0.0",
org.eclipse.jgit.treewalk,
javax.net.ssl,
org.eclipse.jgit.util.time",
- org.eclipse.jgit.util.io;version="6.0.0";
+ org.eclipse.jgit.util.io;version="6.1.0";
uses:="org.eclipse.jgit.attributes,
org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk",
- org.eclipse.jgit.util.sha1;version="6.0.0",
- org.eclipse.jgit.util.time;version="6.0.0"
+ org.eclipse.jgit.util.sha1;version="6.1.0",
+ org.eclipse.jgit.util.time;version="6.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
javax.crypto,
diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
index 134cbacbee..99e5acd68a 100644
--- a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit - Sources
Bundle-SymbolicName: org.eclipse.jgit.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit;version="6.0.0.qualifier";roots="."
+Bundle-Version: 6.1.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit;version="6.1.0.qualifier";roots="."
diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml
index 1ab15beced..d3501715c8 100644
--- a/org.eclipse.jgit/pom.xml
+++ b/org.eclipse.jgit/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.0.0-SNAPSHOT</version>
+ <version>6.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit</artifactId>
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 3acceab098..ee97c265e9 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -440,6 +440,7 @@ lockOnNotHeld=Lock on {0} not held.
lockStreamClosed=Output to lock on {0} already closed
lockStreamMultiple=Output to lock on {0} already opened
logInconsistentFiletimeDiff={}: inconsistent duration from file timestamps on {}, {}: {} > {}, but diff = {}. Aborting measurement at resolution {}.
+logInvalidDefaultCharset=System property "native.encoding" specifies unknown character set: {}
logLargerFiletimeDiff={}: inconsistent duration from file timestamps on {}, {}: diff = {} > {} (last good value). Aborting measurement.
logSmallerFiletime={}: got smaller file timestamp on {}, {}: {} < {}. Aborting measurement at resolution {}.
logXDGConfigHomeInvalid=Environment variable XDG_CONFIG_HOME contains an invalid path {}
@@ -792,6 +793,7 @@ uriNotFoundWithMessage={0} not found: {1}
URINotSupported=URI not supported: {0}
userConfigInvalid=Git config in the user's home directory {0} is invalid {1}
validatingGitModules=Validating .gitmodules files
+valueExceedsRange=Value ''{0}'' exceeds the range of {1}
verifySignatureBad=BAD signature from "{0}"
verifySignatureExpired=Expired signature from "{0}"
verifySignatureGood=Good signature from "{0}"
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
index b69bb8f3ee..ca5370e912 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
@@ -71,12 +71,12 @@ class Candidate {
/**
* Score assigned to the rename to this candidate.
* <p>
- * Consider the history "A<-B<-C". If the result file S in C was renamed to
- * R in B, the rename score for this rename will be held in this field by
- * the candidate object for B. By storing the score with B, the application
- * can see what the rename score was as it makes the transition from C/S to
- * B/R. This may seem backwards since it was C that performed the rename,
- * but the application doesn't learn about path R until B.
+ * Consider the history "A&lt;-B&lt;-C". If the result file S in C was
+ * renamed to R in B, the rename score for this rename will be held in this
+ * field by the candidate object for B. By storing the score with B, the
+ * application can see what the rename score was as it makes the transition
+ * from C/S to B/R. This may seem backwards since it was C that performed
+ * the rename, but the application doesn't learn about path R until B.
*/
int renameScore;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java
index e226dbf3cc..2236eecbfe 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java
@@ -27,7 +27,7 @@ class Region {
/** First position in the {@link Candidate} that owns this Region. */
int sourceStart;
- /** Length of the region, always >= 1. */
+ /** Length of the region, always &gt;= 1. */
int length;
Region(int rs, int ss, int len) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
index ec21954aa2..49da95c9ab 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
@@ -29,12 +29,12 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.diff.DiffAlgorithm.SupportedAlgorithm;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.dircache.DirCacheIterator;
import org.eclipse.jgit.errors.AmbiguousObjectException;
import org.eclipse.jgit.errors.BinaryBlobException;
-import org.eclipse.jgit.errors.CancelledException;
import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
@@ -578,7 +578,7 @@ public class DiffFormatter implements AutoCloseable {
renameDetector.addAll(files);
try {
return renameDetector.compute(reader, progressMonitor);
- } catch (CancelledException e) {
+ } catch (CanceledException e) {
// TODO: consider propagating once bug 536323 is tackled
// (making DiffEntry.scan() and DiffFormatter.scan() and
// format() cancellable).
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
index d09da019dd..19961a13eb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
@@ -17,6 +17,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
+import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.jgit.errors.BinaryBlobException;
import org.eclipse.jgit.errors.LargeObjectException;
@@ -38,11 +39,20 @@ import org.eclipse.jgit.util.RawParseUtils;
* they are converting from "line number" to "element index".
*/
public class RawText extends Sequence {
+
/** A RawText of length 0 */
public static final RawText EMPTY_TEXT = new RawText(new byte[0]);
- /** Number of bytes to check for heuristics in {@link #isBinary(byte[])} */
- static final int FIRST_FEW_BYTES = 8000;
+ /**
+ * Default and minimum for {@link #BUFFER_SIZE}.
+ */
+ private static final int FIRST_FEW_BYTES = 8 * 1024;
+
+ /**
+ * Number of bytes to check for heuristics in {@link #isBinary(byte[])}.
+ */
+ private static final AtomicInteger BUFFER_SIZE = new AtomicInteger(
+ FIRST_FEW_BYTES);
/** The file content for this sequence. */
protected final byte[] content;
@@ -236,15 +246,30 @@ public class RawText extends Sequence {
}
/**
- * Determine heuristically whether a byte array represents binary (as
- * opposed to text) content.
+ * Obtains the buffer size to use for analyzing whether certain content is
+ * text or binary, or what line endings are used if it's text.
*
- * @param raw
- * the raw file content.
- * @return true if raw is likely to be a binary file, false otherwise
+ * @return the buffer size, by default {@link #FIRST_FEW_BYTES} bytes
+ * @since 6.0
*/
- public static boolean isBinary(byte[] raw) {
- return isBinary(raw, raw.length);
+ public static int getBufferSize() {
+ return BUFFER_SIZE.get();
+ }
+
+ /**
+ * Sets the buffer size to use for analyzing whether certain content is text
+ * or binary, or what line endings are used if it's text. If the given
+ * {@code bufferSize} is smaller than {@link #FIRST_FEW_BYTES} set the
+ * buffer size to {@link #FIRST_FEW_BYTES}.
+ *
+ * @param bufferSize
+ * Size to set
+ * @return the size actually set
+ * @since 6.0
+ */
+ public static int setBufferSize(int bufferSize) {
+ int newSize = Math.max(FIRST_FEW_BYTES, bufferSize);
+ return BUFFER_SIZE.updateAndGet(curr -> newSize);
}
/**
@@ -263,7 +288,7 @@ public class RawText extends Sequence {
* if input stream could not be read
*/
public static boolean isBinary(InputStream raw) throws IOException {
- final byte[] buffer = new byte[FIRST_FEW_BYTES];
+ final byte[] buffer = new byte[getBufferSize()];
int cnt = 0;
while (cnt < buffer.length) {
final int n = raw.read(buffer, cnt, buffer.length - cnt);
@@ -271,7 +296,19 @@ public class RawText extends Sequence {
break;
cnt += n;
}
- return isBinary(buffer, cnt);
+ return isBinary(buffer, cnt, cnt < buffer.length);
+ }
+
+ /**
+ * Determine heuristically whether a byte array represents binary (as
+ * opposed to text) content.
+ *
+ * @param raw
+ * the raw file content.
+ * @return true if raw is likely to be a binary file, false otherwise
+ */
+ public static boolean isBinary(byte[] raw) {
+ return isBinary(raw, raw.length);
}
/**
@@ -287,17 +324,64 @@ public class RawText extends Sequence {
* @return true if raw is likely to be a binary file, false otherwise
*/
public static boolean isBinary(byte[] raw, int length) {
- // Same heuristic as C Git
- if (length > FIRST_FEW_BYTES)
- length = FIRST_FEW_BYTES;
- for (int ptr = 0; ptr < length; ptr++)
- if (raw[ptr] == '\0')
- return true;
+ return isBinary(raw, length, false);
+ }
+ /**
+ * Determine heuristically whether a byte array represents binary (as
+ * opposed to text) content.
+ *
+ * @param raw
+ * the raw file content.
+ * @param length
+ * number of bytes in {@code raw} to evaluate. This should be
+ * {@code raw.length} unless {@code raw} was over-allocated by
+ * the caller.
+ * @param complete
+ * whether {@code raw} contains the whole data
+ * @return true if raw is likely to be a binary file, false otherwise
+ * @since 6.0
+ */
+ public static boolean isBinary(byte[] raw, int length, boolean complete) {
+ // Similar heuristic as C Git. Differences:
+ // - limited buffer size; may be only the beginning of a large blob
+ // - no counting of printable vs. non-printable bytes < 0x20 and 0x7F
+ int maxLength = getBufferSize();
+ if (length > maxLength) {
+ length = maxLength;
+ }
+ byte last = 'x'; // Just something inconspicuous.
+ for (int ptr = 0; ptr < length; ptr++) {
+ byte curr = raw[ptr];
+ if (isBinary(curr, last)) {
+ return true;
+ }
+ last = curr;
+ }
+ if (complete) {
+ // Buffer contains everything...
+ return last == '\r'; // ... so this must be a lone CR
+ }
return false;
}
/**
+ * Determines from the last two bytes read from a source if it looks like
+ * binary content.
+ *
+ * @param curr
+ * the last byte, read after {@code prev}
+ * @param prev
+ * the previous byte, read before {@code last}
+ * @return {@code true} if either byte is NUL, or if prev is CR and curr is
+ * not LF, {@code false} otherwise
+ * @since 6.0
+ */
+ public static boolean isBinary(byte curr, byte prev) {
+ return curr == '\0' || (curr != '\n' && prev == '\r') || prev == '\0';
+ }
+
+ /**
* Determine heuristically whether a byte array represents text content
* using CR-LF as line separator.
*
@@ -329,7 +413,7 @@ public class RawText extends Sequence {
* @since 5.3
*/
public static boolean isCrLfText(InputStream raw) throws IOException {
- byte[] buffer = new byte[FIRST_FEW_BYTES];
+ byte[] buffer = new byte[getBufferSize()];
int cnt = 0;
while (cnt < buffer.length) {
int n = raw.read(buffer, cnt, buffer.length - cnt);
@@ -354,13 +438,44 @@ public class RawText extends Sequence {
* @since 5.3
*/
public static boolean isCrLfText(byte[] raw, int length) {
+ return isCrLfText(raw, length, false);
+ }
+
+ /**
+ * Determine heuristically whether a byte array represents text content
+ * using CR-LF as line separator.
+ *
+ * @param raw
+ * the raw file content.
+ * @param length
+ * number of bytes in {@code raw} to evaluate.
+ * @return {@code true} if raw is likely to be CR-LF delimited text,
+ * {@code false} otherwise
+ * @param complete
+ * whether {@code raw} contains the whole data
+ * @since 6.0
+ */
+ public static boolean isCrLfText(byte[] raw, int length, boolean complete) {
boolean has_crlf = false;
- for (int ptr = 0; ptr < length - 1; ptr++) {
- if (raw[ptr] == '\0') {
- return false; // binary
- } else if (raw[ptr] == '\r' && raw[ptr + 1] == '\n') {
+ byte last = 'x'; // Just something inconspicuous
+ for (int ptr = 0; ptr < length; ptr++) {
+ byte curr = raw[ptr];
+ if (isBinary(curr, last)) {
+ return false;
+ }
+ if (curr == '\n' && last == '\r') {
has_crlf = true;
}
+ last = curr;
+ }
+ if (last == '\r') {
+ if (complete) {
+ // Lone CR: it's binary after all.
+ return false;
+ }
+ // Tough call. If the next byte, which we don't have, would be a
+ // '\n', it'd be a CR-LF text, otherwise it'd be binary. Just decide
+ // based on what we already scanned; it wasn't binary until now.
}
return has_crlf;
}
@@ -409,18 +524,20 @@ public class RawText extends Sequence {
throw new BinaryBlobException();
}
- if (sz <= FIRST_FEW_BYTES) {
- byte[] data = ldr.getCachedBytes(FIRST_FEW_BYTES);
- if (isBinary(data)) {
+ int bufferSize = getBufferSize();
+ if (sz <= bufferSize) {
+ byte[] data = ldr.getCachedBytes(bufferSize);
+ if (isBinary(data, data.length, true)) {
throw new BinaryBlobException();
}
return new RawText(data);
}
- byte[] head = new byte[FIRST_FEW_BYTES];
+ byte[] head = new byte[bufferSize];
try (InputStream stream = ldr.openStream()) {
int off = 0;
int left = head.length;
+ byte last = 'x'; // Just something inconspicuous
while (left > 0) {
int n = stream.read(head, off, left);
if (n < 0) {
@@ -429,9 +546,11 @@ public class RawText extends Sequence {
left -= n;
while (n > 0) {
- if (head[off] == '\0') {
+ byte curr = head[off];
+ if (isBinary(curr, last)) {
throw new BinaryBlobException();
}
+ last = curr;
off++;
n--;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
index 225921ecc1..c33f53adde 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
@@ -23,9 +23,9 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
+import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
-import org.eclipse.jgit.errors.CancelledException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.AbbreviatedObjectId;
import org.eclipse.jgit.lib.FileMode;
@@ -336,6 +336,7 @@ public class RenameDetector {
* Detect renames in the current file set.
* <p>
* This convenience function runs without a progress monitor.
+ * </p>
*
* @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s
* representing all files that have been changed.
@@ -343,7 +344,12 @@ public class RenameDetector {
* file contents cannot be read from the repository.
*/
public List<DiffEntry> compute() throws IOException {
- return compute(NullProgressMonitor.INSTANCE);
+ try {
+ return compute(NullProgressMonitor.INSTANCE);
+ } catch (CanceledException e) {
+ // Won't happen with a NullProgressMonitor
+ return Collections.emptyList();
+ }
}
/**
@@ -355,13 +361,11 @@ public class RenameDetector {
* representing all files that have been changed.
* @throws java.io.IOException
* file contents cannot be read from the repository.
- * @throws CancelledException
+ * @throws CanceledException
* if rename detection was cancelled
*/
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
- // version
public List<DiffEntry> compute(ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
if (!done) {
try {
return compute(objectReader, pm);
@@ -383,13 +387,11 @@ public class RenameDetector {
* representing all files that have been changed.
* @throws java.io.IOException
* file contents cannot be read from the repository.
- * @throws CancelledException
+ * @throws CanceledException
* if rename detection was cancelled
*/
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
- // version
public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
final ContentSource cs = ContentSource.create(reader);
return compute(new ContentSource.Pair(cs, cs), pm);
}
@@ -405,13 +407,11 @@ public class RenameDetector {
* representing all files that have been changed.
* @throws java.io.IOException
* file contents cannot be read from the repository.
- * @throws CancelledException
+ * @throws CanceledException
* if rename detection was cancelled
*/
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
- // version
public List<DiffEntry> compute(ContentSource.Pair reader, ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
if (!done) {
done = true;
@@ -451,15 +451,15 @@ public class RenameDetector {
done = false;
}
- private void advanceOrCancel(ProgressMonitor pm) throws CancelledException {
+ private void advanceOrCancel(ProgressMonitor pm) throws CanceledException {
if (pm.isCancelled()) {
- throw new CancelledException(JGitText.get().renameCancelled);
+ throw new CanceledException(JGitText.get().renameCancelled);
}
pm.update(1);
}
private void breakModifies(ContentSource.Pair reader, ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
ArrayList<DiffEntry> newEntries = new ArrayList<>(entries.size());
pm.beginTask(JGitText.get().renamesBreakingModifies, entries.size());
@@ -486,7 +486,7 @@ public class RenameDetector {
entries = newEntries;
}
- private void rejoinModifies(ProgressMonitor pm) throws CancelledException {
+ private void rejoinModifies(ProgressMonitor pm) throws CanceledException {
HashMap<String, DiffEntry> nameMap = new HashMap<>();
ArrayList<DiffEntry> newAdded = new ArrayList<>(added.size());
@@ -541,7 +541,7 @@ public class RenameDetector {
private void findContentRenames(ContentSource.Pair reader,
ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
int cnt = Math.max(added.size(), deleted.size());
if (getRenameLimit() == 0 || cnt <= getRenameLimit()) {
SimilarityRenameDetector d;
@@ -562,7 +562,7 @@ public class RenameDetector {
@SuppressWarnings("unchecked")
private void findExactRenames(ProgressMonitor pm)
- throws CancelledException {
+ throws CanceledException {
pm.beginTask(JGitText.get().renamesFindingExact, //
added.size() + added.size() + deleted.size()
+ added.size() * deleted.size());
@@ -651,7 +651,7 @@ public class RenameDetector {
matrix[mNext] = SimilarityRenameDetector.encode(score, delIdx, addIdx);
mNext++;
if (pm.isCancelled()) {
- throw new CancelledException(
+ throw new CanceledException(
JGitText.get().renameCancelled);
}
}
@@ -744,7 +744,7 @@ public class RenameDetector {
@SuppressWarnings("unchecked")
private HashMap<AbbreviatedObjectId, Object> populateMap(
List<DiffEntry> diffEntries, ProgressMonitor pm)
- throws CancelledException {
+ throws CanceledException {
HashMap<AbbreviatedObjectId, Object> map = new HashMap<>();
for (DiffEntry de : diffEntries) {
Object old = map.put(id(de), de);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
index 661369b86a..34581aefb5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
@@ -108,7 +108,8 @@ public class SimilarityIndex {
return RawText.isBinary(in1);
}
}
- return RawText.isBinary(obj.getCachedBytes());
+ byte[] raw = obj.getCachedBytes();
+ return RawText.isBinary(raw, raw.length, true);
}
void hash(ObjectLoader obj) throws MissingObjectException, IOException,
@@ -132,7 +133,7 @@ public class SimilarityIndex {
}
void hash(byte[] raw, int ptr, int end) throws TableFullException {
- final boolean text = !RawText.isBinary(raw);
+ final boolean text = !RawText.isBinary(raw, raw.length, true);
hashedCnt = 0;
while (ptr < end) {
int hash = 5381;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
index 5871b4aeea..9ac94895b1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
@@ -20,9 +20,9 @@ import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
+import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
-import org.eclipse.jgit.errors.CancelledException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.NullProgressMonitor;
@@ -115,7 +115,7 @@ class SimilarityRenameDetector {
skipBinaryFiles = value;
}
- void compute(ProgressMonitor pm) throws IOException, CancelledException {
+ void compute(ProgressMonitor pm) throws IOException, CanceledException {
if (pm == null)
pm = NullProgressMonitor.INSTANCE;
@@ -130,9 +130,7 @@ class SimilarityRenameDetector {
//
for (--mNext; mNext >= 0; mNext--) {
if (pm.isCancelled()) {
- // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException
- // in next major version
- throw new CancelledException(JGitText.get().renameCancelled);
+ throw new CanceledException(JGitText.get().renameCancelled);
}
long ent = matrix[mNext];
int sIdx = srcFile(ent);
@@ -202,7 +200,7 @@ class SimilarityRenameDetector {
}
private int buildMatrix(ProgressMonitor pm)
- throws IOException, CancelledException {
+ throws IOException, CanceledException {
// Allocate for the worst-case scenario where every pair has a
// score that we need to consider. We might not need that many.
//
@@ -228,10 +226,7 @@ class SimilarityRenameDetector {
for (int dstIdx = 0; dstIdx < dsts.size(); dstIdx++) {
if (pm.isCancelled()) {
- // TODO(ms): use
- // org.eclipse.jgit.api.errors.CanceledException in next
- // major version
- throw new CancelledException(
+ throw new CanceledException(
JGitText.get().renameCancelled);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
index 07162db4ce..e0c1e93918 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
@@ -280,12 +280,12 @@ public class DirCacheTree {
* number of bytes of <code>cache[cacheIdx].path</code> that
* matches this tree's path. The value at array position
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
- * <code>pathOff</code> is > 0.
+ * <code>pathOff</code> is &gt; 0.
* @param ow
* the writer to use when serializing to the store.
* @return identity of this tree.
* @throws UnmergedPathException
- * one or more paths contain higher-order stages (stage > 0),
+ * one or more paths contain higher-order stages (stage &gt; 0),
* which cannot be stored in a tree object.
* @throws IOException
* an unexpected error occurred writing to the object store.
@@ -401,7 +401,7 @@ public class DirCacheTree {
* number of bytes of <code>cache[cacheIdx].path</code> that
* matches this tree's path. The value at array position
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
- * <code>pathOff</code> is > 0.
+ * <code>pathOff</code> is &gt; 0.
*/
void validate(final DirCacheEntry[] cache, final int cCnt, int cIdx,
final int pathOff) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java
index 58a121403f..768931ca0b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java
@@ -22,4 +22,9 @@ public class BinaryBlobException extends Exception {
* Construct a BinaryBlobException.
*/
public BinaryBlobException() {}
+
+ @Override
+ public synchronized Throwable fillInStackTrace() {
+ return this;
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
index 0708123e91..de210b01c4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/StoredObjectRepresentationNotAvailableException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, Google Inc. and others
+ * Copyright (C) 2010, 2021 Google Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -7,29 +7,23 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-
package org.eclipse.jgit.errors;
-import org.eclipse.jgit.internal.storage.pack.ObjectToPack;
-
/**
* A previously selected representation is no longer available.
*/
-public class StoredObjectRepresentationNotAvailableException extends Exception { //TODO remove unused ObjectToPack in 5.0
+public class StoredObjectRepresentationNotAvailableException extends Exception {
+
private static final long serialVersionUID = 1L;
/**
- * Construct an error for an object.
+ * Creates a new instance.
*
- * @param otp
- * the object whose current representation is no longer present.
* @param cause
- * cause
- * @since 4.10
+ * {@link Throwable} that caused this exception
+ * @since 6.0
*/
- public StoredObjectRepresentationNotAvailableException(ObjectToPack otp,
- Throwable cause) {
+ public StoredObjectRepresentationNotAvailableException(Throwable cause) {
super(cause);
- // Do nothing.
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
index 095927f3cd..e0a822479f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -578,10 +578,10 @@ public class RepoCommand extends GitCommand<RevCommit> {
DirCache index = DirCache.newInCore();
ObjectInserter inserter = repo.newObjectInserter();
+
try (RevWalk rw = new RevWalk(repo)) {
prepareIndex(renamedProjects, index, inserter);
ObjectId treeId = index.writeTree(inserter);
-
long prevDelay = 0;
for (int i = 0; i < LOCK_FAILURE_MAX_RETRIES - 1; i++) {
try {
@@ -597,7 +597,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
}
// In the last try, just propagate the exceptions
return commitTreeOnCurrentTip(inserter, rw, treeId);
- } catch (GitAPIException | IOException | InterruptedException e) {
+ } catch (IOException | InterruptedException e) {
throw new ManifestErrorException(e);
}
}
@@ -609,12 +609,11 @@ public class RepoCommand extends GitCommand<RevCommit> {
}
return git.commit().setMessage(RepoText.get().repoCommitMessage)
.call();
- } catch (GitAPIException | IOException e) {
+ } catch (IOException e) {
throw new ManifestErrorException(e);
}
}
-
private void prepareIndex(List<RepoProject> projects, DirCache index,
ObjectInserter inserter) throws IOException, GitAPIException {
Config cfg = new Config();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
index ce3ad2239a..dbfd415943 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
@@ -12,13 +12,13 @@ package org.eclipse.jgit.hooks;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import java.nio.charset.Charset;
import java.util.concurrent.Callable;
import org.eclipse.jgit.api.errors.AbortedByHookException;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.ProcessResult;
+import org.eclipse.jgit.util.SystemReader;
import org.eclipse.jgit.util.io.TeeOutputStream;
/**
@@ -171,7 +171,8 @@ public abstract class GitHook<T> implements Callable<T> {
getStdinArgs());
if (result.isExecutedWithError()) {
handleError(new String(errorByteArray.toByteArray(),
- Charset.defaultCharset().name()), result);
+ SystemReader.getInstance().getDefaultCharset().name()),
+ result);
}
}
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 76340dabb3..f7ebe4f40f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -468,6 +468,7 @@ public class JGitText extends TranslationBundle {
/***/ public String lockStreamClosed;
/***/ public String lockStreamMultiple;
/***/ public String logInconsistentFiletimeDiff;
+ /***/ public String logInvalidDefaultCharset;
/***/ public String logLargerFiletimeDiff;
/***/ public String logSmallerFiletime;
/***/ public String logXDGConfigHomeInvalid;
@@ -820,6 +821,7 @@ public class JGitText extends TranslationBundle {
/***/ public String URINotSupported;
/***/ public String userConfigInvalid;
/***/ public String validatingGitModules;
+ /***/ public String valueExceedsRange;
/***/ public String verifySignatureBad;
/***/ public String verifySignatureExpired;
/***/ public String verifySignatureGood;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java
new file mode 100644
index 0000000000..cb0640d2e8
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2018-2021, Andre Bossert <andre.bossert@siemens.com>
+ *
+ * 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.diffmergetool;
+
+import java.util.TreeMap;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.internal.BooleanTriState;
+
+/**
+ * Manages diff tools.
+ */
+public class DiffTools {
+
+ private Map<String, ExternalDiffTool> predefinedTools;
+
+ private Map<String, ExternalDiffTool> userDefinedTools;
+
+ /**
+ * Creates the external diff-tools manager for given repository.
+ *
+ * @param repo
+ * the repository database
+ */
+ public DiffTools(Repository repo) {
+ setupPredefinedTools();
+ setupUserDefinedTools();
+ }
+
+ /**
+ * Compare two versions of a file.
+ *
+ * @param newPath
+ * the new file path
+ * @param oldPath
+ * the old file path
+ * @param newId
+ * the new object ID
+ * @param oldId
+ * the old object ID
+ * @param toolName
+ * the selected tool name (can be null)
+ * @param prompt
+ * the prompt option
+ * @param gui
+ * the GUI option
+ * @param trustExitCode
+ * the "trust exit code" option
+ * @return the return code from executed tool
+ */
+ public int compare(String newPath, String oldPath, String newId,
+ String oldId, String toolName, BooleanTriState prompt,
+ BooleanTriState gui, BooleanTriState trustExitCode) {
+ return 0;
+ }
+
+ /**
+ * @return the tool names
+ */
+ public Set<String> getToolNames() {
+ return Collections.emptySet();
+ }
+
+ /**
+ * @return the user defined tools
+ */
+ public Map<String, ExternalDiffTool> getUserDefinedTools() {
+ return Collections.unmodifiableMap(userDefinedTools);
+ }
+
+ /**
+ * @return the available predefined tools
+ */
+ public Map<String, ExternalDiffTool> getAvailableTools() {
+ return Collections.unmodifiableMap(predefinedTools);
+ }
+
+ /**
+ * @return the NOT available predefined tools
+ */
+ public Map<String, ExternalDiffTool> getNotAvailableTools() {
+ return Collections.unmodifiableMap(new TreeMap<>());
+ }
+
+ /**
+ * @param gui
+ * use the diff.guitool setting ?
+ * @return the default tool name
+ */
+ public String getDefaultToolName(BooleanTriState gui) {
+ return gui != BooleanTriState.UNSET ? "my_gui_tool" //$NON-NLS-1$
+ : "my_default_toolname"; //$NON-NLS-1$
+ }
+
+ /**
+ * @return is interactive (config prompt enabled) ?
+ */
+ public boolean isInteractive() {
+ return false;
+ }
+
+ private void setupPredefinedTools() {
+ predefinedTools = new TreeMap<>();
+ }
+
+ private void setupUserDefinedTools() {
+ userDefinedTools = new TreeMap<>();
+ }
+
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java
new file mode 100644
index 0000000000..f2d7e828cb
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2018-2021, Andre Bossert <andre.bossert@siemens.com>
+ *
+ * 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.diffmergetool;
+
+/**
+ * The external tool interface.
+ */
+public interface ExternalDiffTool {
+
+ /**
+ * @return the tool name
+ */
+ String getName();
+
+ /**
+ * @return the tool path
+ */
+ String getPath();
+
+ /**
+ * @return the tool command
+ */
+ String getCommand();
+
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
index e87bfe24e6..54c527c03c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
@@ -104,9 +104,10 @@ public final class DfsBlockCache {
private final ReentrantLock[] loadLocks;
/**
- * A separate pool of locks to prevent concurrent loads for same index or bitmap from PackFile.
+ * A separate pool of locks per pack extension to prevent concurrent loads
+ * for same index or bitmap from PackFile.
*/
- private final ReentrantLock[] refLocks;
+ private final ReentrantLock[][] refLocks;
/** Maximum number of bytes the cache should hold. */
private final long maxBytes;
@@ -173,13 +174,16 @@ public final class DfsBlockCache {
}
table = new AtomicReferenceArray<>(tableSize);
- loadLocks = new ReentrantLock[cfg.getConcurrencyLevel()];
+ int concurrencyLevel = cfg.getConcurrencyLevel();
+ loadLocks = new ReentrantLock[concurrencyLevel];
for (int i = 0; i < loadLocks.length; i++) {
loadLocks[i] = new ReentrantLock(true /* fair */);
}
- refLocks = new ReentrantLock[cfg.getConcurrencyLevel()];
- for (int i = 0; i < refLocks.length; i++) {
- refLocks[i] = new ReentrantLock(true /* fair */);
+ refLocks = new ReentrantLock[PackExt.values().length][concurrencyLevel];
+ for (int i = 0; i < PackExt.values().length; i++) {
+ for (int j = 0; j < concurrencyLevel; ++j) {
+ refLocks[i][j] = new ReentrantLock(true /* fair */);
+ }
}
maxBytes = cfg.getBlockLimit();
@@ -636,7 +640,8 @@ public final class DfsBlockCache {
}
private ReentrantLock lockForRef(DfsStreamKey key) {
- return refLocks[(key.hash >>> 1) % refLocks.length];
+ int slot = (key.hash >>> 1) % refLocks[key.packExtPos].length;
+ return refLocks[key.packExtPos][slot];
}
private static AtomicLong[] newCounters() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
index 9be3df3b17..bb76df1d5d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
@@ -59,13 +59,6 @@ public final class DfsPackFile extends BlockBasedFile {
private static final int REC_SIZE = Constants.OBJECT_ID_LENGTH + 8;
private static final long REF_POSITION = 0;
- /**
- * Lock for initialization of {@link #index} and {@link #corruptObjects}.
- * <p>
- * This lock ensures only one thread can perform the initialization work.
- */
- private final Object initLock = new Object();
-
/** Index mapping {@link ObjectId} to position within the pack stream. */
private volatile PackIndex index;
@@ -84,6 +77,9 @@ public final class DfsPackFile extends BlockBasedFile {
*/
private volatile LongList corruptObjects;
+ /** Lock for {@link #corruptObjects}. */
+ private final Object corruptObjectsLock = new Object();
+
/**
* Construct a reader for an existing, packfile.
*
@@ -155,35 +151,26 @@ public final class DfsPackFile extends BlockBasedFile {
Repository.getGlobalListenerList()
.dispatch(new BeforeDfsPackIndexLoadedEvent(this));
-
- synchronized (initLock) {
- if (index != null) {
- return index;
+ try {
+ DfsStreamKey idxKey = desc.getStreamKey(INDEX);
+ AtomicBoolean cacheHit = new AtomicBoolean(true);
+ DfsBlockCache.Ref<PackIndex> idxref = cache.getOrLoadRef(idxKey,
+ REF_POSITION, () -> {
+ cacheHit.set(false);
+ return loadPackIndex(ctx, idxKey);
+ });
+ if (cacheHit.get()) {
+ ctx.stats.idxCacheHit++;
}
-
- try {
- DfsStreamKey idxKey = desc.getStreamKey(INDEX);
- AtomicBoolean cacheHit = new AtomicBoolean(true);
- DfsBlockCache.Ref<PackIndex> idxref = cache.getOrLoadRef(
- idxKey,
- REF_POSITION,
- () -> {
- cacheHit.set(false);
- return loadPackIndex(ctx, idxKey);
- });
- if (cacheHit.get()) {
- ctx.stats.idxCacheHit++;
- }
- PackIndex idx = idxref.get();
- if (index == null && idx != null) {
- index = idx;
- }
- return index;
- } catch (IOException e) {
- invalid = true;
- invalidatingCause = e;
- throw e;
+ PackIndex idx = idxref.get();
+ if (index == null && idx != null) {
+ index = idx;
}
+ return index;
+ } catch (IOException e) {
+ invalid = true;
+ invalidatingCause = e;
+ throw e;
}
}
@@ -191,7 +178,17 @@ public final class DfsPackFile extends BlockBasedFile {
return desc.getPackSource() == UNREACHABLE_GARBAGE;
}
- PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException {
+ /**
+ * Get the BitmapIndex for this PackFile.
+ *
+ * @param ctx
+ * reader context to support reading from the backing store if
+ * the index is not already loaded in memory.
+ * @return the BitmapIndex.
+ * @throws java.io.IOException
+ * the bitmap index is not available, or is corrupt.
+ */
+ public PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException {
if (invalid || isGarbage() || !desc.hasFileExt(BITMAP_INDEX)) {
return null;
}
@@ -200,31 +197,21 @@ public final class DfsPackFile extends BlockBasedFile {
return bitmapIndex;
}
- synchronized (initLock) {
- if (bitmapIndex != null) {
- return bitmapIndex;
- }
-
- PackIndex idx = idx(ctx);
- PackReverseIndex revidx = getReverseIdx(ctx);
- DfsStreamKey bitmapKey = desc.getStreamKey(BITMAP_INDEX);
- AtomicBoolean cacheHit = new AtomicBoolean(true);
- DfsBlockCache.Ref<PackBitmapIndex> idxref = cache.getOrLoadRef(
- bitmapKey,
- REF_POSITION,
- () -> {
- cacheHit.set(false);
- return loadBitmapIndex(ctx, bitmapKey, idx, revidx);
- });
- if (cacheHit.get()) {
- ctx.stats.bitmapCacheHit++;
- }
- PackBitmapIndex bmidx = idxref.get();
- if (bitmapIndex == null && bmidx != null) {
- bitmapIndex = bmidx;
- }
- return bitmapIndex;
+ DfsStreamKey bitmapKey = desc.getStreamKey(BITMAP_INDEX);
+ AtomicBoolean cacheHit = new AtomicBoolean(true);
+ DfsBlockCache.Ref<PackBitmapIndex> idxref = cache
+ .getOrLoadRef(bitmapKey, REF_POSITION, () -> {
+ cacheHit.set(false);
+ return loadBitmapIndex(ctx, bitmapKey);
+ });
+ if (cacheHit.get()) {
+ ctx.stats.bitmapCacheHit++;
}
+ PackBitmapIndex bmidx = idxref.get();
+ if (bitmapIndex == null && bmidx != null) {
+ bitmapIndex = bmidx;
+ }
+ return bitmapIndex;
}
PackReverseIndex getReverseIdx(DfsReader ctx) throws IOException {
@@ -232,31 +219,23 @@ public final class DfsPackFile extends BlockBasedFile {
return reverseIndex;
}
- synchronized (initLock) {
- if (reverseIndex != null) {
- return reverseIndex;
- }
-
- PackIndex idx = idx(ctx);
- DfsStreamKey revKey = new DfsStreamKey.ForReverseIndex(
- desc.getStreamKey(INDEX));
- AtomicBoolean cacheHit = new AtomicBoolean(true);
- DfsBlockCache.Ref<PackReverseIndex> revref = cache.getOrLoadRef(
- revKey,
- REF_POSITION,
- () -> {
- cacheHit.set(false);
- return loadReverseIdx(ctx, revKey, idx);
- });
- if (cacheHit.get()) {
- ctx.stats.ridxCacheHit++;
- }
- PackReverseIndex revidx = revref.get();
- if (reverseIndex == null && revidx != null) {
- reverseIndex = revidx;
- }
- return reverseIndex;
+ PackIndex idx = idx(ctx);
+ DfsStreamKey revKey = new DfsStreamKey.ForReverseIndex(
+ desc.getStreamKey(INDEX));
+ AtomicBoolean cacheHit = new AtomicBoolean(true);
+ DfsBlockCache.Ref<PackReverseIndex> revref = cache.getOrLoadRef(revKey,
+ REF_POSITION, () -> {
+ cacheHit.set(false);
+ return loadReverseIdx(ctx, revKey, idx);
+ });
+ if (cacheHit.get()) {
+ ctx.stats.ridxCacheHit++;
+ }
+ PackReverseIndex revidx = revref.get();
+ if (reverseIndex == null && revidx != null) {
+ reverseIndex = revidx;
}
+ return reverseIndex;
}
/**
@@ -436,8 +415,7 @@ public final class DfsPackFile extends BlockBasedFile {
try {
readFully(src.offset, buf, 0, 20, ctx);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
int c = buf[0] & 0xff;
final int typeCode = (c >> 4) & 7;
@@ -558,12 +536,11 @@ public final class DfsPackFile extends BlockBasedFile {
Long.valueOf(src.offset), getFileName()),
dataFormat);
- throw new StoredObjectRepresentationNotAvailableException(src,
+ throw new StoredObjectRepresentationNotAvailableException(
corruptObject);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
if (quickCopy != null) {
@@ -1003,7 +980,7 @@ public final class DfsPackFile extends BlockBasedFile {
private void setCorrupt(long offset) {
LongList list = corruptObjects;
if (list == null) {
- synchronized (initLock) {
+ synchronized (corruptObjectsLock) {
list = corruptObjects;
if (list == null) {
list = new LongList();
@@ -1066,11 +1043,8 @@ public final class DfsPackFile extends BlockBasedFile {
revidx);
}
- private DfsBlockCache.Ref<PackBitmapIndex> loadBitmapIndex(
- DfsReader ctx,
- DfsStreamKey bitmapKey,
- PackIndex idx,
- PackReverseIndex revidx) throws IOException {
+ private DfsBlockCache.Ref<PackBitmapIndex> loadBitmapIndex(DfsReader ctx,
+ DfsStreamKey bitmapKey) throws IOException {
ctx.stats.readBitmap++;
long start = System.nanoTime();
try (ReadableChannel rc = ctx.db.openFile(desc, BITMAP_INDEX)) {
@@ -1086,7 +1060,8 @@ public final class DfsPackFile extends BlockBasedFile {
bs = wantSize;
}
in = new BufferedInputStream(in, bs);
- bmidx = PackBitmapIndex.read(in, idx, revidx);
+ bmidx = PackBitmapIndex.read(in, () -> idx(ctx),
+ () -> getReverseIdx(ctx));
} finally {
size = rc.position();
ctx.stats.readBitmapIdxBytes += size;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
index 29d11104d4..d8e191c4e0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java
@@ -23,10 +23,10 @@ import java.util.zip.CRC32;
import java.util.zip.Deflater;
import org.eclipse.jgit.internal.storage.file.PackIndex;
-import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.transport.PackLock;
import org.eclipse.jgit.transport.PackParser;
import org.eclipse.jgit.transport.PackedObjectInfo;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
index fecced1ae6..9cdea597f9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
@@ -420,9 +420,11 @@ public class FileRepository extends Repository {
* advertise that it safely has that other repository's references, without
* exposing any other details about the other repository. This may help a
* client trying to push changes avoid pushing more than it needs to.
+ *
+ * @throws IOException
*/
@Override
- public Set<ObjectId> getAdditionalHaves() {
+ public Set<ObjectId> getAdditionalHaves() throws IOException {
return getAdditionalHaves(null);
}
@@ -438,8 +440,11 @@ public class FileRepository extends Repository {
* Set of AlternateHandle Ids already seen
*
* @return unmodifiable collection of other known objects.
+ * @throws IOException
+ * if getting refs hits an IO error
*/
- private Set<ObjectId> getAdditionalHaves(Set<AlternateHandle.Id> skips) {
+ private Set<ObjectId> getAdditionalHaves(Set<AlternateHandle.Id> skips)
+ throws IOException {
HashSet<ObjectId> r = new HashSet<>();
skips = objectDatabase.addMe(skips);
for (AlternateHandle d : objectDatabase.myAlternates()) {
@@ -447,7 +452,7 @@ public class FileRepository extends Repository {
FileRepository repo;
repo = ((AlternateRepository) d).repository;
- for (Ref ref : repo.getAllRefs().values()) {
+ for (Ref ref : repo.getRefDatabase().getRefs()) {
if (ref.getObjectId() != null)
r.add(ref.getObjectId());
if (ref.getPeeledObjectId() != null)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 40c075ec5e..93c6201597 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -1530,7 +1530,8 @@ public class GC {
}
/**
- * @return {@code true} if number of packs > gc.autopacklimit (default 50)
+ * @return {@code true} if number of packs &gt; gc.autopacklimit (default
+ * 50)
*/
boolean tooManyPacks() {
int autopacklimit = repo.getConfig().getInt(
@@ -1549,7 +1550,8 @@ public class GC {
* Quickly estimate number of loose objects, SHA1 is distributed evenly so
* counting objects in one directory (bucket 17) is sufficient
*
- * @return {@code true} if number of loose objects > gc.auto (default 6700)
+ * @return {@code true} if number of loose objects &gt; gc.auto (default
+ * 6700)
*/
boolean tooManyLooseObjects() {
int auto = getLooseObjectLimit();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java
index dba8ccd99b..1c23ff20c7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java
@@ -34,6 +34,7 @@ import org.eclipse.jgit.lib.CoreConfig;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ProgressMonitor;
import org.eclipse.jgit.storage.pack.PackConfig;
+import org.eclipse.jgit.transport.PackLock;
import org.eclipse.jgit.transport.PackParser;
import org.eclipse.jgit.transport.PackedObjectInfo;
import org.eclipse.jgit.util.FileUtils;
@@ -431,7 +432,7 @@ public class ObjectDirectoryPackParser extends PackParser {
File packDir = new File(db.getDirectory(), "pack"); //$NON-NLS-1$
PackFile finalPack = new PackFile(packDir, id, PackExt.PACK);
PackFile finalIdx = finalPack.create(PackExt.INDEX);
- final PackLock keep = new PackLock(finalPack, db.getFS());
+ final PackLockImpl keep = new PackLockImpl(finalPack, db.getFS());
if (!packDir.exists() && !packDir.mkdir() && !packDir.exists()) {
// The objects/pack directory isn't present, and we are unable
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
index 5efd4c5bfc..289c732f4e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java
@@ -521,12 +521,11 @@ public class Pack implements Iterable<PackIndex.MutableEntry> {
Long.valueOf(src.offset), getPackFile()),
dataFormat);
- throw new StoredObjectRepresentationNotAvailableException(src,
+ throw new StoredObjectRepresentationNotAvailableException(
corruptObject);
} catch (IOException ioError) {
- throw new StoredObjectRepresentationNotAvailableException(src,
- ioError);
+ throw new StoredObjectRepresentationNotAvailableException(ioError);
}
if (quickCopy != null) {
@@ -611,7 +610,7 @@ public class Pack implements Iterable<PackIndex.MutableEntry> {
try {
doOpen();
} catch (IOException thisPackNotValid) {
- throw new StoredObjectRepresentationNotAvailableException(otp,
+ throw new StoredObjectRepresentationNotAvailableException(
thisPackNotValid);
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java
index beb51dc2eb..8401f0718a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java
@@ -57,11 +57,10 @@ public abstract class PackBitmapIndex {
* @throws CorruptObjectException
* the stream does not contain a valid pack bitmap index.
*/
- public static PackBitmapIndex open(
- File idxFile, PackIndex packIndex, PackReverseIndex reverseIndex)
+ public static PackBitmapIndex open(File idxFile, PackIndex packIndex,
+ PackReverseIndex reverseIndex)
throws IOException {
- try (SilentFileInputStream fd = new SilentFileInputStream(
- idxFile)) {
+ try (SilentFileInputStream fd = new SilentFileInputStream(idxFile)) {
try {
return read(fd, packIndex, reverseIndex);
} catch (IOException ioe) {
@@ -94,10 +93,39 @@ public abstract class PackBitmapIndex {
* @throws CorruptObjectException
* the stream does not contain a valid pack bitmap index.
*/
- public static PackBitmapIndex read(
- InputStream fd, PackIndex packIndex, PackReverseIndex reverseIndex)
+ public static PackBitmapIndex read(InputStream fd, PackIndex packIndex,
+ PackReverseIndex reverseIndex) throws IOException {
+ return new PackBitmapIndexV1(fd, () -> packIndex, () -> reverseIndex);
+ }
+
+ /**
+ * Read an existing pack bitmap index file from a buffered stream.
+ * <p>
+ * The format of the file will be automatically detected and a proper access
+ * implementation for that format will be constructed and returned to the
+ * caller. The file may or may not be held open by the returned instance.
+ *
+ * @param fd
+ * stream to read the bitmap index file from. The stream must be
+ * buffered as some small IOs are performed against the stream.
+ * The caller is responsible for closing the stream.
+ * @param packIndexSupplier
+ * the supplier for pack index for the corresponding pack file.
+ * @param reverseIndexSupplier
+ * the supplier for pack reverse index for the corresponding pack
+ * file.
+ * @return a copy of the index in-memory.
+ * @throws java.io.IOException
+ * the stream cannot be read.
+ * @throws CorruptObjectException
+ * the stream does not contain a valid pack bitmap index.
+ */
+ public static PackBitmapIndex read(InputStream fd,
+ SupplierWithIOException<PackIndex> packIndexSupplier,
+ SupplierWithIOException<PackReverseIndex> reverseIndexSupplier)
throws IOException {
- return new PackBitmapIndexV1(fd, packIndex, reverseIndex);
+ return new PackBitmapIndexV1(fd, packIndexSupplier,
+ reverseIndexSupplier);
}
/** Footer checksum applied on the bottom of the pack file. */
@@ -121,7 +149,8 @@ public abstract class PackBitmapIndex {
* @throws java.lang.IllegalArgumentException
* when the item is not found.
*/
- public abstract ObjectId getObject(int position) throws IllegalArgumentException;
+ public abstract ObjectId getObject(int position)
+ throws IllegalArgumentException;
/**
* Returns a bitmap containing positions for objects that have the given Git
@@ -161,4 +190,19 @@ public abstract class PackBitmapIndex {
* @return the number of bitmaps in this bitmap index.
*/
public abstract int getBitmapCount();
+
+ /**
+ * Supplier that propagates IOException.
+ *
+ * @param <T>
+ * the return type which is expected from {@link #get()}
+ */
+ @FunctionalInterface
+ public interface SupplierWithIOException<T> {
+ /**
+ * @return result
+ * @throws IOException
+ */
+ T get() throws IOException;
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java
index b7d241f3f8..6846e3bcad 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java
@@ -14,8 +14,11 @@ import java.io.DataInput;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
+import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Constants;
@@ -46,11 +49,13 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex {
private final ObjectIdOwnerMap<StoredBitmap> bitmaps;
- PackBitmapIndexV1(final InputStream fd, PackIndex packIndex,
- PackReverseIndex reverseIndex) throws IOException {
+ PackBitmapIndexV1(final InputStream fd,
+ SupplierWithIOException<PackIndex> packIndexSupplier,
+ SupplierWithIOException<PackReverseIndex> reverseIndexSupplier)
+ throws IOException {
+ // An entry is object id, xor offset, flag byte, and a length encoded
+ // bitmap. The object id is an int32 of the nth position sorted by name.
super(new ObjectIdOwnerMap<StoredBitmap>());
- this.packIndex = packIndex;
- this.reverseIndex = reverseIndex;
this.bitmaps = getBitmaps();
final byte[] scratch = new byte[32];
@@ -97,10 +102,10 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex {
this.blobs = readBitmap(dataInput);
this.tags = readBitmap(dataInput);
- // An entry is object id, xor offset, flag byte, and a length encoded
- // bitmap. The object id is an int32 of the nth position sorted by name.
+ // Read full bitmap from storage first.
+ List<IdxPositionBitmap> idxPositionBitmapList = new ArrayList<>();
// The xor offset is a single byte offset back in the list of entries.
- StoredBitmap[] recentBitmaps = new StoredBitmap[MAX_XOR_OFFSET];
+ IdxPositionBitmap[] recentBitmaps = new IdxPositionBitmap[MAX_XOR_OFFSET];
for (int i = 0; i < (int) numEntries; i++) {
IO.readFully(fd, scratch, 0, 6);
int nthObjectId = NB.decodeInt32(scratch, 0);
@@ -108,38 +113,58 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex {
int flags = scratch[5];
EWAHCompressedBitmap bitmap = readBitmap(dataInput);
- if (nthObjectId < 0)
+ if (nthObjectId < 0) {
throw new IOException(MessageFormat.format(
JGitText.get().invalidId, String.valueOf(nthObjectId)));
- if (xorOffset < 0)
+ }
+ if (xorOffset < 0) {
throw new IOException(MessageFormat.format(
JGitText.get().invalidId, String.valueOf(xorOffset)));
- if (xorOffset > MAX_XOR_OFFSET)
+ }
+ if (xorOffset > MAX_XOR_OFFSET) {
throw new IOException(MessageFormat.format(
JGitText.get().expectedLessThanGot,
String.valueOf(MAX_XOR_OFFSET),
String.valueOf(xorOffset)));
- if (xorOffset > i)
+ }
+ if (xorOffset > i) {
throw new IOException(MessageFormat.format(
JGitText.get().expectedLessThanGot, String.valueOf(i),
String.valueOf(xorOffset)));
-
- ObjectId objectId = packIndex.getObjectId(nthObjectId);
- StoredBitmap xorBitmap = null;
+ }
+ IdxPositionBitmap xorIdxPositionBitmap = null;
if (xorOffset > 0) {
int index = (i - xorOffset);
- xorBitmap = recentBitmaps[index % recentBitmaps.length];
- if (xorBitmap == null)
+ xorIdxPositionBitmap = recentBitmaps[index
+ % recentBitmaps.length];
+ if (xorIdxPositionBitmap == null) {
throw new IOException(MessageFormat.format(
JGitText.get().invalidId,
String.valueOf(xorOffset)));
+ }
}
+ IdxPositionBitmap idxPositionBitmap = new IdxPositionBitmap(
+ nthObjectId, xorIdxPositionBitmap, bitmap, flags);
+ idxPositionBitmapList.add(idxPositionBitmap);
+ recentBitmaps[i % recentBitmaps.length] = idxPositionBitmap;
+ }
- StoredBitmap sb = new StoredBitmap(
- objectId, bitmap, xorBitmap, flags);
+ this.packIndex = packIndexSupplier.get();
+ for (int i = 0; i < idxPositionBitmapList.size(); ++i) {
+ IdxPositionBitmap idxPositionBitmap = idxPositionBitmapList.get(i);
+ ObjectId objectId = packIndex
+ .getObjectId(idxPositionBitmap.nthObjectId);
+ StoredBitmap sb = new StoredBitmap(objectId,
+ idxPositionBitmap.bitmap,
+ idxPositionBitmap.getXorStoredBitmap(),
+ idxPositionBitmap.flags);
+ // Save the StoredBitmap for a possible future XorStoredBitmap
+ // reference.
+ idxPositionBitmap.sb = sb;
bitmaps.add(sb);
- recentBitmaps[i % recentBitmaps.length] = sb;
}
+
+ this.reverseIndex = reverseIndexSupplier.get();
}
/** {@inheritDoc} */
@@ -214,4 +239,34 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex {
bitmap.deserialize(dataInput);
return bitmap;
}
+
+ /**
+ * Temporary holder of object position in pack index and other metadata for
+ * {@code StoredBitmap}.
+ */
+ private static final class IdxPositionBitmap {
+ int nthObjectId;
+
+ IdxPositionBitmap xorIdxPositionBitmap;
+
+ EWAHCompressedBitmap bitmap;
+
+ int flags;
+
+ StoredBitmap sb;
+
+ IdxPositionBitmap(int nthObjectId,
+ @Nullable IdxPositionBitmap xorIdxPositionBitmap,
+ EWAHCompressedBitmap bitmap, int flags) {
+ this.nthObjectId = nthObjectId;
+ this.xorIdxPositionBitmap = xorIdxPositionBitmap;
+ this.bitmap = bitmap;
+ this.flags = flags;
+ }
+
+ StoredBitmap getXorStoredBitmap() {
+ return xorIdxPositionBitmap == null ? null
+ : xorIdxPositionBitmap.sb;
+ }
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLock.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLockImpl.java
index 482b143e33..7cc5f50549 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLock.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackLockImpl.java
@@ -14,6 +14,7 @@ import java.io.File;
import java.io.IOException;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.transport.PackLock;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils;
@@ -21,7 +22,7 @@ import org.eclipse.jgit.util.FileUtils;
* Keeps track of a {@link org.eclipse.jgit.internal.storage.file.Pack}'s
* associated <code>.keep</code> file.
*/
-public class PackLock {
+public class PackLockImpl implements PackLock {
private final File keepFile;
/**
@@ -32,7 +33,7 @@ public class PackLock {
* @param fs
* the filesystem abstraction used by the repository.
*/
- public PackLock(File packFile, FS fs) {
+ public PackLockImpl(File packFile, FS fs) {
final File p = packFile.getParentFile();
final String n = packFile.getName();
keepFile = new File(p, n.substring(0, n.length() - 5) + ".keep"); //$NON-NLS-1$
@@ -59,12 +60,7 @@ public class PackLock {
return lf.commit();
}
- /**
- * Remove the <code>.keep</code> file that holds this pack in place.
- *
- * @throws java.io.IOException
- * if deletion of .keep file failed
- */
+ @Override
public void unlock() throws IOException {
FileUtils.delete(keepFile);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
index 228c25f0a5..648d4a1821 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
@@ -142,7 +142,7 @@ public class OpenSshConfigFile implements SshConfigStore {
* real host name, or it may just be a "Host" block in the
* configuration file.
* @param port
- * the user supplied; <= 0 if none
+ * the user supplied; &lt;= 0 if none
* @param userName
* the user supplied, may be {@code null} or empty if none given
* @return the configuration for the requested name.
@@ -151,6 +151,18 @@ public class OpenSshConfigFile implements SshConfigSto