Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.bazelversion1
-rw-r--r--.gitignore7
-rw-r--r--WORKSPACE38
-rw-r--r--lib/BUILD10
-rw-r--r--org.eclipse.jgit.ant.test/.settings/org.eclipse.pde.prefs34
-rw-r--r--org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF10
-rw-r--r--org.eclipse.jgit.ant.test/pom.xml4
-rw-r--r--org.eclipse.jgit.ant/META-INF/MANIFEST.MF10
-rw-r--r--org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.ant/pom.xml159
-rw-r--r--org.eclipse.jgit.archive/META-INF/MANIFEST.MF17
-rw-r--r--org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.archive/pom.xml45
-rw-r--r--org.eclipse.jgit.coverage/pom.xml36
-rw-r--r--org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF12
-rw-r--r--org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.http.apache/pom.xml159
-rw-r--r--org.eclipse.jgit.http.server/META-INF/MANIFEST.MF28
-rw-r--r--org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.http.server/pom.xml25
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java10
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java13
-rw-r--r--org.eclipse.jgit.http.test/.settings/org.eclipse.pde.prefs34
-rw-r--r--org.eclipse.jgit.http.test/META-INF/MANIFEST.MF40
-rw-r--r--org.eclipse.jgit.http.test/pom.xml4
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java18
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java40
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java32
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java28
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java29
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java23
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java20
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.junit.http/pom.xml45
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java17
-rw-r--r--org.eclipse.jgit.junit.ssh/BUILD2
-rw-r--r--org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF53
-rw-r--r--org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.junit.ssh/pom.xml47
-rw-r--r--org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java30
-rw-r--r--org.eclipse.jgit.junit/META-INF/MANIFEST.MF40
-rw-r--r--org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.junit/pom.xml45
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java20
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java30
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java4
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java4
-rw-r--r--org.eclipse.jgit.lfs.server.test/.settings/org.eclipse.pde.prefs34
-rw-r--r--org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF38
-rw-r--r--org.eclipse.jgit.lfs.server.test/pom.xml4
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java15
-rw-r--r--org.eclipse.jgit.lfs.server/.settings/.api_filters27
-rw-r--r--org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF32
-rw-r--r--org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.lfs.server/pom.xml25
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/TransferHandler.java4
-rw-r--r--org.eclipse.jgit.lfs.test/.settings/org.eclipse.pde.prefs34
-rw-r--r--org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF25
-rw-r--r--org.eclipse.jgit.lfs.test/pom.xml4
-rw-r--r--org.eclipse.jgit.lfs/.settings/.api_filters4
-rw-r--r--org.eclipse.jgit.lfs/META-INF/MANIFEST.MF46
-rw-r--r--org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.lfs/pom.xml25
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java9
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java8
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java24
-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.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.xml5
-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.xml12
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.gitignore1
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.project17
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/build.properties4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/edl-v10.html59
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.properties178
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml31
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/license.html189
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml62
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml22
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml41
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml97
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml10
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml6
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.gitignore1
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.project17
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/build.properties4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/edl-v10.html59
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.properties178
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.xml31
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/license.html189
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/pom.xml62
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath7
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project6
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target24
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.tpd8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target92
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12-staging.target (renamed from org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.target)26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12-staging.tpd8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target24
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target24
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target24
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target24
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20190602212107-2019-06.tpd23
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/pom.xml66
-rw-r--r--org.eclipse.jgit.pgm.test/.settings/org.eclipse.pde.prefs34
-rw-r--r--org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF36
-rw-r--r--org.eclipse.jgit.pgm.test/pom.xml4
-rw-r--r--org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java2
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java16
-rw-r--r--org.eclipse.jgit.pgm/META-INF/MANIFEST.MF88
-rw-r--r--org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.pgm/pom.xml8
-rw-r--r--org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties9
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java18
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java15
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java19
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java26
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsFiles.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java10
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java24
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java19
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java5
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java5
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java5
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java5
-rw-r--r--org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.pde.prefs34
-rw-r--r--org.eclipse.jgit.ssh.apache.test/BUILD2
-rw-r--r--org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF18
-rw-r--r--org.eclipse.jgit.ssh.apache.test/pom.xml2
-rw-r--r--org.eclipse.jgit.ssh.apache/BUILD2
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF108
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ssh.apache/pom.xml4
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java87
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/EncryptedFileKeyPairProvider.java158
-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/JGitHostConfigEntry.java17
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyIterator.java275
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java57
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java5
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyVerifier.java7
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/PasswordProviderWrapper.java20
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/RepeatingFilePasswordProvider.java41
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java17
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java5
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java31
-rw-r--r--org.eclipse.jgit.test/.settings/org.eclipse.pde.prefs34
-rw-r--r--org.eclipse.jgit.test/BUILD4
-rw-r--r--org.eclipse.jgit.test/META-INF/MANIFEST.MF107
-rw-r--r--org.eclipse.jgit.test/pom.xml4
-rw-r--r--org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass8
-rw-r--r--org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub1
-rw-r--r--org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java4
-rw-r--r--org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java4
-rw-r--r--org.eclipse.jgit.test/tests.bzl6
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-invalid.txt1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple1.txt2
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple2.txt2
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-with-empty-and-comment-lines.txt8
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java12
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java28
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java50
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java49
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java117
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBasicTest.java10
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java5
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java26
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheFindTest.java5
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java40
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheTreeTest.java15
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/events/ConfigChangeEventTest.java9
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/InMemoryRepositoryTest.java150
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/BatchRefUpdateTest.java1
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java23
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java55
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java17
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java9
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java31
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java34
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileTest.java339
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java42
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java31
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RebaseTodoFileTest.java142
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefTest.java17
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReflogConfigTest.java9
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java43
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmapCalculatorTest.java181
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmappedReachabilityCheckerTest.java69
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/PedestrianReachabilityCheckerTest.java57
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java168
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java13
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java19
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java80
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java34
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java18
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java24
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefAdvertiserTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java35
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java189
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java734
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java37
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtilsTest.java1
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/LRUMapTest.java78
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefListTest.java35
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/http/HttpCookiesMatcher.java150
-rw-r--r--org.eclipse.jgit.ui/META-INF/MANIFEST.MF18
-rw-r--r--org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.ui/pom.xml45
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java3
-rw-r--r--org.eclipse.jgit/.settings/.api_filters88
-rw-r--r--org.eclipse.jgit/META-INF/MANIFEST.MF122
-rw-r--r--org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit/pom.xml4
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java60
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java45
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java17
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java30
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java35
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/IncorrectObjectTypeException.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchLeader.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchReplica.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/LagCheck.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/LocalReplica.java25
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/RemoteGitReplica.java23
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/StageBuilder.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DeltaBaseCache.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java25
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java19
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java24
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java32
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java97
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObjectCache.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BinaryDelta.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindow.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java168
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFile.java488
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileCache.java106
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java29
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java43
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java16
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/FileMode.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoFile.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java28
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java43
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java13
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocator.java55
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/nls/TranslationBundle.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMapMerger.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java13
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapCalculator.java136
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmappedReachabilityChecker.java120
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java147
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PedestrianReachabilityChecker.java (renamed from org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java)69
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ReachabilityChecker.java90
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java26
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java44
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java28
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java46
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchRequest.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV0Request.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java23
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java192
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpConfig.java84
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java119
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV0Parser.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java113
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java135
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java43
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java264
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java16
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java186
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java37
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilterMarker.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java43
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java19
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java42
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/GSSManagerFactory.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java25
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/LRUMap.java (renamed from org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java)74
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java64
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java22
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/References.java67
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/SimpleLruCache.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/IsolatedOutputStream.java38
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/ThrowingPrintWriter.java10
-rw-r--r--pom.xml12
-rw-r--r--tools/BUILD16
-rwxr-xr-xtools/version.sh22
414 files changed, 8105 insertions, 4839 deletions
diff --git a/.bazelversion b/.bazelversion
new file mode 100644
index 0000000000..30f6cf8d98
--- /dev/null
+++ b/.bazelversion
@@ -0,0 +1 @@
+0.26.1
diff --git a/.gitignore b/.gitignore
index 3679a3365b..553ecac486 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,9 @@
/.project
/target
-.DS_Store
infer-out
bazel-*
-*~
+
+# Do not add editor- and OS-specific files like *~ (Emacs) and .DS_Store
+# (macOS). Instead, add them to $XDG_CONFIG_HOME/git/ignore
+# (~/.config/git/ignore if $XDG_CONFIG_HOME is not set) or
+# $GIT_DIR/info/exclude. See "git help gitignore" for details.
diff --git a/WORKSPACE b/WORKSPACE
index 4cad1003d1..9fb3eedef6 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -4,14 +4,14 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
- sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
- strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
- urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
+ sha256 = "2ea8a5ed2b448baf4a6855d3ce049c4c452a6470b1efd1504fdb7c1c134d220a",
+ strip_prefix = "bazel-skylib-0.8.0",
+ urls = ["https://github.com/bazelbuild/bazel-skylib/archive/0.8.0.tar.gz"],
)
load("@bazel_skylib//lib:versions.bzl", "versions")
-versions.check(minimum_bazel_version = "0.19.0")
+versions.check(minimum_bazel_version = "0.26.1")
load("//tools:bazlets.bzl", "load_bazlets")
@@ -59,15 +59,15 @@ maven_jar(
)
maven_jar(
- name = "sshd-core",
- artifact = "org.apache.sshd:sshd-core:2.0.0",
- sha1 = "f4275079a2463cfd2bf1548a80e1683288a8e86b",
+ name = "sshd-osgi",
+ artifact = "org.apache.sshd:sshd-osgi:2.2.0",
+ sha1 = "a45d48cb53678e699816e8e054e55fa33f5a4558",
)
maven_jar(
name = "sshd-sftp",
- artifact = "org.apache.sshd:sshd-sftp:2.0.0",
- sha1 = "a12d64dc2d5d23271a4dc58075e55f9c64a68494",
+ artifact = "org.apache.sshd:sshd-sftp:2.2.0",
+ sha1 = "3d011e00adf38e49bb8711a9dd762fe908a2170c",
)
maven_jar(
@@ -212,25 +212,25 @@ maven_jar(
src_sha1 = "94e89a8c9f82e38555e95b9f7f58344a247e862c",
)
-BOUNCYCASTLE_VER = "1.60"
+BOUNCYCASTLE_VER = "1.61"
maven_jar(
- name = "bcpg-jdk15on",
+ name = "bcpg",
artifact = "org.bouncycastle:bcpg-jdk15on:" + BOUNCYCASTLE_VER,
- sha1 = "13c7a199c484127daad298996e95818478431a2c",
- src_sha1 = "edcd9e86d95e39b4da39bb295efd93bc4f56266e",
+ sha1 = "422656435514ab8a28752b117d5d2646660a0ace",
+ src_sha1 = "836da34e11114cbce8fa99f54175f8f3278d1cce",
)
maven_jar(
- name = "bcprov-jdk15on",
+ name = "bcprov",
artifact = "org.bouncycastle:bcprov-jdk15on:" + BOUNCYCASTLE_VER,
- sha1 = "bd47ad3bd14b8e82595c7adaa143501e60842a84",
- src_sha1 = "7c57a4d13fe53d9abb967bba600dd0b293dafd6a",
+ sha1 = "00df4b474e71be02c1349c3292d98886f888d1f7",
+ src_sha1 = "3bf88046a16098ea6cc41576dd50d512854d39e1",
)
maven_jar(
- name = "bcpkix-jdk15on",
+ name = "bcpkix",
artifact = "org.bouncycastle:bcpkix-jdk15on:" + BOUNCYCASTLE_VER,
- sha1 = "d0c46320fbc07be3a24eb13a56cee4e3d38e0c75",
- src_sha1 = "a25f041293f401af08efba63ff4bbdce98134a03",
+ sha1 = "89bb3aa5b98b48e584eee2a7401b7682a46779b4",
+ src_sha1 = "a0498d09200a18737eccc05aa81bbd05c1be0f8c",
)
diff --git a/lib/BUILD b/lib/BUILD
index 57ef295e3a..89279da8cc 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -69,14 +69,14 @@ java_library(
)
java_library(
- name = "sshd-core",
+ name = "sshd-osgi",
visibility = [
"//org.eclipse.jgit.junit.ssh:__pkg__",
"//org.eclipse.jgit.ssh.apache:__pkg__",
"//org.eclipse.jgit.ssh.apache.test:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
- exports = ["@sshd-core//jar"],
+ exports = ["@sshd-osgi//jar"],
)
java_library(
@@ -154,7 +154,7 @@ java_library(
"//org.eclipse.jgit:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
- exports = ["@bcpg-jdk15on//jar"],
+ exports = ["@bcpg//jar"],
)
java_library(
@@ -163,7 +163,7 @@ java_library(
"//org.eclipse.jgit:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
- exports = ["@bcprov-jdk15on//jar"],
+ exports = ["@bcprov//jar"],
)
java_library(
@@ -172,7 +172,7 @@ java_library(
"//org.eclipse.jgit:__pkg__",
"//org.eclipse.jgit.test:__pkg__",
],
- exports = ["@bcpkix-jdk15on//jar"],
+ exports = ["@bcpkix//jar"],
)
java_library(
diff --git a/org.eclipse.jgit.ant.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.ant.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2174e4fd5b
--- /dev/null
+++ b/org.eclipse.jgit.ant.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
index 708fad886e..9e38b4339b 100644
--- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
@@ -4,13 +4,13 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.ant.test
Bundle-SymbolicName: org.eclipse.jgit.ant.test
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.ant.tasks;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+ org.eclipse.jgit.ant.tasks;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)"
diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml
index b9f5fb6460..8e8208f408 100644
--- a/org.eclipse.jgit.ant.test/pom.xml
+++ b/org.eclipse.jgit.ant.test/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ant.test</artifactId>
@@ -105,7 +105,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>@{argLine} -Xmx256m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}</argLine>
+ <argLine>@{argLine} -Xmx512m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}</argLine>
</configuration>
</plugin>
</plugins>
diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
index 804d90ce0d..15359e727d 100644
--- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
@@ -3,11 +3,13 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ant
Bundle-SymbolicName: org.eclipse.jgit.ant
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)"
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)"
Bundle-Localization: plugin
Bundle-Vendor: %Provider-Name
-Export-Package: org.eclipse.jgit.ant.tasks;version="5.3.3";
- uses:="org.apache.tools.ant.types,org.apache.tools.ant"
+Export-Package: org.eclipse.jgit.ant;version="5.4.1",
+ org.eclipse.jgit.ant.tasks;version="5.4.1";
+ 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
new file mode 100644
index 0000000000..8e62fb4415
--- /dev/null
+++ b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.jgit.ant - Sources
+Bundle-SymbolicName: org.eclipse.jgit.ant.source
+Bundle-Vendor: Eclipse.org - JGit
+Bundle-Version: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ant;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml
index ffbe8db63e..c7fb95aa07 100644
--- a/org.eclipse.jgit.ant/pom.xml
+++ b/org.eclipse.jgit.ant/pom.xml
@@ -45,62 +45,103 @@
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>5.3.3-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.jgit.ant</artifactId>
- <name>JGit - Ant Tasks</name>
-
- <description>
- Ant based user interface for Git
- </description>
-
- <properties>
- <translate-qualifier />
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.10.5</version>
- </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>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>${bundle-manifest}</manifestFile>
- </archive>
- </configuration>
- </plugin>
+ <parent>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit-parent</artifactId>
+ <version>5.4.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.jgit.ant</artifactId>
+ <name>JGit - Ant Tasks</name>
+
+ <description>Ant based user interface for Git</description>
+
+ <properties>
+ <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.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.10.5</version>
+ </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>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
@@ -143,10 +184,10 @@
</execution>
</executions>
</plugin>
- </plugins>
- </build>
+ </plugins>
+ </build>
- <reporting>
+ <reporting>
<plugins>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
index a172543712..0eb38eb41b 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: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.archive
Bundle-SymbolicName: org.eclipse.jgit.archive
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -13,16 +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="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+ org.eclipse.jgit.api;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.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="5.3.3";
+Export-Package: org.eclipse.jgit.archive;version="5.4.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.api,
org.apache.commons.compress.archivers,
- org.osgi.framework"
+ org.osgi.framework",
+ org.eclipse.jgit.archive.internal;version="5.4.1";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 b1183743eb..30928f83f6 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: 5.3.3.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.3.3.qualifier";roots="."
+Bundle-Version: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml
index 95e1e44982..a3f9520ac3 100644
--- a/org.eclipse.jgit.archive/pom.xml
+++ b/org.eclipse.jgit.archive/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.archive</artifactId>
@@ -64,6 +64,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -99,6 +100,48 @@
<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>
diff --git a/org.eclipse.jgit.coverage/pom.xml b/org.eclipse.jgit.coverage/pom.xml
index 0819e8ecfd..12c75527e6 100644
--- a/org.eclipse.jgit.coverage/pom.xml
+++ b/org.eclipse.jgit.coverage/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -18,88 +18,88 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ant</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.archive</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.apache</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.server</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.server</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.pgm</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ui</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.test</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ant.test</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.test</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.pgm.test</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.test</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
index 6905939aa4..8206e8a9d1 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: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Localization: plugin
Bundle-Vendor: %Provider-Name
@@ -23,11 +23,11 @@ Import-Package: org.apache.http;version="[4.3.0,5.0.0)",
org.apache.http.impl.client;version="[4.3.0,5.0.0)",
org.apache.http.impl.conn;version="[4.3.0,5.0.0)",
org.apache.http.params;version="[4.3.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)"
-Export-Package: org.eclipse.jgit.transport.http.apache;version="5.3.3";
+ org.eclipse.jgit.annotations;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)"
+Export-Package: org.eclipse.jgit.transport.http.apache;version="5.4.1";
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
new file mode 100644
index 0000000000..5aeb331cb7
--- /dev/null
+++ b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+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: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml
index c2ea27d7b6..d2665c04c8 100644
--- a/org.eclipse.jgit.http.apache/pom.xml
+++ b/org.eclipse.jgit.http.apache/pom.xml
@@ -45,64 +45,107 @@
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>5.3.3-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit-parent</artifactId>
+ <version>5.4.1-SNAPSHOT</version>
+ </parent>
- <artifactId>org.eclipse.jgit.http.apache</artifactId>
- <name>JGit - Apache httpclient based HTTP support</name>
+ <artifactId>org.eclipse.jgit.http.apache</artifactId>
+ <name>JGit - Apache httpclient based HTTP support</name>
- <description>
+ <description>
Apache httpclient based HTTP support
- </description>
-
- <properties>
- <translate-qualifier />
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</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>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>${bundle-manifest}</manifestFile>
- </archive>
- </configuration>
- </plugin>
+ </description>
+
+ <properties>
+ <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.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</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>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
@@ -145,10 +188,10 @@
</execution>
</executions>
</plugin>
- </plugins>
- </build>
+ </plugins>
+ </build>
- <reporting>
+ <reporting>
<plugins>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
index 18910618b7..a231f58282 100644
--- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
@@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.http.server
Bundle-SymbolicName: org.eclipse.jgit.http.server
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
-Export-Package: org.eclipse.jgit.http.server;version="5.3.3",
- org.eclipse.jgit.http.server.glue;version="5.3.3";
+Export-Package: org.eclipse.jgit.http.server;version="5.4.1",
+ org.eclipse.jgit.http.server.glue;version="5.4.1";
uses:="javax.servlet,javax.servlet.http",
- org.eclipse.jgit.http.server.resolver;version="5.3.3";
+ org.eclipse.jgit.http.server.resolver;version="5.4.1";
uses:="org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.lib,
org.eclipse.jgit.transport,
@@ -18,13 +18,13 @@ Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
javax.servlet.http;version="[2.5.0,3.2.0)",
- org.eclipse.jgit.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.transport.parser;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.resolver;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)"
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.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
new file mode 100644
index 0000000000..3a0655288f
--- /dev/null
+++ b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+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: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml
index 6aff14f450..f795038602 100644
--- a/org.eclipse.jgit.http.server/pom.xml
+++ b/org.eclipse.jgit.http.server/pom.xml
@@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.server</artifactId>
@@ -64,6 +64,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -99,6 +100,28 @@
<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>
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java
index 2ebe1b7d2f..51de8abd0e 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java
@@ -202,7 +202,7 @@ public class GitFilter extends MetaFilter {
if (resolver == null) {
File root = getFile(filterConfig, "base-path");
boolean exportAll = getBoolean(filterConfig, "export-all");
- setRepositoryResolver(new FileResolver<HttpServletRequest>(root, exportAll));
+ setRepositoryResolver(new FileResolver<>(root, exportAll));
}
initialized = true;
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
index b6d73b5591..256279bfed 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
@@ -64,7 +64,6 @@ import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.eclipse.jgit.internal.storage.dfs.DfsRepository;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Repository;
@@ -276,12 +275,11 @@ public final class ServletUtils {
}
static String identify(Repository git) {
- if (git instanceof DfsRepository) {
- return ((DfsRepository) git).getDescription().getRepositoryName();
- } else if (git.getDirectory() != null) {
- return git.getDirectory().getPath();
+ String identifier = git.getIdentifier();
+ if (identifier == null) {
+ return "unknown";
}
- return "unknown";
+ return identifier;
}
private ServletUtils() {
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java
index d8fa712ebf..14b6506ad3 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java
@@ -47,7 +47,6 @@ import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import java.io.IOException;
-import javax.servlet.FilterChain;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -140,14 +139,10 @@ public class MetaServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
- filter.doFilter(req, res, new FilterChain() {
- @Override
- public void doFilter(ServletRequest request,
- ServletResponse response) throws IOException,
- ServletException {
- ((HttpServletResponse) response).sendError(SC_NOT_FOUND);
- }
- });
+ filter.doFilter(req, res,
+ (ServletRequest request, ServletResponse response) -> {
+ ((HttpServletResponse) response).sendError(SC_NOT_FOUND);
+ });
}
/**
diff --git a/org.eclipse.jgit.http.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.http.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2174e4fd5b
--- /dev/null
+++ b/org.eclipse.jgit.http.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
index 40e7c2952c..4d4b3e4606 100644
--- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.http.test
Bundle-SymbolicName: org.eclipse.jgit.http.test
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -28,25 +28,25 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.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.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.http.server;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.http.server.glue;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.http.server.resolver;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit.http;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.resolver;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.http.server;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.http.server.glue;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.http.server.resolver;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
org.hamcrest;version="[1.1.0,2.0.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)",
diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml
index fbd583e3ff..df99448f22 100644
--- a/org.eclipse.jgit.http.test/pom.xml
+++ b/org.eclipse.jgit.http.test/pom.xml
@@ -51,7 +51,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.test</artifactId>
@@ -139,7 +139,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory} -Xmx300m</argLine>
+ <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory} -Xmx512m</argLine>
<includes>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java
index 5a46967766..ec9ced0f70 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java
@@ -69,7 +69,6 @@ import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.RemoteRefUpdate;
import org.eclipse.jgit.transport.Transport;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.junit.Before;
@@ -90,18 +89,13 @@ public class AdvertiseErrorTest extends HttpTestCase {
ServletContextHandler app = server.addContext("/git");
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(srcName))
- throw new RepositoryNotFoundException(name);
-
- final Repository db = src.getRepository();
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(srcName)) {
+ throw new RepositoryNotFoundException(name);
}
+ final Repository db = src.getRepository();
+ db.incrementOpen();
+ return db;
});
gs.setReceivePackFactory(new DefaultReceivePackFactory() {
@Override
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java
index 8dce98beef..eb19365074 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java
@@ -75,7 +75,6 @@ import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.RemoteRefUpdate;
import org.eclipse.jgit.transport.Transport;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.junit.Before;
@@ -117,18 +116,13 @@ public class GitServletResponseTests extends HttpTestCase {
ServletContextHandler app = server.addContext("/git");
gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(repoName))
- throw new RepositoryNotFoundException(name);
-
- final Repository db = srv.getRepository();
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(repoName)) {
+ throw new RepositoryNotFoundException(name);
}
+ final Repository db = srv.getRepository();
+ db.incrementOpen();
+ return db;
});
gs.setReceivePackFactory(new DefaultReceivePackFactory() {
@Override
@@ -179,12 +173,8 @@ public class GitServletResponseTests extends HttpTestCase {
maxPackSize = 0;
postHook = null;
- preHook = new PreReceiveHook() {
- @Override
- public void onPreReceive(ReceivePack rp,
- Collection<ReceiveCommand> commands) {
- throw new IllegalStateException();
- }
+ preHook = (ReceivePack rp, Collection<ReceiveCommand> commands) -> {
+ throw new IllegalStateException();
};
try (Transport t = Transport.open(clientRepo, srvURI)) {
@@ -263,15 +253,11 @@ public class GitServletResponseTests extends HttpTestCase {
maxPackSize = 100;
// this PostReceiveHook when called after an unsuccesfull unpack will
// lead to an IllegalStateException
- postHook = new PostReceiveHook() {
- @Override
- public void onPostReceive(ReceivePack rp,
- Collection<ReceiveCommand> commands) {
- // the maxPackSize setting caused that the packfile couldn't be
- // saved to disk. Calling getPackSize() now will lead to a
- // IllegalStateException.
- rp.getPackSize();
- }
+ postHook = (ReceivePack rp, Collection<ReceiveCommand> commands) -> {
+ // the maxPackSize setting caused that the packfile couldn't be
+ // saved to disk. Calling getPackSize() now will lead to a
+ // IllegalStateException.
+ rp.getPackSize();
};
try (Transport t = Transport.open(clientRepo, srvURI)) {
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java
index 5a5ff1a8ae..49ff51a5b1 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java
@@ -70,14 +70,12 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.transport.PreReceiveHook;
import org.eclipse.jgit.transport.PushResult;
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.RemoteRefUpdate;
import org.eclipse.jgit.transport.Transport;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.junit.Before;
@@ -98,18 +96,13 @@ public class HookMessageTest extends HttpTestCase {
ServletContextHandler app = server.addContext("/git");
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(srcName))
- throw new RepositoryNotFoundException(name);
-
- final Repository db = src.getRepository();
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(srcName)) {
+ throw new RepositoryNotFoundException(name);
}
+ final Repository db = src.getRepository();
+ db.incrementOpen();
+ return db;
});
gs.setReceivePackFactory(new DefaultReceivePackFactory() {
@Override
@@ -117,14 +110,11 @@ public class HookMessageTest extends HttpTestCase {
throws ServiceNotEnabledException,
ServiceNotAuthorizedException {
ReceivePack recv = super.create(req, db);
- recv.setPreReceiveHook(new PreReceiveHook() {
- @Override
- public void onPreReceive(ReceivePack rp,
- Collection<ReceiveCommand> commands) {
- rp.sendMessage("message line 1");
- rp.sendError("no soup for you!");
- rp.sendMessage("come back next year!");
- }
+ recv.setPreReceiveHook((ReceivePack rp,
+ Collection<ReceiveCommand> commands) -> {
+ rp.sendMessage("message line 1");
+ rp.sendError("no soup for you!");
+ rp.sendMessage("come back next year!");
});
return recv;
}
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
index 53626b1b2e..8ec2f51cff 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
@@ -44,7 +44,6 @@
package org.eclipse.jgit.http.test;
import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.theInstance;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -87,8 +86,6 @@ import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
import org.eclipse.jgit.transport.http.HttpConnection;
import org.eclipse.jgit.transport.http.JDKHttpConnectionFactory;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.junit.Before;
import org.junit.Test;
@@ -141,18 +138,13 @@ public class HttpClientTests extends HttpTestCase {
private ServletContextHandler smart(String path) {
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- final Repository db = remoteRepository.getRepository();
- if (!name.equals(nameOf(db)))
- throw new RepositoryNotFoundException(name);
-
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ final Repository db = remoteRepository.getRepository();
+ if (!name.equals(nameOf(db))) {
+ throw new RepositoryNotFoundException(name);
}
+ db.incrementOpen();
+ return db;
});
ServletContextHandler ctx = server.addContext(path);
@@ -373,7 +365,7 @@ public class HttpClientTests extends HttpTestCase {
// Check that we get a v0 response.
assertThat(pckIn.readString(), is("# service=git-upload-pack"));
- assertThat(pckIn.readString(), theInstance(PacketLineIn.END));
+ assertTrue(PacketLineIn.isEnd(pckIn.readString()));
assertTrue(pckIn.readString().matches("[0-9a-f]{40} HEAD.*"));
}
@@ -395,8 +387,7 @@ public class HttpClientTests extends HttpTestCase {
// What remains are capabilities - ensure that all of them are
// non-empty strings, and that we see END at the end.
- String s;
- while ((s = pckIn.readString()) != PacketLineIn.END) {
+ for (String s : pckIn.readStrings()) {
assertTrue(!s.isEmpty());
}
}
@@ -429,8 +420,7 @@ public class HttpClientTests extends HttpTestCase {
PacketLineIn pckIn = new PacketLineIn(c.getInputStream());
// Just check that we get what looks like a ref advertisement.
- String s;
- while ((s = pckIn.readString()) != PacketLineIn.END) {
+ for (String s : pckIn.readStrings()) {
assertTrue(s.matches("[0-9a-f]{40} [A-Za-z/]*"));
}
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java
index 0415bcbb55..79df5a2ab2 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java
@@ -63,14 +63,12 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.transport.PostReceiveHook;
import org.eclipse.jgit.transport.PushResult;
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.RemoteRefUpdate;
import org.eclipse.jgit.transport.Transport;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.junit.Before;
@@ -93,18 +91,13 @@ public class MeasurePackSizeTest extends HttpTestCase {
ServletContextHandler app = server.addContext("/git");
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(srcName))
- throw new RepositoryNotFoundException(name);
-
- final Repository db = src.getRepository();
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(srcName)) {
+ throw new RepositoryNotFoundException(name);
}
+ final Repository db = src.getRepository();
+ db.incrementOpen();
+ return db;
});
gs.setReceivePackFactory(new DefaultReceivePackFactory() {
@Override
@@ -112,13 +105,9 @@ public class MeasurePackSizeTest extends HttpTestCase {
throws ServiceNotEnabledException,
ServiceNotAuthorizedException {
ReceivePack recv = super.create(req, db);
- recv.setPostReceiveHook(new PostReceiveHook() {
-
- @Override
- public void onPostReceive(ReceivePack rp,
- Collection<ReceiveCommand> commands) {
- packSize = rp.getPackSize();
- }
+ recv.setPostReceiveHook((ReceivePack rp,
+ Collection<ReceiveCommand> commands) -> {
+ packSize = rp.getPackSize();
});
return recv;
}
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java
index a1baae3b26..6a3d8829bb 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java
@@ -44,7 +44,7 @@
package org.eclipse.jgit.http.test;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -71,8 +71,6 @@ import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.transport.PacketLineIn;
import org.eclipse.jgit.transport.PacketLineOut;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.eclipse.jgit.util.NB;
import org.junit.Before;
import org.junit.Test;
@@ -94,18 +92,13 @@ public class ProtocolErrorTest extends HttpTestCase {
ServletContextHandler app = server.addContext("/git");
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(srcName))
- throw new RepositoryNotFoundException(name);
-
- final Repository db = src.getRepository();
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(srcName)) {
+ throw new RepositoryNotFoundException(name);
}
+ final Repository db = src.getRepository();
+ db.incrementOpen();
+ return db;
});
app.addServlet(new ServletHolder(gs), "/*");
@@ -164,7 +157,7 @@ public class ProtocolErrorTest extends HttpTestCase {
pckin.readString());
assertEquals("ng refs/objects/A n/a (unpacker error)",
pckin.readString());
- assertSame(PacketLineIn.END, pckin.readString());
+ assertTrue(PacketLineIn.isEnd(pckin.readString()));
}
} finally {
c.disconnect();
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
index 017e2c7aa3..8b85bef305 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
@@ -123,9 +123,6 @@ import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
import org.eclipse.jgit.transport.http.HttpConnectionFactory;
import org.eclipse.jgit.transport.http.JDKHttpConnectionFactory;
import org.eclipse.jgit.transport.http.apache.HttpClientConnectionFactory;
-import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
-import org.eclipse.jgit.transport.resolver.UploadPackFactory;
import org.eclipse.jgit.util.HttpSupport;
import org.eclipse.jgit.util.SystemReader;
import org.hamcrest.Matchers;
@@ -190,18 +187,13 @@ public class SmartClientSmartServerTest extends HttpTestCase {
ConfigConstants.CONFIG_KEY_LOGALLREFUPDATES, true);
GitServlet gs = new GitServlet();
- gs.setUploadPackFactory(new UploadPackFactory<HttpServletRequest>() {
- @Override
- public UploadPack create(HttpServletRequest req, Repository db)
- throws ServiceNotEnabledException,
- ServiceNotAuthorizedException {
- DefaultUploadPackFactory f = new DefaultUploadPackFactory();
- UploadPack up = f.create(req, db);
- if (advertiseRefsHook != null) {
- up.setAdvertiseRefsHook(advertiseRefsHook);
- }
- return up;
+ gs.setUploadPackFactory((HttpServletRequest req, Repository db) -> {
+ DefaultUploadPackFactory f = new DefaultUploadPackFactory();
+ UploadPack up = f.create(req, db);
+ if (advertiseRefsHook != null) {
+ up.setAdvertiseRefsHook(advertiseRefsHook);
}
+ return up;
});
ServletContextHandler app = addNormalContext(gs, src, srcName);
diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
index c8b48dc197..ba38a8b656 100644
--- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.junit.http
Bundle-SymbolicName: org.eclipse.jgit.junit.http
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
@@ -22,16 +22,16 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.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="[5.3.3,5.4.0)",
- org.eclipse.jgit.http.server;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.resolver;version="[5.3.3,5.4.0)",
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.http.server;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.4.1,5.5.0)",
org.junit;version="[4.12,5.0.0)"
-Export-Package: org.eclipse.jgit.junit.http;version="5.3.3";
+Export-Package: org.eclipse.jgit.junit.http;version="5.4.1";
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
new file mode 100644
index 0000000000..0243f2f691
--- /dev/null
+++ b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+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: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml
index 9c984c0533..9bf2a2156f 100644
--- a/org.eclipse.jgit.junit.http/pom.xml
+++ b/org.eclipse.jgit.junit.http/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.http</artifactId>
@@ -62,6 +62,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -109,6 +110,48 @@
<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>
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
index 245b510fe1..7c78330828 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
@@ -54,8 +54,6 @@ import org.eclipse.jgit.errors.RepositoryNotFoundException;
import org.eclipse.jgit.http.server.GitServlet;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
/**
* Simple http server for testing http access to Git repositories.
@@ -136,17 +134,12 @@ public class SimpleHttpServer {
private ServletContextHandler smart(String path) {
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(nameOf(db)))
- throw new RepositoryNotFoundException(name);
-
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(nameOf(db))) {
+ throw new RepositoryNotFoundException(name);
}
+ db.incrementOpen();
+ return db;
});
ServletContextHandler ctx = server.addContext(path);
diff --git a/org.eclipse.jgit.junit.ssh/BUILD b/org.eclipse.jgit.junit.ssh/BUILD
index e9a04c7173..8c17cb7238 100644
--- a/org.eclipse.jgit.junit.ssh/BUILD
+++ b/org.eclipse.jgit.junit.ssh/BUILD
@@ -7,7 +7,7 @@ java_library(
resource_strip_prefix = "org.eclipse.jgit.junit.ssh/resources",
resources = glob(["resources/**"]),
deps = [
- "//lib:sshd-core",
+ "//lib:sshd-osgi",
"//lib:sshd-sftp",
# We want these deps to be provided_deps
"//org.eclipse.jgit:jgit",
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
index ed11de9997..6b443f374c 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
@@ -3,34 +3,35 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.junit.ssh
Bundle-SymbolicName: org.eclipse.jgit.junit.ssh
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.apache.sshd.common;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.config.keys;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.file.virtualfs;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.helpers;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.io;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.kex;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.keyprovider;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.session;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.buffer;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.logging;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.security;version="[2.0.0,2.1.0)",
- org.apache.sshd.server;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.auth;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.auth.gss;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.auth.keyboard;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.auth.password;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.command;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.session;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.shell;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.subsystem;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.subsystem.sftp;version="[2.0.0,2.1.0)",
- org.eclipse.jgit.annotations;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
+Import-Package: org.apache.sshd.common;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.config.keys;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.file.virtualfs;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.helpers;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.io;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.kex;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.keyprovider;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.session;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.buffer;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.logging;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.security;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.threads;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.auth;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.auth.gss;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.auth.keyboard;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.auth.password;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.command;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.session;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.shell;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.subsystem;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.subsystem.sftp;version="[2.2.0,2.3.0)",
+ org.eclipse.jgit.annotations;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.junit.ssh;version="5.3.3"
+Export-Package: org.eclipse.jgit.junit.ssh;version="5.4.1"
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
new file mode 100644
index 0000000000..62fb41b023
--- /dev/null
+++ b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+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: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml
index 0194faa74b..92fd1615c1 100644
--- a/org.eclipse.jgit.junit.ssh/pom.xml
+++ b/org.eclipse.jgit.junit.ssh/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.ssh</artifactId>
@@ -62,6 +62,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -73,7 +74,7 @@
<dependency>
<groupId>org.apache.sshd</groupId>
- <artifactId>sshd-core</artifactId>
+ <artifactId>sshd-osgi</artifactId>
<version>${apache-sshd-version}</version>
</dependency>
@@ -104,6 +105,48 @@
<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>
diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java
index f5af2e5ce1..25d952f189 100644
--- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java
+++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java
@@ -55,10 +55,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
import org.apache.sshd.common.NamedFactory;
+import org.apache.sshd.common.NamedResource;
import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.config.keys.AuthorizedKeyEntry;
import org.apache.sshd.common.config.keys.KeyUtils;
@@ -67,6 +66,8 @@ import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
import org.apache.sshd.common.session.Session;
import org.apache.sshd.common.util.buffer.Buffer;
import org.apache.sshd.common.util.security.SecurityUtils;
+import org.apache.sshd.common.util.threads.CloseableExecutorService;
+import org.apache.sshd.common.util.threads.ThreadUtils;
import org.apache.sshd.server.ServerAuthenticationManager;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.auth.UserAuth;
@@ -110,8 +111,8 @@ public class SshTestGitServer {
@NonNull
protected PublicKey testKey;
- private final ExecutorService executorService = Executors
- .newFixedThreadPool(2);
+ private final CloseableExecutorService executorService = ThreadUtils
+ .newFixedThreadPool("SshTestGitServerPool", 2);
/**
* Creates a ssh git <em>test</em> server. It serves one single repository,
@@ -138,11 +139,12 @@ public class SshTestGitServer {
server = SshServer.setUpDefaultServer();
// Set host key
try (ByteArrayInputStream in = new ByteArrayInputStream(hostKey)) {
- hostKeys.add(SecurityUtils.loadKeyPairIdentity("", in, null));
+ SecurityUtils.loadKeyPairIdentities(null, null, in, null)
+ .forEach((k) -> hostKeys.add(k));
} catch (IOException | GeneralSecurityException e) {
// Ignore.
}
- server.setKeyPairProvider(() -> hostKeys);
+ server.setKeyPairProvider((session) -> hostKeys);
configureAuthentication();
@@ -276,8 +278,10 @@ public class SshTestGitServer {
public void addHostKey(@NonNull Path key, boolean inFront)
throws IOException, GeneralSecurityException {
try (InputStream in = Files.newInputStream(key)) {
- KeyPair pair = SecurityUtils.loadKeyPairIdentity(key.toString(), in,
- null);
+ KeyPair pair = SecurityUtils
+ .loadKeyPairIdentities(null,
+ NamedResource.ofName(key.toString()), in, null)
+ .iterator().next();
if (inFront) {
hostKeys.add(0, pair);
} else {
@@ -335,14 +339,14 @@ public class SshTestGitServer {
public void setTestUserPublicKey(Path key)
throws IOException, GeneralSecurityException {
this.testKey = AuthorizedKeyEntry.readAuthorizedKeys(key).get(0)
- .resolvePublicKey(PublicKeyEntryResolver.IGNORING);
+ .resolvePublicKey(null, PublicKeyEntryResolver.IGNORING);
}
private class GitUploadPackCommand extends AbstractCommandSupport {
protected GitUploadPackCommand(String command,
- ExecutorService executorService) {
- super(command, executorService, false);
+ CloseableExecutorService executorService) {
+ super(command, ThreadUtils.noClose(executorService));
}
@Override
@@ -370,8 +374,8 @@ public class SshTestGitServer {
private class GitReceivePackCommand extends AbstractCommandSupport {
protected GitReceivePackCommand(String command,
- ExecutorService executorService) {
- super(command, executorService, false);
+ CloseableExecutorService executorService) {
+ super(command, ThreadUtils.noClose(executorService));
}
@Override
diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
index a104bc1218..637fad0180 100644
--- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
@@ -3,34 +3,34 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.junit
Bundle-SymbolicName: org.eclipse.jgit.junit
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.annotations;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.api;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.api.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.dircache;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.merge;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="5.3.3",
- org.eclipse.jgit.treewalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util.io;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util.time;version="[5.3.3,5.4.0)",
+Import-Package: org.eclipse.jgit.annotations;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.api;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.api.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.dircache;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.merge;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="5.4.1",
+ org.eclipse.jgit.treewalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util.io;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util.time;version="[5.4.1,5.5.0)",
org.junit;version="[4.12,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)",
org.junit.runners.model;version="[4.12,5.0.0)",
org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.junit;version="5.3.3";
+Export-Package: org.eclipse.jgit.junit;version="5.4.1";
uses:="org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
@@ -43,4 +43,4 @@ Export-Package: org.eclipse.jgit.junit;version="5.3.3";
org.junit.runners.model,
org.junit.runner,
org.eclipse.jgit.util.time",
- org.eclipse.jgit.junit.time;version="5.3.3";uses:="org.eclipse.jgit.util.time"
+ org.eclipse.jgit.junit.time;version="5.4.1";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
new file mode 100644
index 0000000000..f244ece298
--- /dev/null
+++ b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.jgit.junit - Sources
+Bundle-SymbolicName: org.eclipse.jgit.junit.source
+Bundle-Vendor: Eclipse.org - JGit
+Bundle-Version: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml
index e67a9cdc3d..392fd5142d 100644
--- a/org.eclipse.jgit.junit/pom.xml
+++ b/org.eclipse.jgit.junit/pom.xml
@@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit</artifactId>
@@ -64,6 +64,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -94,6 +95,48 @@
<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>
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
index 3b7cdde496..5c2cd6ac65 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
@@ -373,7 +373,9 @@ public abstract class LocalDiskRepositoryTestCase {
/**
* Creates a new empty bare repository.
*
- * @return the newly created repository, opened for access
+ * @return the newly created bare repository, opened for access. The
+ * repository will not be closed in {@link #tearDown()}; the caller
+ * is responsible for closing it.
* @throws IOException
* the repository could not be created in the temporary area
*/
@@ -384,7 +386,9 @@ public abstract class LocalDiskRepositoryTestCase {
/**
* Creates a new empty repository within a new empty working directory.
*
- * @return the newly created repository, opened for access
+ * @return the newly created repository, opened for access. The repository
+ * will not be closed in {@link #tearDown()}; the caller is
+ * responsible for closing it.
* @throws IOException
* the repository could not be created in the temporary area
*/
@@ -398,7 +402,9 @@ public abstract class LocalDiskRepositoryTestCase {
* @param bare
* true to create a bare repository; false to make a repository
* within its working directory
- * @return the newly created repository, opened for access
+ * @return the newly created repository, opened for access. The repository
+ * will not be closed in {@link #tearDown()}; the caller is
+ * responsible for closing it.
* @throws IOException
* the repository could not be created in the temporary area
* @since 5.3
@@ -555,13 +561,7 @@ public abstract class LocalDiskRepositoryTestCase {
try {
write(f, body);
return f;
- } catch (Error e) {
- f.delete();
- throw e;
- } catch (RuntimeException e) {
- f.delete();
- throw e;
- } catch (IOException e) {
+ } catch (Error | RuntimeException | IOException e) {
f.delete();
throw e;
}
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
index 123fdb305f..13c2932282 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
@@ -220,22 +220,20 @@ public class MockSystemReader extends SystemReader {
/** {@inheritDoc} */
@Override
public MonotonicClock getClock() {
- return new MonotonicClock() {
- @Override
- public ProposedTimestamp propose() {
- long t = getCurrentTime();
- return new ProposedTimestamp() {
- @Override
- public long read(TimeUnit unit) {
- return unit.convert(t, TimeUnit.MILLISECONDS);
- }
-
- @Override
- public void blockUntil(Duration maxWait) {
- // Do not wait.
- }
- };
- }
+ return () -> {
+ long t = getCurrentTime();
+ return new ProposedTimestamp() {
+
+ @Override
+ public long read(TimeUnit unit) {
+ return unit.convert(t, TimeUnit.MILLISECONDS);
+ }
+
+ @Override
+ public void blockUntil(Duration maxWait) {
+ // Do not wait.
+ }
+ };
};
}
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
index 5aacbbadec..23f49a4752 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
@@ -496,9 +496,7 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
git.branchCreate().setName(branch).setStartPoint(commit).call();
return commit;
- } catch (IOException e) {
- throw new RuntimeException(e);
- } catch (GitAPIException e) {
+ } catch (IOException | GitAPIException e) {
throw new RuntimeException(e);
}
}
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index 02ffe4f409..e89cf0fb83 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -728,7 +728,7 @@ public class TestRepository<R extends Repository> implements AutoCloseable {
ThreeWayMerger merger = MergeStrategy.RECURSIVE.newMerger(db, true);
merger.setBase(parent.getTree());
if (merger.merge(head, commit)) {
- if (AnyObjectId.equals(head.getTree(), merger.getResultTreeId()))
+ if (AnyObjectId.isEqual(head.getTree(), merger.getResultTreeId()))
return null;
tick(1);
org.eclipse.jgit.lib.CommitBuilder b =
@@ -1368,7 +1368,7 @@ public class TestRepository<R extends Repository> implements AutoCloseable {
firstParentId = parents.get(0);
ObjectId cid;
- if (changeId.equals(""))
+ if (changeId.isEmpty())
cid = ChangeIdUtil.computeChangeId(c.getTreeId(), firstParentId,
c.getAuthor(), c.getCommitter(), message);
else
diff --git a/org.eclipse.jgit.lfs.server.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.lfs.server.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2174e4fd5b
--- /dev/null
+++ b/org.eclipse.jgit.lfs.server.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
index 4bef1de931..d5bf494448 100644
--- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.lfs.server.test
Bundle-SymbolicName: org.eclipse.jgit.lfs.server.test
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -28,24 +28,24 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.api.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit.http;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.server;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.server.fs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.test;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+ org.eclipse.jgit.api;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.api.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.server;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.test;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)",
diff --git a/org.eclipse.jgit.lfs.server.test/pom.xml b/org.eclipse.jgit.lfs.server.test/pom.xml
index 44f166b2c7..7194449b09 100644
--- a/org.eclipse.jgit.lfs.server.test/pom.xml
+++ b/org.eclipse.jgit.lfs.server.test/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
@@ -137,7 +137,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory} -Xmx300m</argLine>
+ <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory} -Xmx512m</argLine>
</configuration>
</plugin>
</plugins>
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
index 09f8d0aeaf..2334ec37af 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
@@ -44,6 +44,7 @@ package org.eclipse.jgit.lfs.server.fs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -53,10 +54,10 @@ import java.nio.file.Paths;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
-import java.util.concurrent.Callable;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.lfs.lib.AnyLongObjectId;
@@ -123,14 +124,12 @@ public class UploadTest extends LfsServerTest {
ExecutorService e = Executors.newFixedThreadPool(count);
try {
for (Path p : paths) {
- e.submit(new Callable<Void>() {
- @Override
- public Void call() throws Exception {
- barrier.await();
- putContent(p);
- return null;
- }
+ Future<Object> result = e.submit(() -> {
+ barrier.await();
+ putContent(p);
+ return null;
});
+ assertNotNull(result);
}
} finally {
e.shutdown();
diff --git a/org.eclipse.jgit.lfs.server/.settings/.api_filters b/org.eclipse.jgit.lfs.server/.settings/.api_filters
deleted file mode 100644
index 72beb7cdfa..0000000000
--- a/org.eclipse.jgit.lfs.server/.settings/.api_filters
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.jgit.lfs.server" version="2">
- <resource path="META-INF/MANIFEST.MF">
- <filter id="924844039">
- <message_arguments>
- <message_argument value="5.3.3"/>
- <message_argument value="5.3.0"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java" type="org.eclipse.jgit.lfs.server.fs.ObjectUploadListener">
- <filter id="1142947843">
- <message_arguments>
- <message_argument value="5.1.7"/>
- <message_argument value="setCallback(ObjectUploadListener.Callback)"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java" type="org.eclipse.jgit.lfs.server.fs.ObjectUploadListener$Callback">
- <filter id="1142947843">
- <message_arguments>
- <message_argument value="5.1.7"/>
- <message_argument value="Callback"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
index 0df2eeaf25..ab14a1682b 100644
--- a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
@@ -3,19 +3,19 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.lfs.server
Bundle-SymbolicName: org.eclipse.jgit.lfs.server
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
-Export-Package: org.eclipse.jgit.lfs.server;version="5.3.3";
+Export-Package: org.eclipse.jgit.lfs.server;version="5.4.1";
uses:="javax.servlet.http,
org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.fs;version="5.3.3";
+ org.eclipse.jgit.lfs.server.fs;version="5.4.1";
uses:="javax.servlet,
javax.servlet.http,
org.eclipse.jgit.lfs.server,
org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.internal;version="5.3.3";x-internal:=true,
- org.eclipse.jgit.lfs.server.s3;version="5.3.3";
+ org.eclipse.jgit.lfs.server.internal;version="5.4.1";x-internal:=true,
+ org.eclipse.jgit.lfs.server.s3;version="5.4.1";
uses:="org.eclipse.jgit.lfs.server,
org.eclipse.jgit.lfs.lib"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -25,15 +25,15 @@ Import-Package: com.google.gson;version="[2.8.0,3.0.0)",
javax.servlet.http;version="[3.1.0,4.0.0)",
org.apache.http;version="[4.3.0,5.0.0)",
org.apache.http.client;version="[4.3.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.internal;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+ org.eclipse.jgit.annotations;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.internal;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.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
new file mode 100644
index 0000000000..abf1dd223b
--- /dev/null
+++ b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+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: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml
index 729665c769..8a954bb7c1 100644
--- a/org.eclipse.jgit.lfs.server/pom.xml
+++ b/org.eclipse.jgit.lfs.server/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.server</artifactId>
@@ -62,6 +62,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -114,6 +115,28 @@
<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>
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/TransferHandler.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/TransferHandler.java
index 4fea92e111..6c36661c3e 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/TransferHandler.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/TransferHandler.java
@@ -84,7 +84,7 @@ abstract class TransferHandler {
@Override
Body process() throws IOException {
Response.Body body = new Response.Body();
- if (objects.size() > 0) {
+ if (!objects.isEmpty()) {
body.objects = new ArrayList<>();
for (LfsObject o : objects) {
addObjectInfo(body, o);
@@ -122,7 +122,7 @@ abstract class TransferHandler {
@Override
Body process() throws IOException {
Response.Body body = new Response.Body();
- if (objects.size() > 0) {
+ if (!objects.isEmpty()) {
body.objects = new ArrayList<>();
for (LfsObject o : objects) {
addObjectInfo(body, o);
diff --git a/org.eclipse.jgit.lfs.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.lfs.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2174e4fd5b
--- /dev/null
+++ b/org.eclipse.jgit.lfs.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
index 64d7c05752..a4f55a61b9 100644
--- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
@@ -3,23 +3,22 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.lfs.test
Bundle-SymbolicName: org.eclipse.jgit.lfs.test
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.internal.storage.dfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+Import-Package: org.eclipse.jgit.internal.storage.dfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)",
org.junit.runners;version="[4.12,5.0.0)"
-Export-Package: org.eclipse.jgit.lfs.test;version="5.3.3";x-friends:="org.eclipse.jgit.lfs.server.test"
-
+Export-Package: org.eclipse.jgit.lfs.test;version="5.4.1";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 7138969827..ee74f0ec93 100644
--- a/org.eclipse.jgit.lfs.test/pom.xml
+++ b/org.eclipse.jgit.lfs.test/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.test</artifactId>
@@ -111,7 +111,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory} -Xmx300m</argLine>
+ <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory} -Xmx512m</argLine>
</configuration>
</plugin>
</plugins>
diff --git a/org.eclipse.jgit.lfs/.settings/.api_filters b/org.eclipse.jgit.lfs/.settings/.api_filters
index 371f35376d..5b8ece617a 100644
--- a/org.eclipse.jgit.lfs/.settings/.api_filters
+++ b/org.eclipse.jgit.lfs/.settings/.api_filters
@@ -3,8 +3,8 @@
<resource path="META-INF/MANIFEST.MF">
<filter id="924844039">
<message_arguments>
- <message_argument value="5.3.3"/>
- <message_argument value="5.3.0"/>
+ <message_argument value="5.4.1"/>
+ <message_argument value="5.4.0"/>
</message_arguments>
</filter>
</resource>
diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
index a13f990df7..ad36094f48 100644
--- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
@@ -3,33 +3,33 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.lfs
Bundle-SymbolicName: org.eclipse.jgit.lfs
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
-Export-Package: org.eclipse.jgit.lfs;version="5.3.3",
- org.eclipse.jgit.lfs.errors;version="5.3.3",
- org.eclipse.jgit.lfs.internal;version="5.3.3";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
- org.eclipse.jgit.lfs.lib;version="5.3.3"
+Export-Package: org.eclipse.jgit.lfs;version="5.4.1",
+ org.eclipse.jgit.lfs.errors;version="5.4.1",
+ org.eclipse.jgit.lfs.internal;version="5.4.1";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
+ org.eclipse.jgit.lfs.lib;version="5.4.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.google.gson;version="[2.8.2,3.0.0)",
com.google.gson.stream;version="[2.8.2,3.0.0)",
org.apache.http.impl.client;version="[4.2.6,5.0.0)",
org.apache.http.impl.conn;version="[4.2.6,5.0.0)",
- org.eclipse.jgit.annotations;version="[5.3.3,5.4.0)";resolution:=optional,
- org.eclipse.jgit.api.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.attributes;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.diff;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.hooks;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.pack;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util.io;version="[5.3.3,5.4.0)"
+ org.eclipse.jgit.annotations;version="[5.4.1,5.5.0)";resolution:=optional,
+ org.eclipse.jgit.api.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.attributes;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.diff;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.hooks;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.pack;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util.io;version="[5.4.1,5.5.0)"
diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
new file mode 100644
index 0000000000..517ec19120
--- /dev/null
+++ b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.jgit.lfs - Sources
+Bundle-SymbolicName: org.eclipse.jgit.lfs.source
+Bundle-Vendor: Eclipse.org - JGit
+Bundle-Version: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index b7d739febd..65532f1925 100644
--- a/org.eclipse.jgit.lfs/pom.xml
+++ b/org.eclipse.jgit.lfs/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs</artifactId>
@@ -62,6 +62,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -94,6 +95,28 @@
<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>
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
index 217e46f48e..80da802db4 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
@@ -78,14 +78,7 @@ public class CleanFilter extends FilterCommand {
* The factory is responsible for creating instances of
* {@link org.eclipse.jgit.lfs.CleanFilter}
*/
- public final static FilterCommandFactory FACTORY = new FilterCommandFactory() {
-
- @Override
- public FilterCommand create(Repository db, InputStream in,
- OutputStream out) throws IOException {
- return new CleanFilter(db, in, out);
- }
- };
+ public final static FilterCommandFactory FACTORY = CleanFilter::new;
/**
* Registers this filter by calling
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
index 7bacf49269..6b30da343e 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
@@ -92,13 +92,7 @@ public class SmudgeFilter extends FilterCommand {
* The factory is responsible for creating instances of
* {@link org.eclipse.jgit.lfs.SmudgeFilter}
*/
- public final static FilterCommandFactory FACTORY = new FilterCommandFactory() {
- @Override
- public FilterCommand create(Repository db, InputStream in,
- OutputStream out) throws IOException {
- return new SmudgeFilter(db, in, out);
- }
- };
+ public final static FilterCommandFactory FACTORY = SmudgeFilter::new;
/**
* Register this filter in JGit
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
index bdd1b39c0d..5109d9bbba 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
@@ -170,7 +170,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
r |= RawParseUtils.parseHexInt4(bs[p++]);
n++;
}
- return r << (16 - n) * 4;
+ return r << ((16 - n) * 4);
}
static long mask(int nibbles, long word, long v) {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
index 0788922639..b095d20e63 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
@@ -50,6 +50,7 @@ import java.nio.ByteBuffer;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.util.NB;
+import org.eclipse.jgit.util.References;
/**
* A (possibly mutable) SHA-256 abstraction.
@@ -73,11 +74,31 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @param secondObjectId
* the second identifier to compare. Must not be null.
* @return true if the two identifiers are the same.
+ * @deprecated use {@link #isEqual(AnyLongObjectId, AnyLongObjectId)}
+ * instead.
*/
+ @Deprecated
+ @SuppressWarnings("AmbiguousMethodReference")
public static boolean equals(final AnyLongObjectId firstObjectId,
final AnyLongObjectId secondObjectId) {
- if (firstObjectId == secondObjectId)
+ return isEqual(firstObjectId, secondObjectId);
+ }
+
+ /**
+ * Compare two object identifier byte sequences for equality.
+ *
+ * @param firstObjectId
+ * the first identifier to compare. Must not be null.
+ * @param secondObjectId
+ * the second identifier to compare. Must not be null.
+ * @return true if the two identifiers are the same.
+ * @since 5.4
+ */
+ public static boolean isEqual(final AnyLongObjectId firstObjectId,
+ final AnyLongObjectId secondObjectId) {
+ if (References.isSameObject(firstObjectId, secondObjectId)) {
return true;
+ }
// We test word 2 first as odds are someone already used our
// word 1 as a hash code, and applying that came up with these
@@ -274,6 +295,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* the other id to compare to. May be null.
* @return true only if both LongObjectIds have identical bits.
*/
+ @SuppressWarnings({ "NonOverridingEquals", "AmbiguousMethodReference" })
public final boolean equals(AnyLongObjectId other) {
return other != null ? equals(this, other) : false;
}
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 2551f34cb2..3a4c04875e 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="5.3.3.qualifier"
+ version="5.4.1.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 68cb1cdc91..33d8567f4e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-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 e85a302355..91264db593 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="5.3.3.qualifier"
+ version="5.4.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import plugin="org.eclipse.jgit"/>
+ <import plugin="org.eclipse.jgit" version="5.4.1" 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 d9a7bb4280..cdf1cbd516 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
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-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 3b42f10e3a..52faeeca55 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="5.3.3.qualifier"
+ version="5.4.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -24,6 +24,7 @@
<requires>
<import plugin="com.jcraft.jsch"/>
+ <import plugin="org.eclipse.jgit" version="5.4.1" match="equivalent"/>
</requires>
<plugin
@@ -62,7 +63,7 @@
unpack="false"/>
<plugin
- id="org.apache.sshd.core"
+ id="org.apache.sshd.osgi"
download-size="0"
install-size="0"
version="0.0.0"
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 817e3b6d52..79a2e84cb5 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
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-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 db8168726d..39db64a06f 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="5.3.3.qualifier"
+ version="5.4.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import plugin="org.eclipse.jgit"/>
+ <import feature="org.eclipse.jgit" version="5.4.1" 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 5e9fddb397..2825df61ad 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
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-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 692af1e2c8..14bfd0138e 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="5.3.3.qualifier"
+ version="5.4.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -30,10 +30,14 @@
id="org.eclipse.jgit.lfs"
version="0.0.0"/>
+ <includes
+ id="org.eclipse.jgit.ssh.apache"
+ version="0.0.0"/>
+
<requires>
- <import feature="org.eclipse.jgit" version="5.3.3" match="equivalent"/>
- <import feature="org.eclipse.jgit.lfs" version="5.3.3" match="equivalent"/>
- <import feature="org.eclipse.jgit.ssh.apache" version="5.3.3" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="5.4.1" match="equivalent"/>
+ <import feature="org.eclipse.jgit.lfs" version="5.4.1" match="equivalent"/>
+ <import feature="org.eclipse.jgit.ssh.apache" version="5.4.1" 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 bffe350e2f..39772c7645 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
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.gitignore b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.gitignore
deleted file mode 100644
index eb5a316cbd..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.project
deleted file mode 100644
index 5f57483873..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jgit.pgm.source.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 6f96ce809a..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 18 23:33:45 CEST 2010
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 1a32dba177..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.core.runtime.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 18 23:33:45 CEST 2010
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index 823c0f56ae..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#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.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644
index 2fca432276..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#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.packaging/org.eclipse.jgit.pgm.source.feature/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/build.properties
deleted file mode 100644
index b4a8dde9e5..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- edl-v10.html,\
- feature.properties,\
- license.html
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/edl-v10.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/edl-v10.html
deleted file mode 100644
index 8caddac569..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/edl-v10.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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;
- }
-</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>
-
-</body>
-
-</html>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.properties
deleted file mode 100644
index 73701b291a..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.properties
+++ /dev/null
@@ -1,178 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-###############################################################################
-
-featureName=Java implementation of Git - Command Line Interface - Source Code
-providerName=Eclipse JGit
-
-updateSiteName=Eclipse JGit Update Site
-
-# description property - text of the "Feature Description"
-description=\
-Do not install in your IDE: this feature is meant to provision Target Platforms.\n\
-Source code for the support for PDE's JUnit runner for a Target Platform\n
-################ end of description property ##################################
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2005, 2012 Shawn Pearce, Robin Rosenberg, et.al.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Distribution License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/org/documents/edl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-\n\
-November 22, 2017\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\
-AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\
-THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\
-BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\
-APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\
-MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public License\n\
-Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\
-available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\
-"Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code, documentation\n\
-and other files maintained in the Eclipse Foundation source code repository\n\
-("Repository") in software modules ("Modules") and made available as\n\
-downloadable archives ("Downloads").\n\
-\n\
-- Content may be structured and packaged into modules to facilitate\n\
- delivering, extending, and upgrading the Content. Typical modules may\n\
- include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\
- features ("Features").\n\
-- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\
- (Java™ ARchive) in a directory named "plugins".\n\
-- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\
- associated material. Each Feature may be packaged as a sub-directory in a\n\
- directory named "features". Within a Feature, files named "feature.xml" may\n\
- contain a list of the names and version numbers of the Plug-ins and/or\n\
- Fragments associated with that Feature.\n\
-- Features may also include other Features ("Included Features"). Within a\n\
- Feature, files named "feature.xml" may contain a list of the names and\n\
- version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be contained in\n\
-files named "about.html" ("Abouts"). The terms and conditions governing Features\n\
-and Included Features should be contained in files named "license.html"\n\
-("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\
-directory of a Download or Module including, but not limited to the following\n\
-locations:\n\
-\n\
-- The top-level (root) directory\n\
-- Plug-in and Fragment directories\n\
-- Inside Plug-ins and Fragments packaged as JARs\n\
-- Sub-directories of the directory named "src" of certain Plug-ins\n\
-- Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using\n\
-the Provisioning Technology (as defined below), you must agree to a license\n\
-("Feature Update License") during the installation process. If the Feature\n\
-contains Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform you\n\
-where you can locate them. Feature Update Licenses may be found in the "license"\n\
-property of files named "feature.properties" found within a Feature. Such\n\
-Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your use of\n\
-the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\
-OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
-- Eclipse Public License Version 1.0 (available at\n\
- http://www.eclipse.org/legal/epl-v10.html)\n\
-- Eclipse Distribution License Version 1.0 (available at\n\
- http://www.eclipse.org/licenses/edl-v1.0.html)\n\
-- Common Public License Version 1.0 (available at\n\
- http://www.eclipse.org/legal/cpl-v10.html)\n\
-- Apache Software License 1.1 (available at\n\
- http://www.apache.org/licenses/LICENSE)\n\
-- Apache Software License 2.0 (available at\n\
- http://www.apache.org/licenses/LICENSE-2.0)\n\
-- Mozilla Public License Version 1.1 (available at\n\
- http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\
-USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\
-provided, please contact the Eclipse Foundation to determine what terms and\n\
-conditions govern that particular Content.\n\
-\n\
-Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which\n\
-include, but are not limited to, p2 and the Eclipse Update Manager\n\
-("Provisioning Technology") for the purpose of allowing users to install\n\
-software, documentation, information and/or other materials (collectively\n\
-"Installable Software"). This capability is provided with the intent of allowing\n\
-such users to install, extend and update Eclipse-based products. Information\n\
-about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install\n\
-Installable Software. You shall be responsible for enabling the applicable\n\
-license agreements relating to the Installable Software to be presented to, and\n\
-accepted by, the users of the Provisioning Technology in accordance with the\n\
-Specification. By using Provisioning Technology in such a manner and making it\n\
-available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the\n\
-following:\n\
-\n\
-1. A series of actions may occur ("Provisioning Process") in which a user may\n\
- execute the Provisioning Technology on a machine ("Target Machine") with the\n\
- intent of installing, extending or updating the functionality of an\n\
- Eclipse-based product.\n\
-2. During the Provisioning Process, the Provisioning Technology may cause third\n\
- party Installable Software or a portion thereof to be accessed and copied to\n\
- the Target Machine.\n\
-3. Pursuant to the Specification, you will provide to the user the terms and\n\
- conditions that govern the use of the Installable Software ("Installable\n\
- Software Agreement") and such Installable Software Agreement shall be\n\
- accessed from the Target Machine in accordance with the Specification. Such\n\
- Installable Software Agreement must inform the user of the terms and\n\
- conditions that govern the Installable Software and must solicit acceptance\n\
- by the end user in the manner prescribed in such Installable\n\
- Software Agreement. Upon such indication of agreement by the user, the\n\
- provisioning Technology will complete installation of the\n\
- Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are currently\n\
-may have restrictions on the import, possession, and use, and/or re-export to\n\
-another country, of encryption software. BEFORE using any encryption software,\n\
-please check the country's laws, regulations and policies concerning the import,\n\
-possession, or use, and re-export of encryption software, to see if this is\n\
-permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\
-United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml
deleted file mode 100644
index 075aea19a0..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.jgit.pgm.source"
- label="%featureName"
- version="5.3.3.qualifier"
- provider-name="%providerName">
-
- <description url="http://www.eclipse.org/jgit/">
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
- </url>
-
- <plugin
- id="org.eclipse.jgit.pgm.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-</feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/license.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/license.html
deleted file mode 100644
index 008b8018db..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/license.html
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
- <h2>Eclipse Foundation Software User Agreement</h2>
- <p>November 22, 2017</p>
-
- <h3>Usage Of Content</h3>
-
- <p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
- INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY
- THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
- BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS
- GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY
- APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
- BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
- AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
- AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
- USE THE CONTENT.</p>
-
- <h3>Applicable Licenses</h3>
-
- <p>
- Unless otherwise indicated, all Content made available by the Eclipse
- Foundation is provided to you under the terms and conditions of the
- Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the
- EPL is provided with this Content and is also available at <a
- href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.
- </p>
-
- <p>Content includes, but is not limited to, source code, object
- code, documentation and other files maintained in the Eclipse
- Foundation source code repository (&quot;Repository&quot;) in software
- modules (&quot;Modules&quot;) and made available as downloadable
- archives (&quot;Downloads&quot;).</p>
-
- <ul>
- <li>Content may be structured and packaged into modules to
- facilitate delivering, extending, and upgrading the Content. Typical
- modules may include plug-ins (&quot;Plug-ins&quot;), plug-in
- fragments (&quot;Fragments&quot;), and features
- (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory
- or JAR (Java&trade; ARchive) in a directory named
- &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or
- Fragments and associated material. Each Feature may be packaged as a
- sub-directory in a directory named &quot;features&quot;. Within a
- Feature, files named &quot;feature.xml&quot; may contain a list of
- the names and version numbers of the Plug-ins and/or Fragments
- associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included
- Features&quot;). Within a Feature, files named
- &quot;feature.xml&quot; may contain a list of the names and version
- numbers of Included Features.</li>
- </ul>
-
- <p>The terms and conditions governing Plug-ins and Fragments should
- be contained in files named &quot;about.html&quot;
- (&quot;Abouts&quot;). The terms and conditions governing Features and
- Included Features should be contained in files named
- &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and
- Feature Licenses may be located in any directory of a Download or
- Module including, but not limited to the following locations:</p>
-
- <ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of
- certain Plug-ins</li>
- <li>Feature directories</li>
- </ul>
-
- <p>Note: if a Feature made available by the Eclipse Foundation is
- installed using the Provisioning Technology (as defined below), you
- must agree to a license (&quot;Feature Update License&quot;) during
- the installation process. If the Feature contains Included Features,
- the Feature Update License should either provide you with the terms
- and conditions governing the Included Features or inform you where you
- can locate them. Feature Update Licenses may be found in the
- &quot;license&quot; property of files named
- &quot;feature.properties&quot; found within a Feature. Such Abouts,
- Feature Licenses, and Feature Update Licenses contain the terms and
- conditions (or references to such terms and conditions) that govern
- your use of the associated Content in that directory.</p>
-
- <p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY
- REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
- CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT
- ARE NOT LIMITED TO):</p>
-
- <ul>
- <li>Eclipse Public License Version 1.0 (available at <a
- href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>)
- </li>
- <li>Eclipse Distribution License Version 1.0 (available at <a
- href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)
- </li>
- <li>Common Public License Version 1.0 (available at <a
- href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)
- </li>
- <li>Apache Software License 1.1 (available at <a
- href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)
- </li>
- <li>Apache Software License 2.0 (available at <a
- href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)
- </li>
- <li>Mozilla Public License Version 1.1 (available at <a
- href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)
- </li>
- </ul>
-
- <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
- CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
- or Feature Update License is provided, please contact the Eclipse
- Foundation to determine what terms and conditions govern that
- particular Content.</p>
-
-
- <h3>Use of Provisioning Technology</h3>
-
- <p>
- The Eclipse Foundation makes available provisioning software, examples
- of which include, but are not limited to, p2 and the Eclipse Update
- Manager (&quot;Provisioning Technology&quot;) for the purpose of
- allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This
- capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about
- packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).
- </p>
-
- <p>You may use Provisioning Technology to allow other parties to
- install Installable Software. You shall be responsible for enabling
- the applicable license agreements relating to the Installable Software
- to be presented to, and accepted by, the users of the Provisioning
- Technology in accordance with the Specification. By using Provisioning
- Technology in such a manner and making it available in accordance with
- the Specification, you further acknowledge your agreement to, and the
- acquisition of all necessary rights to permit the following:</p>
-
- <ol>
- <li>A series of actions may occur (&quot;Provisioning
- Process&quot;) in which a user may execute the Provisioning
- Technology on a machine (&quot;Target Machine&quot;) with the intent
- of installing, extending or updating the functionality of an
- Eclipse-based product.</li>
- <li>During the Provisioning Process, the Provisioning Technology
- may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user
- the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such
- Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable
- Software Agreement must inform the user of the terms and conditions
- that govern the Installable Software and must solicit acceptance by
- the end user in the manner prescribed in such Installable Software
- Agreement. Upon such indication of agreement by the user, the
- provisioning Technology will complete installation of the Installable
- Software.</li>
- </ol>
-
- <h3>Cryptography</h3>
-
- <p>Content may contain encryption software. The country in which
- you are currently may have restrictions on the import, possession, and
- use, and/or re-export to another country, of encryption software.
- BEFORE using any encryption software, please check the country's laws,
- regulations and policies concerning the import, possession, or use,
- and re-export of encryption software, to see if this is permitted.</p>
-
- <p>
- <small>Java and all Java-based trademarks are trademarks of
- Oracle Corporation in the United States, other countries, or both.</small>
- </p>
-</body>
-</html>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml
deleted file mode 100644
index 605a23a9fc..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2012, Matthias Sohn <matthias.sohn@sap.com>
- and other copyright owners as documented in the project's IP log.
-
- This program and the accompanying materials are made available
- under the terms of the Eclipse Distribution License v1.0 which
- accompanies this distribution, is reproduced below, and is
- available at http://www.eclipse.org/org/documents/edl-v10.php
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, are permitted provided that the following
- conditions are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- - Neither the name of the Eclipse Foundation, Inc. nor the
- names of its contributors may be used to endorse or promote
- products derived from this software without specific prior
- written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<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>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
- </parent>
-
- <groupId>org.eclipse.jgit.feature</groupId>
- <artifactId>org.eclipse.jgit.pgm.source</artifactId>
- <packaging>eclipse-feature</packaging>
-
- <name>JGit Command Line Interface Source Feature</name>
-
-</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 995bd21b18..e2aeee38c6 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
@@ -15,24 +15,32 @@
<feature url="features/org.eclipse.jgit.source_0.0.0.qualifier.jar" id="org.eclipse.jgit.source" version="0.0.0" patch="true">
<category name="JGit"/>
</feature>
- <feature url="features/org.eclipse.jgit.pgm.source_0.0.0.qualifier.jar" id="org.eclipse.jgit.pgm.source" version="0.0.0" patch="true">
- <category name="JGit"/>
- </feature>
- <feature url="features/org.eclipse.jgit.ssh.apache.source_0.0.0.qualifier.jar" id="org.eclipse.jgit.ssh.apache.source" version="0.0.0" patch="true">
- <category name="JGit"/>
- </feature>
<feature url="features/org.eclipse.jgit.junit_0.0.0.qualifier.jar" id="org.eclipse.jgit.junit" version="0.0.0" patch="true">
<category name="JGit"/>
</feature>
<feature url="features/org.eclipse.jgit.http.apache_0.0.0.qualifier.jar" id="org.eclipse.jgit.http.apache" version="0.0.0" patch="true">
<category name="JGit"/>
</feature>
- <feature url="features/org.eclipse.jgit.lfs_0.0.0.qualifier.jar" id="org.eclipse.jgit.lfs" version="0.0.0">
+ <feature url="features/org.eclipse.jgit.lfs_0.0.0.qualifier.jar" id="org.eclipse.jgit.lfs" version="0.0.0" patch="true">
<category name="JGit"/>
</feature>
+ <bundle id="org.eclipse.jgit.ant" version="0.0.0">
+ <category name="JGit-additional-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jgit.archive" version="0.0.0">
+ <category name="JGit-additional-bundles"/>
+ </bundle>
+ <bundle id="org.eclipse.jgit.ui" version="0.0.0">
+ <category name="JGit-additional-bundles"/>
+ </bundle>
<category-def name="JGit" label="Java implementation of Git">
<description>
Java implementation of Git
</description>
</category-def>
+ <category-def name="JGit-additional-bundles" label="Java implementation of Git - additional bundles">
+ <description>
+ Java implementation of Git - additional bundles
+ </description>
+ </category-def>
</site>
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 dd9dba7cbc..dc2ad15ec8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.repository</artifactId>
@@ -64,24 +64,24 @@
<artifactId>org.eclipse.jgit</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit.http.apache</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit.lfs</artifactId>
- <version>${project.version}</version>
- </dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ant</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit.lfs.server</artifactId>
+ <artifactId>org.eclipse.jgit.archive</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit.pgm</artifactId>
+ <artifactId>org.eclipse.jgit.http.apache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.http.server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -101,7 +101,17 @@
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit.http.server</artifactId>
+ <artifactId>org.eclipse.jgit.lfs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.lfs.server</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.pgm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -109,5 +119,10 @@
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
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 68c5efa974..8e8fd8a18a 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,19 +2,19 @@
<feature
id="org.eclipse.jgit.source"
label="%featureName"
- version="5.3.3.qualifier"
+ version="5.4.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
- %description
+ %description
</description>
<copyright>
- %copyright
+ %copyright
</copyright>
<license url="%licenseURL">
- %license
+ %license
</license>
<url>
@@ -22,10 +22,99 @@
<discovery label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
</url>
+ <requires>
+ <import feature="org.eclipse.jgit" version="5.4.1" match="equivalent"/>
+ </requires>
+
<plugin
id="org.eclipse.jgit.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.ant.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.archive.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.http.apache.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.http.server.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.junit.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.junit.http.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.junit.ssh.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.lfs.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.lfs.server.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.pgm.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.ssh.apache.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jgit.ui.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
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 d260f837bf..813271028b 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
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
@@ -59,4 +59,12 @@
<name>JGit Source Feature</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jgit.feature</groupId>
+ <artifactId>org.eclipse.jgit</artifactId>
+ <version>5.4.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
</project>
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 7a957df994..b7420dc47c 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="5.3.3.qualifier"
+ version="5.4.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import plugin="org.eclipse.jgit"/>
+ <import feature="org.eclipse.jgit" version="5.4.1" match="equivalent"/>
</requires>
<plugin
@@ -34,7 +34,7 @@
unpack="false"/>
<plugin
- id="org.apache.sshd.core"
+ id="org.apache.sshd.osgi"
download-size="0"
install-size="0"
version="0.0.0"
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 fb549a2786..167b295fb2 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
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.gitignore b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.gitignore
deleted file mode 100644
index eb5a316cbd..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.project
deleted file mode 100644
index 55620844ff..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jgit.ssh.apache.source.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 6f96ce809a..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 18 23:33:45 CEST 2010
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 1a32dba177..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.core.runtime.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 18 23:33:45 CEST 2010
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index 823c0f56ae..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#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.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644
index 2fca432276..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/.settings/org.eclipse.mylyn.team.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#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.packaging/org.eclipse.jgit.ssh.apache.source.feature/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/build.properties
deleted file mode 100644
index b4a8dde9e5..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- edl-v10.html,\
- feature.properties,\
- license.html
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/edl-v10.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/edl-v10.html
deleted file mode 100644
index 8caddac569..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/edl-v10.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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;
- }
-</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>
-
-</body>
-
-</html>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.properties
deleted file mode 100644
index 9935431824..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.properties
+++ /dev/null
@@ -1,178 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-###############################################################################
-
-featureName=Java implementation of Git - ssh support using Apache MINA sshd - Source Code
-providerName=Eclipse JGit
-
-updateSiteName=Eclipse JGit Update Site
-
-# description property - text of the "Feature Description"
-description=\
-Do not install in your IDE: this feature is meant to provision Target Platforms.\n\
-Source code for the JGit ssh support using Apache MINA sshd.\n
-################ end of description property ##################################
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2018 Thomas Wolf and others\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Distribution License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/org/documents/edl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-\n\
-November 22, 2017\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\
-AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\
-THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\
-BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\
-APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\
-MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public License\n\
-Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\
-available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\
-"Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code, documentation\n\
-and other files maintained in the Eclipse Foundation source code repository\n\
-("Repository") in software modules ("Modules") and made available as\n\
-downloadable archives ("Downloads").\n\
-\n\
-- Content may be structured and packaged into modules to facilitate\n\
- delivering, extending, and upgrading the Content. Typical modules may\n\
- include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\
- features ("Features").\n\
-- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\
- (Java™ ARchive) in a directory named "plugins".\n\
-- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\
- associated material. Each Feature may be packaged as a sub-directory in a\n\
- directory named "features". Within a Feature, files named "feature.xml" may\n\
- contain a list of the names and version numbers of the Plug-ins and/or\n\
- Fragments associated with that Feature.\n\
-- Features may also include other Features ("Included Features"). Within a\n\
- Feature, files named "feature.xml" may contain a list of the names and\n\
- version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be contained in\n\
-files named "about.html" ("Abouts"). The terms and conditions governing Features\n\
-and Included Features should be contained in files named "license.html"\n\
-("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\
-directory of a Download or Module including, but not limited to the following\n\
-locations:\n\
-\n\
-- The top-level (root) directory\n\
-- Plug-in and Fragment directories\n\
-- Inside Plug-ins and Fragments packaged as JARs\n\
-- Sub-directories of the directory named "src" of certain Plug-ins\n\
-- Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using\n\
-the Provisioning Technology (as defined below), you must agree to a license\n\
-("Feature Update License") during the installation process. If the Feature\n\
-contains Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform you\n\
-where you can locate them. Feature Update Licenses may be found in the "license"\n\
-property of files named "feature.properties" found within a Feature. Such\n\
-Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your use of\n\
-the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\
-OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
-- Eclipse Public License Version 1.0 (available at\n\
- http://www.eclipse.org/legal/epl-v10.html)\n\
-- Eclipse Distribution License Version 1.0 (available at\n\
- http://www.eclipse.org/licenses/edl-v1.0.html)\n\
-- Common Public License Version 1.0 (available at\n\
- http://www.eclipse.org/legal/cpl-v10.html)\n\
-- Apache Software License 1.1 (available at\n\
- http://www.apache.org/licenses/LICENSE)\n\
-- Apache Software License 2.0 (available at\n\
- http://www.apache.org/licenses/LICENSE-2.0)\n\
-- Mozilla Public License Version 1.1 (available at\n\
- http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\
-USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\
-provided, please contact the Eclipse Foundation to determine what terms and\n\
-conditions govern that particular Content.\n\
-\n\
-Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which\n\
-include, but are not limited to, p2 and the Eclipse Update Manager\n\
-("Provisioning Technology") for the purpose of allowing users to install\n\
-software, documentation, information and/or other materials (collectively\n\
-"Installable Software"). This capability is provided with the intent of allowing\n\
-such users to install, extend and update Eclipse-based products. Information\n\
-about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install\n\
-Installable Software. You shall be responsible for enabling the applicable\n\
-license agreements relating to the Installable Software to be presented to, and\n\
-accepted by, the users of the Provisioning Technology in accordance with the\n\
-Specification. By using Provisioning Technology in such a manner and making it\n\
-available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the\n\
-following:\n\
-\n\
-1. A series of actions may occur ("Provisioning Process") in which a user may\n\
- execute the Provisioning Technology on a machine ("Target Machine") with the\n\
- intent of installing, extending or updating the functionality of an\n\
- Eclipse-based product.\n\
-2. During the Provisioning Process, the Provisioning Technology may cause third\n\
- party Installable Software or a portion thereof to be accessed and copied to\n\
- the Target Machine.\n\
-3. Pursuant to the Specification, you will provide to the user the terms and\n\
- conditions that govern the use of the Installable Software ("Installable\n\
- Software Agreement") and such Installable Software Agreement shall be\n\
- accessed from the Target Machine in accordance with the Specification. Such\n\
- Installable Software Agreement must inform the user of the terms and\n\
- conditions that govern the Installable Software and must solicit acceptance\n\
- by the end user in the manner prescribed in such Installable\n\
- Software Agreement. Upon such indication of agreement by the user, the\n\
- provisioning Technology will complete installation of the\n\
- Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are currently\n\
-may have restrictions on the import, possession, and use, and/or re-export to\n\
-another country, of encryption software. BEFORE using any encryption software,\n\
-please check the country's laws, regulations and policies concerning the import,\n\
-possession, or use, and re-export of encryption software, to see if this is\n\
-permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\
-United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.xml
deleted file mode 100644
index e0ef793a54..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/feature.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.jgit.ssh.apache.source"
- label="%featureName"
- version="5.3.3.qualifier"
- provider-name="%providerName">
-
- <description url="http://www.eclipse.org/jgit/">
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
- <discovery label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
- </url>
-
- <plugin
- id="org.eclipse.jgit.ssh.apache.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-</feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/license.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/license.html
deleted file mode 100644
index 008b8018db..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/license.html
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
- <h2>Eclipse Foundation Software User Agreement</h2>
- <p>November 22, 2017</p>
-
- <h3>Usage Of Content</h3>
-
- <p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
- INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY
- THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
- BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS
- GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY
- APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
- BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
- AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
- AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
- USE THE CONTENT.</p>
-
- <h3>Applicable Licenses</h3>
-
- <p>
- Unless otherwise indicated, all Content made available by the Eclipse
- Foundation is provided to you under the terms and conditions of the
- Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the
- EPL is provided with this Content and is also available at <a
- href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.
- </p>
-
- <p>Content includes, but is not limited to, source code, object
- code, documentation and other files maintained in the Eclipse
- Foundation source code repository (&quot;Repository&quot;) in software
- modules (&quot;Modules&quot;) and made available as downloadable
- archives (&quot;Downloads&quot;).</p>
-
- <ul>
- <li>Content may be structured and packaged into modules to
- facilitate delivering, extending, and upgrading the Content. Typical
- modules may include plug-ins (&quot;Plug-ins&quot;), plug-in
- fragments (&quot;Fragments&quot;), and features
- (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory
- or JAR (Java&trade; ARchive) in a directory named
- &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or
- Fragments and associated material. Each Feature may be packaged as a
- sub-directory in a directory named &quot;features&quot;. Within a
- Feature, files named &quot;feature.xml&quot; may contain a list of
- the names and version numbers of the Plug-ins and/or Fragments
- associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included
- Features&quot;). Within a Feature, files named
- &quot;feature.xml&quot; may contain a list of the names and version
- numbers of Included Features.</li>
- </ul>
-
- <p>The terms and conditions governing Plug-ins and Fragments should
- be contained in files named &quot;about.html&quot;
- (&quot;Abouts&quot;). The terms and conditions governing Features and
- Included Features should be contained in files named
- &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and
- Feature Licenses may be located in any directory of a Download or
- Module including, but not limited to the following locations:</p>
-
- <ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of
- certain Plug-ins</li>
- <li>Feature directories</li>
- </ul>
-
- <p>Note: if a Feature made available by the Eclipse Foundation is
- installed using the Provisioning Technology (as defined below), you
- must agree to a license (&quot;Feature Update License&quot;) during
- the installation process. If the Feature contains Included Features,
- the Feature Update License should either provide you with the terms
- and conditions governing the Included Features or inform you where you
- can locate them. Feature Update Licenses may be found in the
- &quot;license&quot; property of files named
- &quot;feature.properties&quot; found within a Feature. Such Abouts,
- Feature Licenses, and Feature Update Licenses contain the terms and
- conditions (or references to such terms and conditions) that govern
- your use of the associated Content in that directory.</p>
-
- <p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY
- REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
- CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT
- ARE NOT LIMITED TO):</p>
-
- <ul>
- <li>Eclipse Public License Version 1.0 (available at <a
- href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>)
- </li>
- <li>Eclipse Distribution License Version 1.0 (available at <a
- href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)
- </li>
- <li>Common Public License Version 1.0 (available at <a
- href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)
- </li>
- <li>Apache Software License 1.1 (available at <a
- href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)
- </li>
- <li>Apache Software License 2.0 (available at <a
- href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)
- </li>
- <li>Mozilla Public License Version 1.1 (available at <a
- href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)
- </li>
- </ul>
-
- <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
- CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
- or Feature Update License is provided, please contact the Eclipse
- Foundation to determine what terms and conditions govern that
- particular Content.</p>
-
-
- <h3>Use of Provisioning Technology</h3>
-
- <p>
- The Eclipse Foundation makes available provisioning software, examples
- of which include, but are not limited to, p2 and the Eclipse Update
- Manager (&quot;Provisioning Technology&quot;) for the purpose of
- allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This
- capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about
- packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).
- </p>
-
- <p>You may use Provisioning Technology to allow other parties to
- install Installable Software. You shall be responsible for enabling
- the applicable license agreements relating to the Installable Software
- to be presented to, and accepted by, the users of the Provisioning
- Technology in accordance with the Specification. By using Provisioning
- Technology in such a manner and making it available in accordance with
- the Specification, you further acknowledge your agreement to, and the
- acquisition of all necessary rights to permit the following:</p>
-
- <ol>
- <li>A series of actions may occur (&quot;Provisioning
- Process&quot;) in which a user may execute the Provisioning
- Technology on a machine (&quot;Target Machine&quot;) with the intent
- of installing, extending or updating the functionality of an
- Eclipse-based product.</li>
- <li>During the Provisioning Process, the Provisioning Technology
- may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user
- the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such
- Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable
- Software Agreement must inform the user of the terms and conditions
- that govern the Installable Software and must solicit acceptance by
- the end user in the manner prescribed in such Installable Software
- Agreement. Upon such indication of agreement by the user, the
- provisioning Technology will complete installation of the Installable
- Software.</li>
- </ol>
-
- <h3>Cryptography</h3>
-
- <p>Content may contain encryption software. The country in which
- you are currently may have restrictions on the import, possession, and
- use, and/or re-export to another country, of encryption software.
- BEFORE using any encryption software, please check the country's laws,
- regulations and policies concerning the import, possession, or use,
- and re-export of encryption software, to see if this is permitted.</p>
-
- <p>
- <small>Java and all Java-based trademarks are trademarks of
- Oracle Corporation in the United States, other countries, or both.</small>
- </p>
-</body>
-</html>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/pom.xml
deleted file mode 100644
index 1ac70b0634..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.source.feature/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2018 Thomas Wolf <thomas.wolf@paranor.ch>
- and other copyright owners as documented in the project's IP log.
-
- This program and the accompanying materials are made available
- under the terms of the Eclipse Distribution License v1.0 which
- accompanies this distribution, is reproduced below, and is
- available at http://www.eclipse.org/org/documents/edl-v10.php
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, are permitted provided that the following
- conditions are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- - Neither the name of the Eclipse Foundation, Inc. nor the
- names of its contributors may be used to endorse or promote
- products derived from this software without specific prior
- written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<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>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
- </parent>
-
- <groupId>org.eclipse.jgit.feature</groupId>
- <artifactId>org.eclipse.jgit.ssh.apache.source</artifactId>
- <packaging>eclipse-feature</packaging>
-
- <name>JGit Apache MINA ssh Source Feature</name>
-
-</project>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath
deleted file mode 100644
index eca7bdba8f..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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-1.8"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project
index 48c2bd1de3..ed148da848 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/.project
@@ -10,14 +10,8 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
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
deleted file mode 100644
index f28abfa1ac..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: JGit Target Platform Bundle
-Bundle-SymbolicName: org.eclipse.jgit.target
-Bundle-Version: 5.3.3.qualifier
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties
deleted file mode 100644
index 34d2e4d2da..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
index 86653bef02..36660ff3e6 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.10" sequenceNumber="1566244557">
+<target name="jgit-4.10" sequenceNumber="1566251637">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.14.v20181114"/>
@@ -37,12 +37,12 @@
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
- <unit id="org.bouncycastle.bcpg" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.60.0.v20181210-2057"/>
+ <unit id="org.bouncycastle.bcpg" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.61.0.v20190602-1335"/>
<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.hamcrest" version="1.1.0.v20090501071000"/>
@@ -78,11 +78,11 @@
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<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.sshd.core" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
+ <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.tpd
deleted file mode 100644
index 4fc23eda87..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.tpd
+++ /dev/null
@@ -1,8 +0,0 @@
-target "jgit-4.11-staging" with source configurePhase
-
-include "projects/jetty-9.4.14.tpd"
-include "orbit/R20190602212107-2019-06.tpd"
-
-location "http://download.eclipse.org/staging/2019-03/" {
- org.eclipse.osgi lazy
-}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
new file mode 100644
index 0000000000..afa4b3da2c
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
+<target name="jgit-4.11" sequenceNumber="1566251633">
+ <locations>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="org.eclipse.jetty.client" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.client.source" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.continuation" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.continuation.source" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.http" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.http.source" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.io" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.io.source" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.security" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.security.source" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.server" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.server.source" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.servlet" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.servlet.source" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.util" version="9.4.14.v20181114"/>
+ <unit id="org.eclipse.jetty.util.source" version="9.4.14.v20181114"/>
+ <repository id="jetty-9.4.14" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.14.v20181114"/>
+ </location>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="org.apache.ant" version="1.10.5.v20190526-1402"/>
+ <unit id="org.apache.ant.source" version="1.10.5.v20190526-1402"/>
+ <unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
+ <unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/>
+ <unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/>
+ <unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/>
+ <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.6.v20190503-0009"/>
+ <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/>
+ <unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/>
+ <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
+ <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
+ <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
+ <unit id="org.bouncycastle.bcpg" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.61.0.v20190602-1335"/>
+ <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.hamcrest" version="1.1.0.v20090501071000"/>
+ <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="javaewah" version="1.1.6.v20160919-1400"/>
+ <unit id="javaewah.source" version="1.1.6.v20160919-1400"/>
+ <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
+ <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
+ <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
+ <unit id="org.mockito.source" version="2.23.0.v20190527-1420"/>
+ <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
+ <unit id="net.bytebuddy.byte-buddy.source" 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="com.google.gson" version="2.8.2.v20180104-1110"/>
+ <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/>
+ <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="org.junit" version="4.12.0.v201504281640"/>
+ <unit id="org.junit.source" version="4.12.0.v201504281640"/>
+ <unit id="javax.servlet" version="3.1.0.v201410161800"/>
+ <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
+ <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
+ <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
+ <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/>
+ <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/>
+ <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/>
+ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
+ <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
+ <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.sshd.osgi" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
+ </location>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="org.eclipse.osgi" version="0.0.0"/>
+ <repository location="http://download.eclipse.org/releases/2019-03/"/>
+ </location>
+ </locations>
+</target>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
new file mode 100644
index 0000000000..e09e8c387d
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.11" with source configurePhase
+
+include "projects/jetty-9.4.14.tpd"
+include "orbit/R20190602212107-2019-06.tpd"
+
+location "http://download.eclipse.org/releases/2019-03/" {
+ org.eclipse.osgi lazy
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12-staging.target
index 0857af3979..92c9a88366 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12-staging.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.11-staging" sequenceNumber="1566244434">
+<target name="jgit-4.12-staging" sequenceNumber="1566251632">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.14.v20181114"/>
@@ -37,12 +37,12 @@
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
- <unit id="org.bouncycastle.bcpg" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.60.0.v20181210-2057"/>
+ <unit id="org.bouncycastle.bcpg" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.61.0.v20190602-1335"/>
<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.hamcrest" version="1.1.0.v20090501071000"/>
@@ -78,15 +78,15 @@
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<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.sshd.core" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
+ <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
- <repository location="http://download.eclipse.org/staging/2019-03/"/>
+ <repository location="http://download.eclipse.org/staging/2019-06/"/>
</location>
</locations>
</target>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12-staging.tpd
new file mode 100644
index 0000000000..43b64a0301
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12-staging.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.12-staging" with source configurePhase
+
+include "projects/jetty-9.4.14.tpd"
+include "orbit/R20190602212107-2019-06.tpd"
+
+location "http://download.eclipse.org/staging/2019-06/" {
+ org.eclipse.osgi lazy
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
index 05488b9c3d..9724939f8a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.6" sequenceNumber="1566244561">
+<target name="jgit-4.6" sequenceNumber="1566251641">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.14.v20181114"/>
@@ -37,12 +37,12 @@
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
- <unit id="org.bouncycastle.bcpg" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.60.0.v20181210-2057"/>
+ <unit id="org.bouncycastle.bcpg" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.61.0.v20190602-1335"/>
<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.hamcrest" version="1.1.0.v20090501071000"/>
@@ -78,11 +78,11 @@
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<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.sshd.core" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
+ <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
index e82222a0c5..6bd70e0160 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.7" sequenceNumber="1566244564">
+<target name="jgit-4.7" sequenceNumber="1566251627">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.14.v20181114"/>
@@ -37,12 +37,12 @@
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
- <unit id="org.bouncycastle.bcpg" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.60.0.v20181210-2057"/>
+ <unit id="org.bouncycastle.bcpg" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.61.0.v20190602-1335"/>
<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.hamcrest" version="1.1.0.v20090501071000"/>
@@ -78,11 +78,11 @@
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<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.sshd.core" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
+ <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
index 0b353db260..e33ece710a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.8" sequenceNumber="1566244569">
+<target name="jgit-4.8" sequenceNumber="1566251616">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.14.v20181114"/>
@@ -37,12 +37,12 @@
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
- <unit id="org.bouncycastle.bcpg" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.60.0.v20181210-2057"/>
+ <unit id="org.bouncycastle.bcpg" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.61.0.v20190602-1335"/>
<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.hamcrest" version="1.1.0.v20090501071000"/>
@@ -78,11 +78,11 @@
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<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.sshd.core" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
+ <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
index 94a752c74c..9b3fe1b930 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.9" sequenceNumber="1566244572">
+<target name="jgit-4.9" sequenceNumber="1566251604">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.14.v20181114"/>
@@ -37,12 +37,12 @@
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
- <unit id="org.bouncycastle.bcpg" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov" version="1.60.0.v20181210-2057"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.60.0.v20181210-2057"/>
+ <unit id="org.bouncycastle.bcpg" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov" version="1.61.0.v20190602-1335"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.61.0.v20190602-1335"/>
<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.hamcrest" version="1.1.0.v20090501071000"/>
@@ -78,11 +78,11 @@
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<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.sshd.core" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
- <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
- <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository"/>
+ <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
+ <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/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/orbit/R20190602212107-2019-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20190602212107-2019-06.tpd
index 65d5c9f1f5..db674493b5 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20190602212107-2019-06.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20190602212107-2019-06.tpd
@@ -1,7 +1,7 @@
target "R20190602212107-2019-06" with source configurePhase
// see http://download.eclipse.org/tools/orbit/downloads/
-location "http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository" {
+location "https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository" {
org.apache.ant [1.10.5.v20190526-1402,1.10.5.v20190526-1402]
org.apache.ant.source [1.10.5.v20190526-1402,1.10.5.v20190526-1402]
org.apache.commons.codec [1.10.0.v20180409-1845,1.10.0.v20180409-1845]
@@ -16,12 +16,12 @@ location "http://download.eclipse.org/tools/orbit/downloads/drops/R2019060221210
org.apache.httpcomponents.httpcore.source [4.4.10.v20190123-2214,4.4.10.v20190123-2214]
org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815]
org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815]
- org.bouncycastle.bcpg [1.60.0.v20181210-2057,1.60.0.v20181210-2057]
- org.bouncycastle.bcpg.source [1.60.0.v20181210-2057,1.60.0.v20181210-2057]
- org.bouncycastle.bcpkix [1.60.0.v20181210-2057,1.60.0.v20181210-2057]
- org.bouncycastle.bcpkix.source [1.60.0.v20181210-2057,1.60.0.v20181210-2057]
- org.bouncycastle.bcprov [1.60.0.v20181210-2057,1.60.0.v20181210-2057]
- org.bouncycastle.bcprov.source [1.60.0.v20181210-2057,1.60.0.v20181210-2057]
+ org.bouncycastle.bcpg [1.61.0.v20190602-1335,1.61.0.v20190602-1335]
+ org.bouncycastle.bcpg.source [1.61.0.v20190602-1335,1.61.0.v20190602-1335]
+ org.bouncycastle.bcpkix [1.61.0.v20190602-1335,1.61.0.v20190602-1335]
+ org.bouncycastle.bcpkix.source [1.61.0.v20190602-1335,1.61.0.v20190602-1335]
+ org.bouncycastle.bcprov [1.61.0.v20190602-1335,1.61.0.v20190602-1335]
+ org.bouncycastle.bcprov.source [1.61.0.v20190602-1335,1.61.0.v20190602-1335]
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.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000]
@@ -57,8 +57,9 @@ location "http://download.eclipse.org/tools/orbit/downloads/drops/R2019060221210
com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305]
net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
- org.apache.sshd.core [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
- org.apache.sshd.core.source [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
- org.apache.sshd.sftp [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
- org.apache.sshd.sftp.source [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
+ org.apache.sshd.osgi [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
+ org.apache.sshd.osgi.source [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
+ org.apache.sshd.sftp [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
+ org.apache.sshd.sftp.source [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
}
+
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 532100be96..e632224b92 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
@@ -49,7 +49,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.target</artifactId>
diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml
index 22f47f59df..6c5ced32ea 100644
--- a/org.eclipse.jgit.packaging/pom.xml
+++ b/org.eclipse.jgit.packaging/pom.xml
@@ -49,13 +49,13 @@
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JGit Tycho Parent</name>
<properties>
- <tycho-version>1.3.0</tycho-version>
+ <tycho-version>1.4.0</tycho-version>
<tycho-extras-version>${tycho-version}</tycho-extras-version>
<target-platform>jgit-4.6</target-platform>
</properties>
@@ -79,8 +79,6 @@
<module>org.eclipse.jgit.lfs.feature</module>
<module>org.eclipse.jgit.pgm.feature</module>
<module>org.eclipse.jgit.source.feature</module>
- <module>org.eclipse.jgit.pgm.source.feature</module>
- <module>org.eclipse.jgit.ssh.apache.source.feature</module>
<module>org.eclipse.jgit.junit.feature</module>
<module>org.eclipse.jgit.repository</module>
</modules>
@@ -109,6 +107,60 @@
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ant</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.archive</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.http.apache</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.http.server</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.junit</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.junit.http</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.junit.ssh</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.lfs</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.lfs.server</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.pgm</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
@@ -119,6 +171,12 @@
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit.ui</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
</dependencies>
<build>
diff --git a/org.eclipse.jgit.pgm.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.pgm.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2174e4fd5b
--- /dev/null
+++ b/org.eclipse.jgit.pgm.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
index b0e6506e36..920c0cf897 100644
--- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
@@ -3,28 +3,28 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.pgm.test
Bundle-SymbolicName: org.eclipse.jgit.pgm.test
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.api;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.api.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.diff;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.dircache;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="5.3.3",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.merge;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.pgm;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.pgm.internal;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.pgm.opt;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util.io;version="[5.3.3,5.4.0)",
+Import-Package: org.eclipse.jgit.api;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.api.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.diff;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.dircache;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="5.4.1",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.merge;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.pgm;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.pgm.internal;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.pgm.opt;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util.io;version="[5.4.1,5.5.0)",
org.hamcrest.core;bundle-version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)",
diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml
index 601f0e0c57..fb493f8c54 100644
--- a/org.eclipse.jgit.pgm.test/pom.xml
+++ b/org.eclipse.jgit.pgm.test/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm.test</artifactId>
@@ -109,7 +109,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>@{argLine} -Djava.io.tmpdir=${project.build.directory}</argLine>
+ <argLine>@{argLine} -Xmx512m -Djava.io.tmpdir=${project.build.directory}</argLine>
</configuration>
</plugin>
</plugins>
diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java
index 0d1894b644..a830ff2849 100644
--- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java
+++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java
@@ -214,7 +214,7 @@ public class CLIRepositoryTestCase extends LocalDiskRepositoryTestCase {
protected void assertStringArrayEquals(String expected, String[] actual) {
// if there is more than one line, ignore last one if empty
assertEquals(1,
- actual.length > 1 && actual[actual.length - 1].equals("")
+ actual.length > 1 && actual[actual.length - 1].isEmpty()
? actual.length - 1 : actual.length);
assertEquals(expected, actual[0]);
}
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java
index 47eb156c55..e07fdd50d2 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java
@@ -60,7 +60,6 @@ import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
@@ -703,15 +702,12 @@ public class ArchiveTest extends CLIRepositoryTestCase {
private static Future<Object> writeAsync(OutputStream stream, byte[] data) {
ExecutorService executor = Executors.newSingleThreadExecutor();
- return executor.submit(new Callable<Object>() {
- @Override
- public Object call() throws IOException {
- try {
- stream.write(data);
- return null;
- } finally {
- stream.close();
- }
+ return executor.submit(() -> {
+ try {
+ stream.write(data);
+ return null;
+ } finally {
+ stream.close();
}
});
}
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index 4551c1c3ab..9c313aab84 100644
--- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.pgm
Bundle-SymbolicName: org.eclipse.jgit.pgm
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
@@ -28,50 +28,50 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.api.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.archive;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.awtui;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.blame;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.diff;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.dircache;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.gitrepo;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.ketch;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.io;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.reftree;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.server;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.server.fs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs.server.s3;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.merge;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.notes;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revplot;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.pack;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.resolver;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.sshd;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util.io;version="[5.3.3,5.4.0)",
+ org.eclipse.jgit.api;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.api.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.archive;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.awtui;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.blame;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.diff;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.dircache;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.gitrepo;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.ketch;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.io;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.reftree;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.server;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs.server.s3;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.merge;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.notes;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revplot;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.pack;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.sshd;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util.io;version="[5.4.1,5.5.0)",
org.kohsuke.args4j;version="[2.33.0,3.0.0)",
org.kohsuke.args4j.spi;version="[2.33.0,3.0.0)"
-Export-Package: org.eclipse.jgit.console;version="5.3.3";
+Export-Package: org.eclipse.jgit.console;version="5.4.1";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.util",
- org.eclipse.jgit.pgm;version="5.3.3";
+ org.eclipse.jgit.pgm;version="5.4.1";
uses:="org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.pgm.opt,
@@ -82,11 +82,11 @@ Export-Package: org.eclipse.jgit.console;version="5.3.3";
org.eclipse.jgit.treewalk,
javax.swing,
org.eclipse.jgit.transport",
- org.eclipse.jgit.pgm.debug;version="5.3.3";
+ org.eclipse.jgit.pgm.debug;version="5.4.1";
uses:="org.eclipse.jgit.util.io,
org.eclipse.jgit.pgm",
- org.eclipse.jgit.pgm.internal;version="5.3.3";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test",
- org.eclipse.jgit.pgm.opt;version="5.3.3";
+ org.eclipse.jgit.pgm.internal;version="5.4.1";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test",
+ org.eclipse.jgit.pgm.opt;version="5.4.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.kohsuke.args4j.spi,
diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
index c225dab96b..9be8fb228b 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: 5.3.3.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.3.3.qualifier";roots="."
+Bundle-Version: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index 272cd1f635..389b180331 100644
--- a/org.eclipse.jgit.pgm/pom.xml
+++ b/org.eclipse.jgit.pgm/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm</artifactId>
@@ -142,6 +142,12 @@
<artifactId>org.eclipse.jgit.lfs.server</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.tukaani</groupId>
+ <artifactId>xz</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>
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 a482ce3f38..2a5a31eba8 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
@@ -24,7 +24,6 @@ branchNameRequired=branch name required
branchNotFound=branch ''{0}'' not found.
cacheTreePathInfo="{0}": {1} entries, {2} children
cannotBeRenamed={0} cannot be renamed
-cannotChekoutNoHeadsAdvertisedByRemote=cannot checkout; no HEAD advertised by remote
cannotCombineSquashWithNoff=You cannot combine --squash with --no-ff.
cannotCreateCommand=Cannot create command {0}
cannotCreateOutputStream=cannot create output stream
@@ -223,6 +222,7 @@ unsupportedOperation=Unsupported operation: {0}
untrackedFiles=Untracked files:
updating=Updating {0}..{1}
usage_Aggressive=This option will cause gc to more aggressively optimize the repository at the expense of taking much more time
+usage_AlwaysFallback=Show uniquely abbreviated commit object as fallback
usage_bareClone=Make a bare Git repository. That is, instead of creating [DIRECTORY] and placing the administrative files in [DIRECTORY]/.git, make the [DIRECTORY] itself the $GIT_DIR.
usage_Blame=Show what revision and author last modified each line
usage_Clean=Remove untracked files from the working tree
@@ -290,6 +290,7 @@ 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_UpdateRemoteRepositoryFromLocalRefs=Update remote repository from local refs
+usage_UseTags=Use any tag including lightweight tags
usage_WriteDirCache=Write the DirCache
usage_abbrevCommits=abbreviate commits to N + 1 digits
usage_abortConnectionIfNoActivity=abort connection if no activity
@@ -315,7 +316,7 @@ usage_blameSuppressAuthor=do not show author name and timestamp
usage_beMoreVerbose=be more verbose
usage_beVerbose=be verbose
usage_cached=compare against index
-usage_checkout=Checkout a branch to the working tree
+usage_checkout=Check out a branch to the working tree
usage_cloneRepositoryIntoNewDir=Clone a repository into a new directory
usage_configFile=configuration file
usage_configGlobal=use global configuration in ~/.gitconfig
@@ -323,7 +324,7 @@ usage_configList=List all variables set in config file
usage_configLocal=use local configuration in .git/config
usage_configSystem=use system-wide configuration in $(prefix)/etc/gitconfig
usage_configureTheServiceInDaemonServicename=configure the service in daemon.servicename
-usage_createBranchAndCheckout=create branch and checkout
+usage_createBranchAndCheckout=create branch and check out
usage_deleteBranchEvenIfNotMerged=delete branch (even if not merged)
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)
@@ -416,7 +417,7 @@ usage_untrackedFilesMode=show untracked files
usage_updateRef=reference to update
usage_updateRemoteRefsFromAnotherRepository=Update remote refs from another repository
usage_useNameInsteadOfOriginToTrackUpstream=use <name> instead of 'origin' to track upstream
-usage_checkoutBranchAfterClone=checkout named branch instead of remote's HEAD
+usage_checkoutBranchAfterClone=check out named branch instead of remote's HEAD
usage_viewCommitHistory=View commit history
usage_orphan=Create a new orphan branch. The first commit made on this new branch will have no parents and it will be the root of a new history totally disconnected from other branches and commits.
usernameFor=Username for {0}:
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
index 3858b3dd0e..e38cb468d9 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
@@ -218,7 +218,8 @@ class Blame extends TextBuiltin {
dateWidth = Math.max(dateWidth, date(line).length());
pathWidth = Math.max(pathWidth, path(line).length());
}
- while (line + 1 < end && blame.getSourceCommit(line + 1) == c) {
+ while (line + 1 < end
+ && sameCommit(blame.getSourceCommit(line + 1), c)) {
line++;
}
maxSourceLine = Math.max(maxSourceLine, blame.getSourceLine(line));
@@ -257,13 +258,22 @@ class Blame extends TextBuiltin {
blame.getResultContents().writeLine(outs, line);
outs.flush();
outw.print('\n');
- } while (++line < end && blame.getSourceCommit(line) == c);
+ } while (++line < end
+ && sameCommit(blame.getSourceCommit(line), c));
}
} catch (NoWorkTreeException | IOException e) {
throw die(e.getMessage(), e);
}
}
+ @SuppressWarnings("ReferenceEquality")
+ private static boolean sameCommit(RevCommit a, RevCommit b) {
+ // Reference comparison is intentional; BlameGenerator uses a single
+ // RevWalk which caches the RevCommit objects, and if a given commit
+ // is cached the RevWalk returns the same instance.
+ return a == b;
+ }
+
private int uniqueAbbrevLen(ObjectReader reader, RevCommit commit)
throws IOException {
return reader.abbreviate(commit, abbrev).length();
@@ -295,14 +305,14 @@ class Blame extends TextBuiltin {
}
}
- if (beginStr.equals("")) //$NON-NLS-1$
+ if (beginStr.isEmpty())
begin = 0;
else if (beginStr.startsWith("/")) //$NON-NLS-1$
begin = findLine(0, beginStr);
else
begin = Math.max(0, Integer.parseInt(beginStr) - 1);
- if (endStr.equals("")) //$NON-NLS-1$
+ if (endStr.isEmpty())
end = blame.getResultContents().size();
else if (endStr.startsWith("/")) //$NON-NLS-1$
end = findLine(begin, endStr);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
index 7e1737f872..3df37e51c3 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
@@ -96,7 +96,7 @@ class Checkout extends TextBuiltin {
try (Git git = new Git(db)) {
CheckoutCommand command = git.checkout()
.setProgressMonitor(new TextProgressMonitor(errw));
- if (paths.size() > 0) {
+ if (!paths.isEmpty()) {
command.setStartPoint(name);
if (paths.size() == 1 && paths.get(0).equals(".")) { //$NON-NLS-1$
command.setAllPaths(true);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
index dbdccc10e2..dab52f6ce9 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
@@ -52,7 +52,6 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Comparator;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
@@ -115,12 +114,8 @@ public class CommandCatalog {
private static CommandRef[] toSortedArray(Collection<CommandRef> c) {
final CommandRef[] r = c.toArray(new CommandRef[0]);
- Arrays.sort(r, new Comparator<CommandRef>() {
- @Override
- public int compare(CommandRef o1, CommandRef o2) {
- return o1.getName().compareTo(o2.getName());
- }
- });
+ Arrays.sort(r, (CommandRef o1, CommandRef o2) -> o1.getName()
+ .compareTo(o2.getName()));
return r;
}
@@ -163,13 +158,9 @@ public class CommandCatalog {
final Class<? extends TextBuiltin> clazz;
try {
clazz = Class.forName(cn, false, ldr).asSubclass(TextBuiltin.class);
- } catch (ClassNotFoundException notBuiltin) {
+ } catch (ClassNotFoundException | ClassCastException notBuiltin) {
// Doesn't exist, even though the service entry is present.
- //
- return;
- } catch (ClassCastException notBuiltin) {
// Isn't really a builtin, even though its listed as such.
- //
return;
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
index 1773de5d78..85ace3a077 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
@@ -156,24 +156,19 @@ public class CommandRef {
final Constructor<? extends TextBuiltin> c;
try {
c = impl.getDeclaredConstructor();
- } catch (SecurityException e) {
- throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
- } catch (NoSuchMethodException e) {
- throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
+ } catch (SecurityException | NoSuchMethodException e) {
+ throw new RuntimeException(MessageFormat
+ .format(CLIText.get().cannotCreateCommand, getName(), e));
}
c.setAccessible(true);
final TextBuiltin r;
try {
r = c.newInstance();
- } catch (InstantiationException e) {
- throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
- } catch (IllegalAccessException e) {
- throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
- } catch (IllegalArgumentException e) {
- throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
- } catch (InvocationTargetException e) {
- throw new RuntimeException(MessageFormat.format(CLIText.get().cannotCreateCommand, getName(), e));
+ } catch (InstantiationException | IllegalAccessException
+ | IllegalArgumentException | InvocationTargetException e) {
+ throw new RuntimeException(MessageFormat
+ .format(CLIText.get().cannotCreateCommand, getName(), e));
}
r.setCommandName(getName());
return r;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
index 319b5e39dc..43826636aa 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
@@ -66,7 +66,6 @@ import org.eclipse.jgit.transport.DaemonService;
import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.resolver.FileResolver;
import org.eclipse.jgit.transport.resolver.ReceivePackFactory;
-import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.eclipse.jgit.util.FS;
import org.kohsuke.args4j.Argument;
@@ -188,22 +187,17 @@ class Daemon extends TextBuiltin {
final ReceivePackFactory<DaemonClient> factory;
factory = daemon.getReceivePackFactory();
- daemon.setReceivePackFactory(new ReceivePackFactory<DaemonClient>() {
- @Override
- public ReceivePack create(DaemonClient req, Repository repo)
- throws ServiceNotEnabledException,
- ServiceNotAuthorizedException {
- ReceivePack rp = factory.create(req, repo);
- KetchLeader leader;
- try {
- leader = leaders.get(repo);
- } catch (URISyntaxException err) {
- throw new ServiceNotEnabledException(
- KetchText.get().invalidFollowerUri, err);
- }
- rp.setPreReceiveHook(new KetchPreReceive(leader));
- return rp;
+ daemon.setReceivePackFactory((DaemonClient req, Repository repo) -> {
+ ReceivePack rp = factory.create(req, repo);
+ KetchLeader leader;
+ try {
+ leader = leaders.get(repo);
+ } catch (URISyntaxException err) {
+ throw new ServiceNotEnabledException(
+ KetchText.get().invalidFollowerUri, err);
}
+ rp.setPreReceiveHook(new KetchPreReceive(leader));
+ return rp;
});
}
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java
index d89fee6239..8a572f44b4 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java
@@ -65,6 +65,12 @@ class Describe extends TextBuiltin {
@Option(name = "--long", usage = "usage_LongFormat")
private boolean longDesc;
+ @Option(name = "--tags", usage = "usage_UseTags")
+ private boolean useTags;
+
+ @Option(name = "--always", usage = "usage_AlwaysFallback")
+ private boolean always;
+
@Option(name = "--match", usage = "usage_Match", metaVar = "metaVar_pattern")
private List<String> patterns = new ArrayList<>();
@@ -77,6 +83,8 @@ class Describe extends TextBuiltin {
cmd.setTarget(tree);
}
cmd.setLong(longDesc);
+ cmd.setTags(useTags);
+ cmd.setAlways(always);
cmd.setMatch(patterns.toArray(new String[0]));
String result = null;
try {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
index 7747dc7dd7..3d6ebfd8b6 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
@@ -87,7 +87,7 @@ class Diff extends TextBuiltin {
@Argument(index = 1, metaVar = "metaVar_treeish")
private AbstractTreeIterator newTree;
- @Option(name = "--cached", usage = "usage_cached")
+ @Option(name = "--cached", aliases = { "--staged" }, usage = "usage_cached")
private boolean cached;
@Option(name = "--", metaVar = "metaVar_paths", handler = PathTreeFilterHandler.class)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
index 2b5af5d7b7..00bbfb788b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
@@ -47,7 +47,6 @@ package org.eclipse.jgit.pgm;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
@@ -87,11 +86,8 @@ class Glog extends RevWalkTextBuiltin {
final JPanel buttons = new JPanel(new FlowLayout());
final JButton repaint = new JButton();
repaint.setText(CLIText.get().repaint);
- repaint.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- graphPane.repaint();
- }
+ repaint.addActionListener((ActionEvent e) -> {
+ graphPane.repaint();
});
buttons.add(repaint);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsFiles.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsFiles.java
index ef25844973..e3ed30dc40 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsFiles.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsFiles.java
@@ -85,7 +85,7 @@ class LsFiles extends TextBuiltin {
CanonicalTreeParser p = new CanonicalTreeParser();
p.reset(rw.getObjectReader(), c.getTree());
tw.reset(); // drop the first empty tree, which we do not need here
- if (paths.size() > 0) {
+ if (!paths.isEmpty()) {
tw.setFilter(PathFilterGroup.createFromStrings(paths));
}
tw.addTree(p);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
index 1c2564dd7c..708fcde683 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
@@ -46,7 +46,6 @@
package org.eclipse.jgit.pgm;
import java.io.IOException;
-import java.util.Comparator;
import java.util.TreeSet;
import org.eclipse.jgit.api.Git;
@@ -76,13 +75,8 @@ class LsRemote extends TextBuiltin {
protected void run() {
LsRemoteCommand command = Git.lsRemoteRepository().setRemote(remote)
.setTimeout(timeout).setHeads(heads).setTags(tags);
- TreeSet<Ref> refs = new TreeSet<>(new Comparator<Ref>() {
-
- @Override
- public int compare(Ref r1, Ref r2) {
- return r1.getName().compareTo(r2.getName());
- }
- });
+ TreeSet<Ref> refs = new TreeSet<>(
+ (Ref r1, Ref r2) -> r1.getName().compareTo(r2.getName()));
try {
refs.addAll(command.call());
for (Ref r : refs) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
index 2a2bb7cc91..19f2d7ae4f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
@@ -76,7 +76,7 @@ class LsTree extends TextBuiltin {
protected void run() {
try (TreeWalk walk = new TreeWalk(db)) {
walk.reset(); // drop the first empty tree, which we do not need here
- if (paths.size() > 0) {
+ if (!paths.isEmpty()) {
walk.setFilter(PathFilterGroup.createFromStrings(paths));
}
walk.setRecursive(recursive);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index ad10ec9e44..9952f5cfc1 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -330,22 +330,12 @@ public class Main {
install("org.eclipse.jgit.console.ConsoleAuthenticator"); //$NON-NLS-1$
install("org.eclipse.jgit.console.ConsoleCredentialsProvider"); //$NON-NLS-1$
return true;
- } catch (ClassNotFoundException e) {
+ } catch (ClassNotFoundException | NoClassDefFoundError
+ | UnsupportedClassVersionError e) {
return false;
- } catch (NoClassDefFoundError e) {
- return false;
- } catch (UnsupportedClassVersionError e) {
- return false;
-
- } catch (IllegalArgumentException e) {
- throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
- } catch (SecurityException e) {
- throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
- } catch (InvocationTargetException e) {
- throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
- } catch (NoSuchMethodException e) {
+ } catch (IllegalArgumentException | SecurityException
+ | IllegalAccessException | InvocationTargetException
+ | NoSuchMethodException e) {
throw new RuntimeException(CLIText.get().cannotSetupConsole, e);
}
}
@@ -390,12 +380,12 @@ public class Main {
if (s == null && protocol.equals("https")) { //$NON-NLS-1$
s = System.getenv("HTTPS_PROXY"); //$NON-NLS-1$
}
- if (s == null || s.equals("")) { //$NON-NLS-1$
+ if (s == null || s.isEmpty()) {
continue;
}
final URL u = new URL(
- (s.indexOf("://") == -1) ? protocol + "://" + s : s); //$NON-NLS-1$ //$NON-NLS-2$
+ (!s.contains("://")) ? protocol + "://" + s : s); //$NON-NLS-1$ //$NON-NLS-2$
if (!u.getProtocol().startsWith("http")) //$NON-NLS-1$
throw new MalformedURLException(MessageFormat.format(
CLIText.get().invalidHttpProxyOnlyHttpSupported, s));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
index b3e81c6d65..e1a290731c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
@@ -80,7 +80,7 @@ class Reset extends TextBuiltin {
try (Git git = new Git(db)) {
ResetCommand command = git.reset();
command.setRef(commit);
- if (paths.size() > 0) {
+ if (!paths.isEmpty()) {
for (String path : paths) {
command.addPath(path);
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
index dfc8a9436f..c3887fe9c3 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
@@ -93,7 +93,7 @@ class Status extends TextBuiltin {
protected void run() {
try (Git git = new Git(db)) {
StatusCommand statusCommand = git.status();
- if (filterPaths != null && filterPaths.size() > 0) {
+ if (filterPaths != null) {
for (String path : filterPaths) {
statusCommand.addPath(path);
}
@@ -282,7 +282,7 @@ class Status extends TextBuiltin {
if (!porcelain) {
outw.println(CLIText.formatLine(MessageFormat.format(pattern,
arguments)));
- if (!pattern.equals("")) //$NON-NLS-1$
+ if (!pattern.isEmpty())
outw.println(CLIText.formatLine("")); //$NON-NLS-1$
outw.flush();
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
index 05f237837f..d81a3aedc7 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
@@ -45,8 +45,8 @@
package org.eclipse.jgit.pgm;
import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_SECTION_I18N;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_LOG_OUTPUT_ENCODING;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_SECTION_I18N;
import static org.eclipse.jgit.lib.Constants.R_HEADS;
import static org.eclipse.jgit.lib.Constants.R_REMOTES;
import static org.eclipse.jgit.lib.Constants.R_TAGS;
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 0e1b398a73..85a74448f7 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
@@ -52,7 +52,6 @@ import java.lang.management.ThreadMXBean;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
import java.util.List;
import org.eclipse.jgit.diff.DiffAlgorithm;
@@ -235,15 +234,12 @@ class DiffAlgorithms extends TextBuiltin {
}
}
- Collections.sort(all, new Comparator<Test>() {
- @Override
- public int compare(Test a, Test b) {
- int result = Long.signum(a.runningTimeNanos - b.runningTimeNanos);
- if (result == 0) {
- result = a.algorithm.name.compareTo(b.algorithm.name);
- }
- return result;
+ Collections.sort(all, (Test a, Test b) -> {
+ int result = Long.signum(a.runningTimeNanos - b.runningTimeNanos);
+ if (result == 0) {
+ result = a.algorithm.name.compareTo(b.algorithm.name);
}
+ return result;
});
File directory = repo.getDirectory();
@@ -338,12 +334,9 @@ class DiffAlgorithms extends TextBuiltin {
}
}
}
- } catch (IllegalArgumentException e) {
- throw die("Cannot determine names", e); //$NON-NLS-1$
- } catch (IllegalAccessException e) {
+ } catch (IllegalArgumentException | IllegalAccessException e) {
throw die("Cannot determine names", e); //$NON-NLS-1$
}
-
return all;
}
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 300a01d246..a2ea8c20b4 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
@@ -403,9 +403,7 @@ class TextHashFunctions extends TextBuiltin {
folds.add(fold);
}
}
- } catch (IllegalArgumentException e) {
- throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$
- } catch (IllegalAccessException e) {
+ } catch (IllegalArgumentException | IllegalAccessException e) {
throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
index b38de14af9..15b6ff9a9a 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
@@ -189,7 +189,7 @@ class VerifyReftable extends TextBuiltin {
return;
}
- if (!AnyObjectId.equals(exp.getObjectId(), act.getObjectId())) {
+ if (!AnyObjectId.isEqual(exp.getObjectId(), act.getObjectId())) {
throw die(String.format("expected %s to be %s, found %s",
exp.getName(),
id(exp.getObjectId()),
@@ -197,7 +197,8 @@ class VerifyReftable extends TextBuiltin {
}
if (exp.getPeeledObjectId() != null
- && !AnyObjectId.equals(exp.getPeeledObjectId(), act.getPeeledObjectId())) {
+ && !AnyObjectId.isEqual(exp.getPeeledObjectId(),
+ act.getPeeledObjectId())) {
throw die(String.format("expected %s to be %s, found %s",
exp.getName(),
id(exp.getPeeledObjectId()),
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 d0288a809e..7b9401f362 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
@@ -138,7 +138,6 @@ public class CLIText extends TranslationBundle {
/***/ public String cacheTreePathInfo;
/***/ public String configFileNotFound;
/***/ public String cannotBeRenamed;
- /***/ public String cannotChekoutNoHeadsAdvertisedByRemote;
/***/ public String cannotCombineSquashWithNoff;
/***/ public String cannotCreateCommand;
/***/ public String cannotCreateOutputStream;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
index a14f6514fe..213d9875db 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
@@ -133,10 +133,7 @@ public class AbstractTreeIteratorHandler extends
final CanonicalTreeParser p = new CanonicalTreeParser();
try (ObjectReader curs = clp.getRepository().newObjectReader()) {
p.reset(curs, clp.getRevWalk().parseTree(id));
- } catch (MissingObjectException e) {
- throw new CmdLineException(clp,
- CLIText.format(CLIText.get().notATree), name);
- } catch (IncorrectObjectTypeException e) {
+ } catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name);
} catch (IOException e) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
index d99f88e35b..4a50708b4c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
@@ -96,7 +96,7 @@ public class PathTreeFilterHandler extends OptionHandler<TreeFilter> {
filters.add(PathFilter.create(path));
}
- if (filters.size() == 0)
+ if (filters.isEmpty())
return 0;
if (filters.size() == 1) {
setter.addValue(filters.get(0));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
index b925e31f85..d4effa3a10 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
@@ -130,10 +130,7 @@ public class RevCommitHandler extends OptionHandler<RevCommit> {
final RevCommit c;
try {
c = clp.getRevWalk().parseCommit(id);
- } catch (MissingObjectException e) {
- throw new CmdLineException(clp,
- CLIText.format(CLIText.get().notACommit), name);
- } catch (IncorrectObjectTypeException e) {
+ } catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp,
CLIText.format(CLIText.get().notACommit), name);
} catch (IOException e) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
index 85922a27ba..19841f633a 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
@@ -102,10 +102,7 @@ public class RevTreeHandler extends OptionHandler<RevTree> {
final RevTree c;
try {
c = clp.getRevWalk().parseTree(id);
- } catch (MissingObjectException e) {
- throw new CmdLineException(clp,
- CLIText.format(CLIText.get().notATree), name);
- } catch (IncorrectObjectTypeException e) {
+ } catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name);
} catch (IOException e) {
diff --git a/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2174e4fd5b
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.ssh.apache.test/BUILD b/org.eclipse.jgit.ssh.apache.test/BUILD
index a13cf0b30f..18a48dca09 100644
--- a/org.eclipse.jgit.ssh.apache.test/BUILD
+++ b/org.eclipse.jgit.ssh.apache.test/BUILD
@@ -10,7 +10,7 @@ junit_tests(
deps = [
"//lib:eddsa",
"//lib:junit",
- "//lib:sshd-core",
+ "//lib:sshd-osgi",
"//lib:sshd-sftp",
"//org.eclipse.jgit:jgit",
"//org.eclipse.jgit.ssh.apache:ssh-apache",
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 35b27fecec..a97bf780f3 100644
--- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
@@ -3,17 +3,17 @@ 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: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Vendor: %Provider-Name
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit.ssh;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.ssh;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.sshd;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+Import-Package: org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.ssh;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.sshd;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
org.junit;version="[4.12,5.0.0)",
org.junit.experimental.theories;version="[4.12,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)"
diff --git a/org.eclipse.jgit.ssh.apache.test/pom.xml b/org.eclipse.jgit.ssh.apache.test/pom.xml
index 40bdbbbad7..00bd403437 100644
--- a/org.eclipse.jgit.ssh.apache.test/pom.xml
+++ b/org.eclipse.jgit.ssh.apache.test/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
diff --git a/org.eclipse.jgit.ssh.apache/BUILD b/org.eclipse.jgit.ssh.apache/BUILD
index a1a6c8e24c..372cfc228f 100644
--- a/org.eclipse.jgit.ssh.apache/BUILD
+++ b/org.eclipse.jgit.ssh.apache/BUILD
@@ -12,7 +12,7 @@ java_library(
deps = [
"//lib:eddsa",
"//lib:slf4j-api",
- "//lib:sshd-core",
+ "//lib:sshd-osgi",
"//lib:sshd-sftp",
"//org.eclipse.jgit:jgit",
],
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
index 105b0a1812..1aecee0542 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
@@ -5,9 +5,9 @@ Automatic-Module-Name: org.eclipse.jgit.ssh.apache
Bundle-SymbolicName: org.eclipse.jgit.ssh.apache
Bundle-Vendor: %Provider-Name
Bundle-ActivationPolicy: lazy
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.3.3";x-internal:=true;
+Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.4.1";x-internal:=true;
uses:="org.apache.sshd.client,
org.apache.sshd.client.auth,
org.apache.sshd.client.auth.keyboard,
@@ -22,9 +22,9 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.3.3";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="5.3.3";x-internal:=true,
- org.eclipse.jgit.internal.transport.sshd.proxy;version="5.3.3";x-friends:="org.eclipse.jgit.ssh.apache.test",
- org.eclipse.jgit.transport.sshd;version="5.3.3";
+ org.eclipse.jgit.internal.transport.sshd.auth;version="5.4.1";x-internal:=true,
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="5.4.1";x-friends:="org.eclipse.jgit.ssh.apache.test",
+ org.eclipse.jgit.transport.sshd;version="5.4.1";
uses:="org.eclipse.jgit.transport,
org.apache.sshd.client.config.hosts,
org.apache.sshd.common.keyprovider,
@@ -32,52 +32,54 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.3.3";x-inter
org.apache.sshd.client.session,
org.apache.sshd.client.keyverifier"
Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)",
- org.apache.sshd.agent;version="[2.0.0,2.1.0)",
- org.apache.sshd.client;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.auth;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.auth.keyboard;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.auth.password;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.auth.pubkey;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.channel;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.config.hosts;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.config.keys;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.future;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.keyverifier;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.session;version="[2.0.0,2.1.0)",
- org.apache.sshd.client.subsystem.sftp;version="[2.0.0,2.1.0)",
- org.apache.sshd.common;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.auth;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.channel;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.compression;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.config.keys;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.config.keys.loader;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.digest;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.forward;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.future;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.helpers;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.io;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.kex;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.keyprovider;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.mac;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.random;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.session;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.session.helpers;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.signature;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.subsystem.sftp;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.buffer;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.closeable;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.io;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.logging;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.net;version="[2.0.0,2.1.0)",
- org.apache.sshd.common.util.security;version="[2.0.0,2.1.0)",
- org.apache.sshd.server.auth;version="[2.0.0,2.1.0)",
- org.eclipse.jgit.annotations;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.fnmatch;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
+ org.apache.sshd.agent;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.auth;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.auth.keyboard;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.auth.password;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.auth.pubkey;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.channel;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.config.hosts;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.config.keys;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.future;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.keyverifier;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.session;version="[2.2.0,2.3.0)",
+ org.apache.sshd.client.subsystem.sftp;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.auth;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.channel;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.compression;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.config.keys;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.config.keys.loader;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.config.keys.loader.openssh.kdf;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.digest;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.forward;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.future;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.helpers;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.io;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.kex;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.keyprovider;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.mac;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.random;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.session;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.session.helpers;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.signature;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.subsystem.sftp;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.buffer;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.closeable;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.io;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.io.resource;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.logging;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.net;version="[2.2.0,2.3.0)",
+ org.apache.sshd.common.util.security;version="[2.2.0,2.3.0)",
+ org.apache.sshd.server.auth;version="[2.2.0,2.3.0)",
+ org.eclipse.jgit.annotations;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.fnmatch;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.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 c76ba5a30d..deae0d4cf0 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: 5.3.3.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.3.3.qualifier";roots="."
+Bundle-Version: 5.4.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.4.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml
index 99100cdc9c..a7f5bae354 100644
--- a/org.eclipse.jgit.ssh.apache/pom.xml
+++ b/org.eclipse.jgit.ssh.apache/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
@@ -75,7 +75,7 @@
<dependency>
<groupId>org.apache.sshd</groupId>
- <artifactId>sshd-core</artifactId>
+ <artifactId>sshd-osgi</artifactId>
<version>${apache-sshd-version}</version>
</dependency>
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
index 1072f32548..a1ec31883d 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
@@ -45,10 +45,13 @@ package org.eclipse.jgit.internal.transport.sshd;
import static java.text.MessageFormat.format;
import java.io.IOException;
+import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.GeneralSecurityException;
+import java.security.InvalidKeyException;
import java.security.KeyPair;
+import java.security.PrivateKey;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -57,13 +60,20 @@ import java.util.List;
import java.util.NoSuchElementException;
import java.util.concurrent.CancellationException;
+import javax.security.auth.DestroyFailedException;
+
+import org.apache.sshd.common.NamedResource;
+import org.apache.sshd.common.config.keys.FilePasswordProvider;
+import org.apache.sshd.common.keyprovider.FileKeyPairProvider;
+import org.apache.sshd.common.session.SessionContext;
+import org.apache.sshd.common.util.io.resource.IoResource;
+import org.apache.sshd.common.util.security.SecurityUtils;
import org.eclipse.jgit.transport.sshd.KeyCache;
/**
- * A {@link EncryptedFileKeyPairProvider} that uses an external
- * {@link KeyCache}.
+ * A {@link FileKeyPairProvider} that uses an external {@link KeyCache}.
*/
-public class CachingKeyPairProvider extends EncryptedFileKeyPairProvider
+public class CachingKeyPairProvider extends FileKeyPairProvider
implements Iterable<KeyPair> {
private final KeyCache cache;
@@ -71,7 +81,7 @@ public class CachingKeyPairProvider extends EncryptedFileKeyPairProvider
/**
* Creates a new {@link CachingKeyPairProvider} using the given
* {@link KeyCache}. If the cache is {@code null}, this is a simple
- * {@link EncryptedFileKeyPairProvider}.
+ * {@link FileKeyPairProvider}.
*
* @param paths
* to load keys from
@@ -85,36 +95,36 @@ public class CachingKeyPairProvider extends EncryptedFileKeyPairProvider
@Override
public Iterator<KeyPair> iterator() {
+ return iterator(null);
+ }
+
+ private Iterator<KeyPair> iterator(SessionContext session) {
Collection<? extends Path> resources = getPaths();
if (resources.isEmpty()) {
return Collections.emptyListIterator();
}
- return new CancellingKeyPairIterator(resources);
+ return new CancellingKeyPairIterator(session, resources);
}
@Override
- public Iterable<KeyPair> loadKeys() {
- return this;
+ public Iterable<KeyPair> loadKeys(SessionContext session) {
+ return () -> iterator(session);
}
- @Override
- protected KeyPair doLoadKey(Path resource)
+ private KeyPair loadKey(SessionContext session, Path path)
throws IOException, GeneralSecurityException {
- if (!Files.exists(resource)) {
- log.warn(format(SshdText.get().identityFileNotFound, resource));
+ if (!Files.exists(path)) {
+ log.warn(format(SshdText.get().identityFileNotFound, path));
return null;
}
- // By calling doLoadKey(String, Path, FilePasswordProvider) instead of
- // super.doLoadKey(Path) we can bypass the key caching in
- // AbstractResourceKeyPairProvider, over which we have no real control.
- String resourceId = resource.toString();
+ IoResource<Path> resource = getIoResource(session, path);
if (cache == null) {
- return doLoadKey(resourceId, resource, getPasswordFinder());
+ return loadKey(session, resource, path, getPasswordFinder());
}
Throwable t[] = { null };
- KeyPair key = cache.get(resource, p -> {
+ KeyPair key = cache.get(path, p -> {
try {
- return doLoadKey(resourceId, p, getPasswordFinder());
+ return loadKey(session, resource, p, getPasswordFinder());
} catch (IOException | GeneralSecurityException e) {
t[0] = e;
return null;
@@ -130,18 +140,55 @@ public class CachingKeyPairProvider extends EncryptedFileKeyPairProvider
return key;
}
+ private KeyPair loadKey(SessionContext session, NamedResource resource,
+ Path path, FilePasswordProvider passwordProvider)
+ throws IOException, GeneralSecurityException {
+ try (InputStream stream = Files.newInputStream(path)) {
+ Iterable<KeyPair> ids = SecurityUtils.loadKeyPairIdentities(session,
+ resource, stream, passwordProvider);
+ if (ids == null) {
+ throw new InvalidKeyException(
+ format(SshdText.get().identityFileNoKey, path));
+ }
+ Iterator<KeyPair> keys = ids.iterator();
+ if (!keys.hasNext()) {
+ throw new InvalidKeyException(format(
+ SshdText.get().identityFileUnsupportedFormat, path));
+ }
+ KeyPair result = keys.next();
+ if (keys.hasNext()) {
+ log.warn(format(SshdText.get().identityFileMultipleKeys, path));
+ keys.forEachRemaining(k -> {
+ PrivateKey pk = k.getPrivate();
+ if (pk != null) {
+ try {
+ pk.destroy();
+ } catch (DestroyFailedException e) {
+ // Ignore
+ }
+ }
+ });
+ }
+ return result;
+ }
+ }
+
private class CancellingKeyPairIterator implements Iterator<KeyPair> {
+ private final SessionContext context;
+
private final Iterator<Path> paths;
private KeyPair nextItem;
private boolean nextSet;
- public CancellingKeyPairIterator(Collection<? extends Path> resources) {
+ public CancellingKeyPairIterator(SessionContext session,
+ Collection<? extends Path> resources) {
List<Path> copy = new ArrayList<>(resources.size());
copy.addAll(resources);
paths = copy.iterator();
+ context = session;
}
@Override
@@ -152,7 +199,7 @@ public class CachingKeyPairProvider extends EncryptedFileKeyPairProvider
nextSet = true;
while (nextItem == null && paths.hasNext()) {
try {
- nextItem = doLoadKey(paths.next());
+ nextItem = loadKey(context, paths.next());
} catch (CancellationException cancelled) {
throw cancelled;
} catch (Exception other) {
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/EncryptedFileKeyPairProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/EncryptedFileKeyPairProvider.java
deleted file mode 100644
index ef8e611811..0000000000
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/EncryptedFileKeyPairProvider.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.internal.transport.sshd;
-
-import static java.text.MessageFormat.format;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.file.Path;
-import java.security.GeneralSecurityException;
-import java.security.InvalidKeyException;
-import java.security.KeyPair;
-import java.security.NoSuchProviderException;
-import java.security.PrivateKey;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.security.auth.DestroyFailedException;
-
-import org.apache.sshd.common.config.keys.FilePasswordProvider;
-import org.apache.sshd.common.config.keys.loader.KeyPairResourceParser;
-import org.apache.sshd.common.keyprovider.FileKeyPairProvider;
-import org.apache.sshd.common.util.io.IoUtils;
-import org.apache.sshd.common.util.security.SecurityUtils;
-import org.eclipse.jgit.internal.transport.sshd.RepeatingFilePasswordProvider.ResourceDecodeResult;
-
-/**
- * A {@link FileKeyPairProvider} that asks repeatedly for a passphrase for an
- * encrypted private key if the {@link FilePasswordProvider} is a
- * {@link RepeatingFilePasswordProvider}.
- */
-public abstract class EncryptedFileKeyPairProvider extends FileKeyPairProvider {
-
- // TODO: remove this class once we're based on sshd > 2.1.0. See upstream
- // issue SSHD-850 https://issues.apache.org/jira/browse/SSHD-850 and commit
- // https://github.com/apache/mina-sshd/commit/f19bd2e34
-
- /**
- * Creates a new {@link EncryptedFileKeyPairProvider} for the given
- * {@link Path}s.
- *
- * @param paths
- * to read keys from
- */
- public EncryptedFileKeyPairProvider(List<Path> paths) {
- super(paths);
- }
-
- @Override
- protected KeyPair doLoadKey(String resourceKey, InputStream inputStream,
- FilePasswordProvider provider)
- throws IOException, GeneralSecurityException {
- if (!(provider instanceof RepeatingFilePasswordProvider)) {
- return super.doLoadKey(resourceKey, inputStream, provider);
- }
- KeyPairResourceParser parser = SecurityUtils.getKeyPairResourceParser();
- if (parser == null) {
- // This is an internal configuration error, thus no translation.
- throw new NoSuchProviderException(
- "No registered key-pair resource parser"); //$NON-NLS-1$
- }
- RepeatingFilePasswordProvider realProvider = (RepeatingFilePasswordProvider) provider;
- // Read the stream now so that we can process the content several
- // times.
- List<String> lines = IoUtils.readAllLines(inputStream);
- Collection<KeyPair> ids = null;
- while (ids == null) {
- try {
- ids = parser.loadKeyPairs(resourceKey, realProvider, lines);
- realProvider.handleDecodeAttemptResult(resourceKey, "", null); //$NON-NLS-1$
- // No exception; success. Exit the loop even if ids is still
- // null!
- break;
- } catch (IOException | GeneralSecurityException
- | RuntimeException e) {
- ResourceDecodeResult loadResult = realProvider
- .handleDecodeAttemptResult(resourceKey, "", e); //$NON-NLS-1$
- if (loadResult == null
- || loadResult == ResourceDecodeResult.TERMINATE) {
- throw e;
- } else if (loadResult == ResourceDecodeResult.RETRY) {
- continue;
- }
- // IGNORE doesn't make any sense here, but OK, let's ignore it.
- // ids == null, so we'll throw an exception below.
- break;
- }
- }
- if (ids == null) {
- // The javadoc on loadKeyPairs says it might return null if no
- // key pair found. Bad API.
- throw new InvalidKeyException(
- format(SshdText.get().identityFileNoKey, resourceKey));
- }
- Iterator<KeyPair> keys = ids.iterator();
- if (!keys.hasNext()) {
- throw new InvalidKeyException(format(
- SshdText.get().identityFileUnsupportedFormat, resourceKey));
- }
- KeyPair result = keys.next();
- if (keys.hasNext()) {
- log.warn(format(SshdText.get().identityFileMultipleKeys,
- resourceKey));
- keys.forEachRemaining(k -> {
- PrivateKey pk = k.getPrivate();
- if (pk != null) {
- try {
- pk.destroy();
- } catch (DestroyFailedException e) {
- // Ignore
- }
- }
- });
- }
- return result;
- }
-}
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 dcf330a2a4..56f8ade667 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
@@ -46,6 +46,7 @@ import static java.text.MessageFormat.format;
import java.io.IOException;
import java.net.SocketAddress;
+import java.security.GeneralSecurityException;
import java.security.PublicKey;
import java.util.ArrayList;
import java.util.Iterator;
@@ -173,7 +174,8 @@ public class JGitClientSession extends ClientSessionImpl {
}
@Override
- protected byte[] sendKexInit() throws IOException {
+ protected byte[] sendKexInit()
+ throws IOException, GeneralSecurityException {
StatefulProxyConnector proxy = proxyHandler;
if (proxy != null) {
try {
@@ -187,7 +189,7 @@ public class JGitClientSession extends ClientSessionImpl {
// This is called only from the ClientSessionImpl
// constructor, where the return value is ignored.
return null;
- } catch (IOException e) {
+ } catch (IOException | GeneralSecurityException e) {
throw e;
} catch (Exception other) {
throw new IOException(other.getLocalizedMessage(), other);
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitHostConfigEntry.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitHostConfigEntry.java
index 7b22b88ab7..21e8beaeb4 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitHostConfigEntry.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitHostConfigEntry.java
@@ -53,28 +53,11 @@ import org.eclipse.jgit.annotations.NonNull;
* A {@link HostConfigEntry} that provides access to the multi-valued keys as
* lists of strings. The super class treats them as single strings containing
* comma-separated lists.
- *
*/
public class JGitHostConfigEntry extends HostConfigEntry {
private Map<String, List<String>> multiValuedOptions;
- @Override
- public String getProperty(String name, String defaultValue) {
- // Upstream bug fix (SSHD-867): if there are _no_ properties at all, the
- // super implementation returns always null even if a default value is
- // given.
- //
- // See https://issues.apache.org/jira/projects/SSHD/issues/SSHD-867
- //
- // TODO: remove this override once we're based on sshd > 2.1.0
- Map<String, String> properties = getProperties();
- if (properties == null || properties.isEmpty()) {
- return defaultValue;
- }
- return super.getProperty(name, defaultValue);
- }
-
/**
* Sets the multi-valued options.
*
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyIterator.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyIterator.java
deleted file mode 100644
index cda12623d8..0000000000
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyIterator.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.internal.transport.sshd;
-
-import java.io.IOException;
-import java.nio.channels.Channel;
-import java.security.KeyPair;
-import java.security.PublicKey;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.sshd.agent.SshAgent;
-import org.apache.sshd.agent.SshAgentFactory;
-import org.apache.sshd.client.auth.pubkey.AbstractKeyPairIterator;
-import org.apache.sshd.client.auth.pubkey.KeyAgentIdentity;
-import org.apache.sshd.client.auth.pubkey.KeyPairIdentity;
-import org.apache.sshd.client.auth.pubkey.PublicKeyIdentity;
-import org.apache.sshd.client.config.hosts.HostConfigEntry;
-import org.apache.sshd.client.session.ClientSession;
-import org.apache.sshd.common.FactoryManager;
-import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
-import org.apache.sshd.common.signature.SignatureFactoriesManager;
-
-/**
- * A new iterator over key pairs that we use instead of the default
- * {@link org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyIterator}, which
- * in its constructor does some strange {@link java.util.stream.Stream} "magic"
- * that ends up loading keys prematurely. This class uses plain
- * {@link Iterator}s instead to avoid that problem. Used in
- * {@link JGitPublicKeyAuthentication}.
- *
- * @see <a href=
- * "https://issues.apache.org/jira/projects/SSHD/issues/SSHD-860">Upstream
- * issue SSHD-860</a>
- */
-public class JGitPublicKeyIterator
- extends AbstractKeyPairIterator<PublicKeyIdentity> implements Channel {
-
- // Re: the cause for the problem mentioned above has not been determined.
- // It looks as if either the Apache code inadvertently calls
- // GenericUtils.isEmpty() on all streams (which would load the first key
- // of each stream), or the Java stream implementation does some prefetching.
- // It's not entirely clear. Using Iterators we have more control over
- // what happens when.
-
- private final AtomicBoolean open = new AtomicBoolean(true);
-
- private SshAgent agent;
-
- private final List<Iterator<PublicKeyIdentity>> keys = new ArrayList<>(3);
-
- private final Iterator<Iterator<PublicKeyIdentity>> keyIter;
-
- private Iterator<PublicKeyIdentity> current;
-
- private Boolean hasElement;
-
- /**
- * Creates a new {@link JGitPublicKeyIterator}.
- *
- * @param session
- * we're trying to authenticate
- * @param signatureFactories
- * to use
- * @throws Exception
- * if an {@link SshAgentFactory} is configured and getting
- * identities from the agent fails
- */
- public JGitPublicKeyIterator(ClientSession session,
- SignatureFactoriesManager signatureFactories) throws Exception {
- super(session);
- boolean useAgent = true;
- if (session instanceof JGitClientSession) {
- HostConfigEntry config = ((JGitClientSession) session)
- .getHostConfigEntry();
- useAgent = !config.isIdentitiesOnly();
- }
- if (useAgent) {
- FactoryManager manager = session.getFactoryManager();
- SshAgentFactory factory = manager == null ? null
- : manager.getAgentFactory();
- if (factory != null) {
- try {
- agent = factory.createClient(manager);
- keys.add(new AgentIdentityIterator(agent));
- } catch (IOException e) {
- try {
- closeAgent();
- } catch (IOException err) {
- e.addSuppressed(err);
- }
- throw e;
- }
- }
- }
- keys.add(
- new KeyPairIdentityIterator(session.getRegisteredIdentities(),
- session, signatureFactories));
- keys.add(new KeyPairIdentityIterator(session.getKeyPairProvider(),
- session, signatureFactories));
- keyIter = keys.iterator();
- }
-
- @Override
- public boolean isOpen() {
- return open.get();
- }
-
- @Override
- public void close() throws IOException {
- if (open.getAndSet(false)) {
- closeAgent();
- }
- }
-
- @Override
- public boolean hasNext() {
- if (!isOpen()) {
- return false;
- }
- if (hasElement != null) {
- return hasElement.booleanValue();
- }
- while (current == null || !current.hasNext()) {
- if (keyIter.hasNext()) {
- current = keyIter.next();
- } else {
- current = null;
- hasElement = Boolean.FALSE;
- return false;
- }
- }
- hasElement = Boolean.TRUE;
- return true;
- }
-
- @Override
- public PublicKeyIdentity next() {
- if (!isOpen() || hasElement == null && !hasNext()
- || !hasElement.booleanValue()) {
- throw new NoSuchElementException();
- }
- hasElement = null;
- PublicKeyIdentity result;
- try {
- result = current.next();
- } catch (NoSuchElementException e) {
- result = null;
- }
- return result;
- }
-
- private void closeAgent() throws IOException {
- if (agent == null) {
- return;
- }
- try {
- agent.close();
- } finally {
- agent = null;
- }
- }
-
- /**
- * An {@link Iterator} that maps the data obtained from an agent to
- * {@link PublicKeyIdentity}.
- */
- private static class AgentIdentityIterator
- implements Iterator<PublicKeyIdentity> {
-
- private final SshAgent agent;
-
- private final Iterator<? extends Map.Entry<PublicKey, String>> iter;
-
- public AgentIdentityIterator(SshAgent agent) throws IOException {
- this.agent = agent;
- iter = agent == null ? null : agent.getIdentities().iterator();
- }
-
- @Override
- public boolean hasNext() {
- return iter != null && iter.hasNext();
- }
-
- @Override
- public PublicKeyIdentity next() {
- if (iter == null) {
- throw new NoSuchElementException();
- }
- Map.Entry<PublicKey, String> entry = iter.next();
- return new KeyAgentIdentity(agent, entry.getKey(),
- entry.getValue());
- }
- }
-
- /**
- * An {@link Iterator} that maps {@link KeyPair} to
- * {@link PublicKeyIdentity}.
- */
- private static class KeyPairIdentityIterator
- implements Iterator<PublicKeyIdentity> {
-
- private final Iterator<KeyPair> keyPairs;
-
- private final ClientSession session;
-
- private final SignatureFactoriesManager signatureFactories;
-
- public KeyPairIdentityIterator(KeyIdentityProvider provider,
- ClientSession session,
- SignatureFactoriesManager signatureFactories) {
- this.session = session;
- this.signatureFactories = signatureFactories;
- keyPairs = provider == null ? null : provider.loadKeys().iterator();
- }
-
- @Override
- public boolean hasNext() {
- return keyPairs != null && keyPairs.hasNext();
- }
-
- @Override
- public PublicKeyIdentity next() {
- if (keyPairs == null) {
- throw new NoSuchElementException();
- }
- KeyPair key = keyPairs.next();
- return new KeyPairIdentity(signatureFactories, session, key);
- }
- }
-}
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 b9ff5e5208..98e71dfe4b 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
@@ -48,10 +48,12 @@ import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.positive
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
+import java.net.SocketAddress;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.security.GeneralSecurityException;
import java.security.KeyPair;
import java.util.Arrays;
import java.util.Iterator;
@@ -66,12 +68,14 @@ import org.apache.sshd.client.future.ConnectFuture;
import org.apache.sshd.client.future.DefaultConnectFuture;
import org.apache.sshd.client.session.ClientSessionImpl;
import org.apache.sshd.client.session.SessionFactory;
+import org.apache.sshd.common.AttributeRepository;
import org.apache.sshd.common.config.keys.FilePasswordProvider;
import org.apache.sshd.common.future.SshFutureListener;
import org.apache.sshd.common.io.IoConnectFuture;
import org.apache.sshd.common.io.IoSession;
import org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider;
-import org.apache.sshd.common.keyprovider.KeyPairProvider;
+import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
+import org.apache.sshd.common.session.SessionContext;
import org.apache.sshd.common.session.helpers.AbstractSession;
import org.apache.sshd.common.util.ValidateUtils;
import org.eclipse.jgit.internal.transport.sshd.proxy.HttpClientConnector;
@@ -117,7 +121,8 @@ public class JGitSshClient extends SshClient {
}
@Override
- public ConnectFuture connect(HostConfigEntry hostConfig)
+ public ConnectFuture connect(HostConfigEntry hostConfig,
+ AttributeRepository context, SocketAddress localAddress)
throws IOException {
if (connector == null) {
throw new IllegalStateException("SshClient not started."); //$NON-NLS-1$
@@ -149,7 +154,7 @@ public class JGitSshClient extends SshClient {
address = configureProxy(proxy, address);
proxy.clearPassword();
}
- connector.connect(address).addListener(listener);
+ connector.connect(address, this, localAddress).addListener(listener);
return connectFuture;
}
@@ -263,16 +268,16 @@ public class JGitSshClient extends SshClient {
identities, keyCache);
ourConfiguredKeysProvider.setPasswordFinder(passwordProvider);
if (hostConfig.isIdentitiesOnly()) {
- session.setKeyPairProvider(ourConfiguredKeysProvider);
+ session.setKeyIdentityProvider(ourConfiguredKeysProvider);
} else {
- KeyPairProvider defaultKeysProvider = getKeyPairProvider();
+ KeyIdentityProvider defaultKeysProvider = getKeyIdentityProvider();
if (defaultKeysProvider instanceof AbstractResourceKeyPairProvider<?>) {
((AbstractResourceKeyPairProvider<?>) defaultKeysProvider)
.setPasswordFinder(passwordProvider);
}
- KeyPairProvider combinedProvider = new CombinedKeyPairProvider(
+ KeyIdentityProvider combinedProvider = new CombinedKeyIdentityProvider(
ourConfiguredKeysProvider, defaultKeysProvider);
- session.setKeyPairProvider(combinedProvider);
+ session.setKeyIdentityProvider(combinedProvider);
}
return session;
}
@@ -363,39 +368,30 @@ public class JGitSshClient extends SshClient {
}
/**
- * A {@link KeyPairProvider} that iterates over the {@link Iterable}s
- * returned by other {@link KeyPairProvider}s.
+ * A {@link KeyIdentityProvider} that iterates over the {@link Iterable}s
+ * returned by other {@link KeyIdentityProvider}s.
*/
- private static class CombinedKeyPairProvider implements KeyPairProvider {
+ private static class CombinedKeyIdentityProvider
+ implements KeyIdentityProvider {
- private final List<KeyPairProvider> providers;
+ private final List<KeyIdentityProvider> providers;
- public CombinedKeyPairProvider(KeyPairProvider... providers) {
+ public CombinedKeyIdentityProvider(KeyIdentityProvider... providers) {
this(Arrays.stream(providers).filter(Objects::nonNull)
.collect(Collectors.toList()));
}
- public CombinedKeyPairProvider(List<KeyPairProvider> providers) {
+ public CombinedKeyIdentityProvider(
+ List<KeyIdentityProvider> providers) {
this.providers = providers;
}
@Override
- public Iterable<String> getKeyTypes() {
- throw new UnsupportedOperationException(
- "Should not have been called in a ssh client"); //$NON-NLS-1$
- }
-
- @Override
- public KeyPair loadKey(String type) {
- throw new UnsupportedOperationException(
- "Should not have been called in a ssh client"); //$NON-NLS-1$
- }
-
- @Override
- public Iterable<KeyPair> loadKeys() {
+ public Iterable<KeyPair> loadKeys(SessionContext context) {
return () -> new Iterator<KeyPair>() {
- private Iterator<KeyPairProvider> factories = providers.iterator();
+ private Iterator<KeyIdentityProvider> factories = providers
+ .iterator();
private Iterator<KeyPair> current;
private Boolean hasElement;
@@ -407,7 +403,12 @@ public class JGitSshClient extends SshClient {
}
while (current == null || !current.hasNext()) {
if (factories.hasNext()) {
- current = factories.next().loadKeys().iterator();
+ try {
+ current = factories.next().loadKeys(context)
+ .iterator();
+ } catch (IOException | GeneralSecurityException e) {
+ throw new RuntimeException(e);
+ }
} else {
current = null;
hasElement = Boolean.FALSE;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java
index 984643961f..6468b3e276 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java
@@ -47,11 +47,13 @@ import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.positive
import java.io.File;
import java.io.IOException;
+import java.net.SocketAddress;
import java.util.Map;
import java.util.TreeMap;
import org.apache.sshd.client.config.hosts.HostConfigEntry;
import org.apache.sshd.client.config.hosts.HostConfigEntryResolver;
+import org.apache.sshd.common.AttributeRepository;
import org.apache.sshd.common.util.net.SshdSocketAddress;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile;
@@ -101,7 +103,8 @@ public class JGitSshConfig implements HostConfigEntryResolver {
@Override
public HostConfigEntry resolveEffectiveHost(String host, int port,
- String username) throws IOException {
+ SocketAddress localAddress, String username,
+ AttributeRepository attributes) throws IOException {
HostEntry entry = configFile.lookup(host, port, username);
JGitHostConfigEntry config = new JGitHostConfigEntry();
// Apache MINA conflates all keys, even multi-valued ones, in one map
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyVerifier.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyVerifier.java
index 7d8f3fd39c..381f7cfc22 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyVerifier.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyVerifier.java
@@ -60,6 +60,7 @@ import java.nio.file.Paths;
import java.security.GeneralSecurityException;
import java.security.PublicKey;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
@@ -586,9 +587,7 @@ public class OpenSshServerKeyVerifier
KeyUtils.getFingerPrint(BuiltinDigests.sha256, expected),
KeyUtils.getFingerPrint(BuiltinDigests.md5, actual),
KeyUtils.getFingerPrint(BuiltinDigests.sha256, actual));
- for (String line : warning.split("\n")) { //$NON-NLS-1$
- messages.add(line);
- }
+ messages.addAll(Arrays.asList(warning.split("\n"))); //$NON-NLS-1$
CredentialsProvider provider = getCredentialsProvider(
clientSession);
@@ -673,7 +672,7 @@ public class OpenSshServerKeyVerifier
continue;
}
try {
- PublicKey serverKey = keyPart.resolvePublicKey(
+ PublicKey serverKey = keyPart.resolvePublicKey(null,
PublicKeyEntryResolver.IGNORING);
if (serverKey == null) {
LOG.warn(format(
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/PasswordProviderWrapper.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/PasswordProviderWrapper.java
index 93bd10285a..bec65f1d3a 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/PasswordProviderWrapper.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/PasswordProviderWrapper.java
@@ -50,6 +50,8 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.sshd.common.NamedResource;
+import org.apache.sshd.common.session.SessionContext;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.transport.CredentialsProvider;
import org.eclipse.jgit.transport.URIish;
@@ -83,10 +85,12 @@ public class PasswordProviderWrapper implements RepeatingFilePasswordProvider {
}
@Override
- public String getPassword(String resourceKey) throws IOException {
+ public String getPassword(SessionContext session, NamedResource resource,
+ int attemptIndex) throws IOException {
+ String key = resource.getName();
int attempt = counts
- .computeIfAbsent(resourceKey, k -> new AtomicInteger()).get();
- char[] passphrase = delegate.getPassphrase(toUri(resourceKey), attempt);
+ .computeIfAbsent(key, k -> new AtomicInteger()).get();
+ char[] passphrase = delegate.getPassphrase(toUri(key), attempt);
if (passphrase == null) {
return null;
}
@@ -98,21 +102,23 @@ public class PasswordProviderWrapper implements RepeatingFilePasswordProvider {
}
@Override
- public ResourceDecodeResult handleDecodeAttemptResult(String resourceKey,
+ public ResourceDecodeResult handleDecodeAttemptResult(
+ SessionContext session, NamedResource resource, int retryIndex,
String password, Exception err)
throws IOException, GeneralSecurityException {
- AtomicInteger count = counts.get(resourceKey);
+ String key = resource.getName();
+ AtomicInteger count = counts.get(key);
int numberOfAttempts = count == null ? 0 : count.incrementAndGet();
ResourceDecodeResult result = null;
try {
- if (delegate.keyLoaded(toUri(resourceKey), numberOfAttempts, err)) {
+ if (delegate.keyLoaded(toUri(key), numberOfAttempts, err)) {
result = ResourceDecodeResult.RETRY;
} else {
result = ResourceDecodeResult.TERMINATE;
}
} finally {
if (result != ResourceDecodeResult.RETRY) {
- counts.remove(resourceKey);
+ counts.remove(key);
}
}
return result;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/RepeatingFilePasswordProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/RepeatingFilePasswordProvider.java
index e491cae130..977f1a22fe 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/RepeatingFilePasswordProvider.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/RepeatingFilePasswordProvider.java
@@ -42,9 +42,6 @@
*/
package org.eclipse.jgit.internal.transport.sshd;
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-
import org.apache.sshd.common.config.keys.FilePasswordProvider;
/**
@@ -74,42 +71,4 @@ public interface RepeatingFilePasswordProvider extends FilePasswordProvider {
return 1;
}
- // The following part of this interface is from the upstream resolution of
- // SSHD-850. See https://github.com/apache/mina-sshd/commit/f19bd2e34 .
- // TODO: remove this once we move to sshd > 2.1.0
-
- /**
- * Result value of
- * {@link RepeatingFilePasswordProvider#handleDecodeAttemptResult(String, String, Exception)}.
- */
- public enum ResourceDecodeResult {
- /** Re-throw the decoding exception. */
- TERMINATE,
- /** Retry the decoding process - including password prompt. */
- RETRY,
- /** Skip attempt and see if we can proceed without the key. */
- IGNORE;
- }
-
- /**
- * Invoked to inform the password provider about the decoding result.
- * <b>Note:</b> any exception thrown from this method (including if called
- * to inform about success) will be propagated instead of the original (if
- * any was reported)
- *
- * @param resourceKey
- * The resource key representing the <U>private</U> file
- * @param password
- * The password that was attempted
- * @param err
- * The attempt result - {@code null} for success
- * @return How to proceed in case of error - <u>ignored</u> if invoked in
- * order to report success. <b>Note:</b> {@code null} is same as
- * {@link ResourceDecodeResult#TERMINATE}.
- * @throws IOException
- * @throws GeneralSecurityException
- */
- ResourceDecodeResult handleDecodeAttemptResult(String resourceKey,
- String password, Exception err)
- throws IOException, GeneralSecurityException;
}
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 a257a5ebc8..6fa528daf5 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
@@ -145,18 +145,13 @@ public abstract class BasicAuthentication<ParameterType, TokenType>
*/
protected void askCredentials() {
clearPassword();
- PasswordAuthentication auth = AccessController
- .doPrivileged(new PrivilegedAction<PasswordAuthentication>() {
-
- @Override
- public PasswordAuthentication run() {
- return Authenticator.requestPasswordAuthentication(
- proxy.getHostString(), proxy.getAddress(),
- proxy.getPort(), SshConstants.SSH_SCHEME,
+ PasswordAuthentication auth = AccessController.doPrivileged(
+ (PrivilegedAction<PasswordAuthentication>) () -> Authenticator
+ .requestPasswordAuthentication(proxy.getHostString(),
+ proxy.getAddress(), proxy.getPort(),
+ SshConstants.SSH_SCHEME,
SshdText.get().proxyPasswordPrompt, "Basic", //$NON-NLS-1$
- null, RequestorType.PROXY);
- }
- });
+ null, RequestorType.PROXY));
if (auth == null) {
user = ""; //$NON-NLS-1$
throw new CancellationException(
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 7d0e686a28..1e8d7d1e1e 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
@@ -177,10 +177,7 @@ public class SshdSession implements RemoteSession {
timeoutMillis -= TimeUnit.NANOSECONDS
.toMillis(System.nanoTime() - start);
}
- } catch (IOException e) {
- exec.close(true);
- throw e;
- } catch (RuntimeException e) {
+ } catch (IOException | RuntimeException e) {
exec.close(true);
throw e;
}
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 cdd47bf323..90dc8ca500 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
@@ -64,18 +64,19 @@ import org.apache.sshd.client.ClientBuilder;
import org.apache.sshd.client.SshClient;
import org.apache.sshd.client.auth.UserAuth;
import org.apache.sshd.client.auth.keyboard.UserAuthKeyboardInteractiveFactory;
+import org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyFactory;
import org.apache.sshd.client.config.hosts.HostConfigEntryResolver;
import org.apache.sshd.client.keyverifier.ServerKeyVerifier;
import org.apache.sshd.common.NamedFactory;
import org.apache.sshd.common.compression.BuiltinCompressions;
import org.apache.sshd.common.config.keys.FilePasswordProvider;
-import org.apache.sshd.common.keyprovider.KeyPairProvider;
+import org.apache.sshd.common.config.keys.loader.openssh.kdf.BCryptKdfOptions;
+import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider;
import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory;
import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory;
-import org.eclipse.jgit.internal.transport.sshd.JGitPublicKeyAuthFactory;
import org.eclipse.jgit.internal.transport.sshd.JGitSshClient;
import org.eclipse.jgit.internal.transport.sshd.JGitSshConfig;
import org.eclipse.jgit.internal.transport.sshd.JGitUserInteraction;
@@ -157,6 +158,11 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
super();
this.keyCache = keyCache;
this.proxies = proxies;
+ // sshd limits the number of BCrypt KDF rounds to 255 by default.
+ // Decrypting such a key takes about two seconds on my machine.
+ // I consider this limit too low. The time increases linearly with the
+ // number of rounds.
+ BCryptKdfOptions.setMaxAllowedRounds(16384);
}
/** A simple general map key. */
@@ -211,7 +217,7 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
}
HostConfigEntryResolver configFile = getHostConfigEntryResolver(
home, sshDir);
- KeyPairProvider defaultKeysProvider = toKeyPairProvider(
+ KeyIdentityProvider defaultKeysProvider = toKeyIdentityProvider(
getDefaultKeys(sshDir));
KeyPasswordProvider passphrases = createKeyPasswordProvider(
credentialsProvider);
@@ -227,7 +233,7 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
client.setUserInteraction(
new JGitUserInteraction(credentialsProvider));
client.setUserAuthFactories(getUserAuthFactories());
- client.setKeyPairProvider(defaultKeysProvider);
+ client.setKeyIdentityProvider(defaultKeysProvider);
// JGit-specific things:
JGitSshClient jgitClient = (JGitSshClient) client;
jgitClient.setKeyCache(getKeyCache());
@@ -438,17 +444,18 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
/**
* Converts an {@link Iterable} of {link KeyPair}s into a
- * {@link KeyPairProvider}.
+ * {@link KeyIdentityProvider}.
*
* @param keys
- * to provide via the returned {@link KeyPairProvider}
- * @return a {@link KeyPairProvider} that provides the given {@code keys}
+ * to provide via the returned {@link KeyIdentityProvider}
+ * @return a {@link KeyIdentityProvider} that provides the given
+ * {@code keys}
*/
- private KeyPairProvider toKeyPairProvider(Iterable<KeyPair> keys) {
- if (keys instanceof KeyPairProvider) {
- return (KeyPairProvider) keys;
+ private KeyIdentityProvider toKeyIdentityProvider(Iterable<KeyPair> keys) {
+ if (keys instanceof KeyIdentityProvider) {
+ return (KeyIdentityProvider) keys;
}
- return () -> keys;
+ return (session) -> keys;
}
/**
@@ -522,7 +529,7 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable {
// Password auth doesn't have this problem.
return Collections.unmodifiableList(
Arrays.asList(GssApiWithMicAuthFactory.INSTANCE,
- JGitPublicKeyAuthFactory.INSTANCE,
+ UserAuthPublicKeyFactory.INSTANCE,
JGitPasswordAuthFactory.INSTANCE,
UserAuthKeyboardInteractiveFactory.INSTANCE));
}
diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..2174e4fd5b
--- /dev/null
+++ b/org.eclipse.jgit.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,34 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.no.automatic.module=1
+compilers.p.not-externalized-att=2
+compilers.p.service.component.without.lazyactivation=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD
index ca5b42e48d..f90a28030d 100644
--- a/org.eclipse.jgit.test/BUILD
+++ b/org.eclipse.jgit.test/BUILD
@@ -19,6 +19,7 @@ HELPERS = glob(
"nls/MissingPropertyBundle.java",
"nls/NoPropertiesBundle.java",
"nls/NonTranslatedBundle.java",
+ "revwalk/ReachabilityCheckerTestCase.java",
"revwalk/RevQueueTestCase.java",
"revwalk/RevWalkTestCase.java",
"transport/ObjectIdMatcher.java",
@@ -26,6 +27,7 @@ HELPERS = glob(
"treewalk/filter/AlwaysCloneTreeFilter.java",
"test/resources/SampleDataRepositoryTestCase.java",
"util/CPUTimeStopWatch.java",
+ "util/http/HttpCookiesMatcher.java",
"util/io/Strings.java",
]]
@@ -68,7 +70,7 @@ java_library(
deps = [
"//lib:jsch",
"//lib:junit",
- "//lib:sshd-core",
+ "//lib:sshd-osgi",
"//lib:sshd-sftp",
"//org.eclipse.jgit:jgit",
"//org.eclipse.jgit.junit:junit",
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index a1e94bfaa2..c6adef0bcf 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: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.test
Bundle-SymbolicName: org.eclipse.jgit.test
-Bundle-Version: 5.3.3.qualifier
+Bundle-Version: 5.4.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
@@ -17,57 +17,58 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.apache.commons.compress.compressors.bzip2;version="[1.15.0,2.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.bouncycastle.util.encoders;version="[1.60.0,2.0.0)",
- org.eclipse.jgit.annotations;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.api;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.api.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.archive;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.attributes;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.awtui;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.blame;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.diff;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.dircache;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.errors;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.events;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.fnmatch;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.gitrepo;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.hooks;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.ignore;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.ignore.internal;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.fsck;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.io;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.storage.reftree;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.internal.transport.parser;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit.ssh;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.junit.time;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lfs;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.merge;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.nls;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.notes;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.patch;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.pgm;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.pgm.internal;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revplot;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.revwalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.file;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.storage.pack;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.submodule;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.http;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.transport.resolver;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util.io;version="[5.3.3,5.4.0)",
- org.eclipse.jgit.util.sha1;version="[5.3.3,5.4.0)",
+ org.bouncycastle.util.encoders;version="[1.61.0,2.0.0)",
+ org.eclipse.jgit.annotations;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.api;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.api.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.archive;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.attributes;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.awtui;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.blame;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.diff;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.dircache;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.errors;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.events;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.fnmatch;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.gitrepo;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.hooks;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.ignore;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.ignore.internal;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.fsck;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.io;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.storage.reftree;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.transport.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.junit.time;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lfs;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.merge;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.nls;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.notes;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.patch;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.pgm;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.pgm.internal;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revplot;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.revwalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.file;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.storage.pack;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.submodule;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.http;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util.io;version="[5.4.1,5.5.0)",
+ org.eclipse.jgit.util.sha1;version="[5.4.1,5.5.0)",
org.junit;version="[4.12,5.0.0)",
org.junit.experimental.theories;version="[4.12,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)",
@@ -82,4 +83,4 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.tukaani.xz;version="[1.6.0,2.0)"
Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)",
org.hamcrest.library;bundle-version="[1.1.0,2.0.0)"
-Export-Package: org.eclipse.jgit.transport.ssh;version="5.3.3";x-friends:="org.eclipse.jgit.ssh.apache.test"
+Export-Package: org.eclipse.jgit.transport.ssh;version="5.4.1";x-friends:="org.eclipse.jgit.ssh.apache.test"
diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml
index e6ba6f8e69..7d930ff117 100644
--- a/org.eclipse.jgit.test/pom.xml
+++ b/org.eclipse.jgit.test/pom.xml
@@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.3-SNAPSHOT</version>
+ <version>5.4.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.test</artifactId>
@@ -197,7 +197,7 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>@{argLine} -Xmx1024m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}</argLine>
+ <argLine>@{argLine} -Xmx768m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}</argLine>
<includes>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass b/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass
new file mode 100644
index 0000000000..904cf302c2
--- /dev/null
+++ b/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass
@@ -0,0 +1,8 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABAsFN8vig
+Nw4/Ow6xbb7MAZAAABAAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIEZXZRjuttLufaP8
+wFD/i4lYPnKk01z46Jwv/9U4mPioAAAAkHLErPaXeC179rzXMaSwClstzsKvJ/Gqh2cY8d
+cWzymXtKZcivWMKesRHbC+1qRx53ofx15IzT5Fmg6NuNk4sm2s+lH8x8HN3CPWBfjGIelP
+iQUR6M6Y91mPigpRC2HUJmJIaFNdrRqFF84a5+qyK//tdy1fv4gNMLi5yPdXiL/Ttw05FS
+LkFikjfvSGZSO/MA==
+-----END OPENSSH PRIVATE KEY-----
diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub b/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub
new file mode 100644
index 0000000000..65038b5f4c
--- /dev/null
+++ b/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEZXZRjuttLufaP8wFD/i4lYPnKk01z46Jwv/9U4mPio test
diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java b/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java
index 5a01eae9b5..e6100e225d 100644
--- a/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java
+++ b/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java
@@ -43,6 +43,7 @@
package org.eclipse.jgit.lib;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@@ -50,8 +51,7 @@ public class Sets {
@SafeVarargs
public static <T> Set<T> of(T... elements) {
Set<T> ret = new HashSet<>();
- for (T element : elements)
- ret.add(element);
+ ret.addAll(Arrays.asList(elements));
return ret;
}
}
diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java b/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
index 2f367ba51f..b8c90b2a40 100644
--- a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
+++ b/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java
@@ -89,7 +89,9 @@ public abstract class SshTestBase extends SshTestHarness {
"id_rsa_4096_testpass", //
"id_ecdsa_256_testpass", //
"id_ecdsa_384_testpass", //
- "id_ecdsa_521_testpass" };
+ "id_ecdsa_521_testpass", //
+ "id_ed25519_testpass", //
+ "id_ed25519_expensive_testpass" };
protected File defaultCloneDir;
diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl
index d2f6d705b6..f27efccc23 100644
--- a/org.eclipse.jgit.test/tests.bzl
+++ b/org.eclipse.jgit.test/tests.bzl
@@ -46,7 +46,7 @@ def tests(tests):
additional_deps = [
"//lib:jsch",
"//lib:jzlib",
- "//lib:sshd-core",
+ "//lib:sshd-osgi",
"//lib:sshd-sftp",
":sshd-helpers",
]
@@ -54,6 +54,10 @@ def tests(tests):
additional_deps = [
"//lib:mockito",
]
+ if src.endswith("TransportHttpTest.java"):
+ additional_deps = [
+ "//lib:mockito",
+ ]
if src.endswith("ArchiveCommandTest.java"):
additional_deps = [
"//lib:commons-compress",
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-invalid.txt b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-invalid.txt
new file mode 100644
index 0000000000..bbc6a7329a
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-invalid.txt
@@ -0,0 +1 @@
+some-domain /some/path1 FALSE 0 key1 value1 \ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple1.txt b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple1.txt
new file mode 100644
index 0000000000..e06b38c712
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple1.txt
@@ -0,0 +1,2 @@
+some-domain1 TRUE /some/path1 FALSE 1893499200000 key1 valueFromSimple1
+some-domain1 TRUE /some/path1 FALSE 1893499200000 key2 valueFromSimple1 \ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple2.txt b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple2.txt
new file mode 100644
index 0000000000..4bf6723fda
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-simple2.txt
@@ -0,0 +1,2 @@
+some-domain1 TRUE /some/path1 FALSE 1893499200000 key1 valueFromSimple2
+some-domain1 TRUE /some/path1 FALSE 1893499200000 key3 valueFromSimple2 \ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-with-empty-and-comment-lines.txt b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-with-empty-and-comment-lines.txt
new file mode 100644
index 0000000000..a9b8a28153
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/internal/transport/http/cookies-with-empty-and-comment-lines.txt
@@ -0,0 +1,8 @@
+# first line is a comment
+# the next cookie is supposed to be removed, because it has expired already
+some-domain1 TRUE /some/path1 FALSE 0 key1 value1
+
+# expires date is 01/01/2030 @ 12:00am (UTC)
+#HttpOnly_.some-domain2 TRUE /some/path2 TRUE 1893499200000 key2 value2
+
+some-domain3 TRUE /some/path3 FALSE 1893499200000 key3 value3 \ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java
index 139f199f7a..c9852e8b83 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java
@@ -98,7 +98,7 @@ public class CleanCommandTest extends RepositoryTestCase {
StatusCommand command = git.status();
Status status = command.call();
Set<String> files = status.getUntracked();
- assertTrue(files.size() > 0);
+ assertFalse(files.isEmpty());
// run clean
Set<String> cleanedFiles = git.clean().call();
@@ -120,7 +120,7 @@ public class CleanCommandTest extends RepositoryTestCase {
StatusCommand command = git.status();
Status status = command.call();
Set<String> files = status.getUntracked();
- assertTrue(files.size() > 0);
+ assertFalse(files.isEmpty());
// run clean
Set<String> cleanedFiles = git.clean().setCleanDirectories(true).call();
@@ -128,7 +128,7 @@ public class CleanCommandTest extends RepositoryTestCase {
status = git.status().call();
files = status.getUntracked();
- assertTrue(files.size() == 0);
+ assertTrue(files.isEmpty());
assertTrue(cleanedFiles.contains("File2.txt"));
assertTrue(cleanedFiles.contains("File3.txt"));
assertTrue(!cleanedFiles.contains("sub-noclean/File1.txt"));
@@ -143,7 +143,7 @@ public class CleanCommandTest extends RepositoryTestCase {
StatusCommand command = git.status();
Status status = command.call();
Set<String> files = status.getUntracked();
- assertTrue(files.size() > 0);
+ assertFalse(files.isEmpty());
// run clean with setPaths
Set<String> paths = new TreeSet<>();
@@ -164,7 +164,7 @@ public class CleanCommandTest extends RepositoryTestCase {
StatusCommand command = git.status();
Status status = command.call();
Set<String> files = status.getUntracked();
- assertTrue(files.size() > 0);
+ assertFalse(files.isEmpty());
// run clean
Set<String> cleanedFiles = git.clean().setDryRun(true).call();
@@ -186,7 +186,7 @@ public class CleanCommandTest extends RepositoryTestCase {
StatusCommand command = git.status();
Status status = command.call();
Set<String> files = status.getUntracked();
- assertTrue(files.size() > 0);
+ assertFalse(files.isEmpty());
// run clean
Set<String> cleanedFiles = git.clean().setDryRun(true)
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
index 383436c51b..2270a6a8be 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
@@ -718,6 +718,34 @@ public class CloneCommandTest extends RepositoryTestCase {
}
+ @Test
+ public void testCloneWithPullMerge() throws Exception {
+ File directory = createTempDirectory("testCloneRepository1");
+ try (Git g = Git.init().setDirectory(directory).setBare(false).call()) {
+ g.remoteAdd().setName(Constants.DEFAULT_REMOTE_NAME)
+ .setUri(new URIish(fileUri())).call();
+ PullResult result = g.pull().setRebase(false).call();
+ assertTrue(result.isSuccessful());
+ assertEquals("refs/heads/master",
+ g.getRepository().getFullBranch());
+ checkFile(new File(directory, "Test.txt"), "Hello world");
+ }
+ }
+
+ @Test
+ public void testCloneWithPullRebase() throws Exception {
+ File directory = createTempDirectory("testCloneRepository1");
+ try (Git g = Git.init().setDirectory(directory).setBare(false).call()) {
+ g.remoteAdd().setName(Constants.DEFAULT_REMOTE_NAME)
+ .setUri(new URIish(fileUri())).call();
+ PullResult result = g.pull().setRebase(true).call();
+ assertTrue(result.isSuccessful());
+ assertEquals("refs/heads/master",
+ g.getRepository().getFullBranch());
+ checkFile(new File(directory, "Test.txt"), "Hello world");
+ }
+ }
+
private String fileUri() {
return "file://" + git.getRepository().getWorkTree().getAbsolutePath();
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java
index e4b7ed7ba7..3bde0eb33f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java
@@ -487,7 +487,7 @@ public class CommitCommandTest extends RepositoryTestCase {
}
private static String reflogComments(List<ReflogEntry> entries) {
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
for (ReflogEntry e : entries) {
b.append(e.getComment()).append(";");
}
@@ -663,6 +663,54 @@ public class CommitCommandTest extends RepositoryTestCase {
}
}
+ @Test
+ public void testDeletionConflictWithAutoCrlf() throws Exception {
+ try (Git git = new Git(db)) {
+ // Commit a file with CR/LF into the index
+ FileBasedConfig config = db.getConfig();
+ config.setString("core", null, "autocrlf", "false");
+ config.save();
+ File file = writeTrashFile("file.txt", "foo\r\n");
+ git.add().addFilepattern("file.txt").call();
+ git.commit().setMessage("Initial").call();
+ // Switch to side branch
+ git.checkout().setCreateBranch(true).setName("side").call();
+ assertTrue(file.delete());
+ git.rm().addFilepattern("file.txt").call();
+ git.commit().setMessage("Side").call();
+ // Switch on autocrlf=true
+ config.setString("core", null, "autocrlf", "true");
+ config.save();
+ // Switch back to master and commit a conflict
+ git.checkout().setName("master").call();
+ writeTrashFile("file.txt", "foob\r\n");
+ git.add().addFilepattern("file.txt").call();
+ assertEquals("[file.txt, mode:100644, content:foob\r\n]",
+ indexState(CONTENT));
+ writeTrashFile("g", "file2.txt", "anything");
+ git.add().addFilepattern("g/file2.txt");
+ RevCommit master = git.commit().setMessage("Second").call();
+ // Switch to side branch again so that the deletion is "ours"
+ git.checkout().setName("side").call();
+ // Cherry pick master: produces a delete-modify conflict.
+ CherryPickResult pick = git.cherryPick().include(master).call();
+ assertEquals("Expected a cherry-pick conflict",
+ CherryPickStatus.CONFLICTING, pick.getStatus());
+ // XXX: g/file2.txt should actually be staged already, but isn't.
+ git.add().addFilepattern("g/file2.txt").call();
+ // Resolve the conflict by taking the master version
+ writeTrashFile("file.txt", "foob\r\n");
+ git.add().addFilepattern("file.txt").call();
+ git.commit().setMessage("Cherry").call();
+ // We expect this to be committed with a single LF since there is no
+ // "ours" stage.
+ assertEquals(
+ "[file.txt, mode:100644, content:foob\n]"
+ + "[g/file2.txt, mode:100644, content:anything]",
+ indexState(CONTENT));
+ }
+ }
+
private void testConflictWithAutoCrlf(String baseLf, String lf)
throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java
index 807079eb23..df9ae6a0fb 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java
@@ -109,7 +109,7 @@ public class DescribeCommandTest extends RepositoryTestCase {
assertNameStartsWith(c4, "3e563c5");
assertNull(describe(c1));
- assertNull(describe(c1, true));
+ assertNull(describe(c1, true, false));
assertNull(describe(c1, "a*", "b*", "c*"));
assertNull(describe(c2, "bob*"));
assertNull(describe(c2, "?ob*"));
@@ -120,7 +120,7 @@ public class DescribeCommandTest extends RepositoryTestCase {
assertEquals("alice-t1", describe(c2, "a*", "b*", "c*"));
assertEquals("bob-t2", describe(c3));
- assertEquals("bob-t2-0-g44579eb", describe(c3, true));
+ assertEquals("bob-t2-0-g44579eb", describe(c3, true, false));
assertEquals("alice-t1-1-g44579eb", describe(c3, "alice*"));
assertEquals("alice-t1-1-g44579eb", describe(c3, "a??c?-t*"));
assertEquals("bob-t2", describe(c3, "bob*"));
@@ -129,7 +129,7 @@ public class DescribeCommandTest extends RepositoryTestCase {
// the value verified with git-describe(1)
assertEquals("bob-t2-1-g3e563c5", describe(c4));
- assertEquals("bob-t2-1-g3e563c5", describe(c4, true));
+ assertEquals("bob-t2-1-g3e563c5", describe(c4, true, false));
assertEquals("alice-t1-2-g3e563c5", describe(c4, "alice*"));
assertEquals("bob-t2-1-g3e563c5", describe(c4, "bob*"));
assertEquals("bob-t2-1-g3e563c5", describe(c4, "a*", "b*", "c*"));
@@ -137,6 +137,10 @@ public class DescribeCommandTest extends RepositoryTestCase {
assertEquals(null, describe(c2));
assertEquals(null, describe(c3));
assertEquals(null, describe(c4));
+
+ assertEquals("3747db3", describe(c2, false, true));
+ assertEquals("44579eb", describe(c3, false, true));
+ assertEquals("3e563c5", describe(c4, false, true));
}
// test default target
@@ -169,6 +173,10 @@ public class DescribeCommandTest extends RepositoryTestCase {
if (!useAnnotatedTags && !describeUseAllTags) {
assertEquals(null, describe(c1));
assertEquals(null, describe(c2));
+
+ assertEquals("fd70040", describe(c1, false, true));
+ assertEquals("b89dead", describe(c2, false, true));
+
return;
}
@@ -203,7 +211,6 @@ public class DescribeCommandTest extends RepositoryTestCase {
assertNotNull(describe(c1, "v1.1*", "v1.0*"));
assertNotNull(describe(c2, "v1.0*", "v1.1*"));
assertNotNull(describe(c2, "v1.1*", "v1.0*"));
-
}
}
@@ -236,9 +243,11 @@ public class DescribeCommandTest extends RepositoryTestCase {
assertEquals("2 commits: c4 and c3", "t-2-g119892b", describe(c4));
} else {
assertEquals(null, describe(c4));
+
+ assertEquals("119892b", describe(c4, false, true));
}
assertNull(describe(c3));
- assertNull(describe(c3, true));
+ assertNull(describe(c3, true, false));
}
private void branch(String name, ObjectId base) throws GitAPIException {
@@ -280,6 +289,9 @@ public class DescribeCommandTest extends RepositoryTestCase {
} else {
assertEquals(null, describe(c4));
assertEquals(null, describe(c3));
+
+ assertEquals("119892b", describe(c4, false, true));
+ assertEquals("0244e7f", describe(c3, false, true));
}
}
@@ -369,6 +381,8 @@ public class DescribeCommandTest extends RepositoryTestCase {
assertEquals("t1-3-gbb389a4", describe(c4));
} else {
assertEquals(null, describe(c4));
+
+ assertEquals("bb389a4", describe(c4, false, true));
}
}
@@ -402,6 +416,25 @@ public class DescribeCommandTest extends RepositoryTestCase {
assertEquals("t2-4-gbb389a4", describe(c4));
} else {
assertEquals(null, describe(c4));
+
+ assertEquals("bb389a4", describe(c4, false, true));
+ }
+ }
+
+ @Test
+ public void globMatchWithSlashes() throws Exception {
+ ObjectId c1 = modify("aaa");
+ tag("a/b/version");
+ ObjectId c2 = modify("bbb");
+ tag("a/b/version2");
+ if (useAnnotatedTags || describeUseAllTags) {
+ assertEquals("a/b/version", describe(c1, "*/version*"));
+ assertEquals("a/b/version2", describe(c2, "*/version*"));
+ } else {
+ assertNull(describe(c1));
+ assertNull(describe(c1, "*/version*"));
+ assertNull(describe(c2));
+ assertNull(describe(c2, "*/version*"));
}
}
@@ -434,14 +467,14 @@ public class DescribeCommandTest extends RepositoryTestCase {
}
}
- private String describe(ObjectId c1, boolean longDesc)
+ private String describe(ObjectId c1, boolean longDesc, boolean always)
throws GitAPIException, IOException {
return git.describe().setTarget(c1).setTags(describeUseAllTags)
- .setLong(longDesc).call();
+ .setLong(longDesc).setAlways(always).call();
}
private String describe(ObjectId c1) throws GitAPIException, IOException {
- return describe(c1, false);
+ return describe(c1, false, false);
}
private String describe(ObjectId c1, String... patterns) throws Exception {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java
index 9461c42500..2fd378842f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java
@@ -346,14 +346,11 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** global rebase config should be respected */
public void testPullWithRebasePreserve1Config() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("pull", null, "rebase", "preserve");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("pull", null, "rebase", "preserve");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.REBASE_PREASERVE);
}
@@ -361,15 +358,12 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** the branch-local config should win over the global config */
public void testPullWithRebasePreserveConfig2() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("pull", null, "rebase", "false");
- config.setString("branch", "master", "rebase", "preserve");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("pull", null, "rebase", "false");
+ config.setString("branch", "master", "rebase", "preserve");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.REBASE_PREASERVE);
}
@@ -377,14 +371,11 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** the branch-local config should be respected */
public void testPullWithRebasePreserveConfig3() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("branch", "master", "rebase", "preserve");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("branch", "master", "rebase", "preserve");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.REBASE_PREASERVE);
}
@@ -392,14 +383,11 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** global rebase config should be respected */
public void testPullWithRebaseConfig1() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("pull", null, "rebase", "true");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("pull", null, "rebase", "true");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.REBASE);
}
@@ -407,15 +395,12 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** the branch-local config should win over the global config */
public void testPullWithRebaseConfig2() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("pull", null, "rebase", "preserve");
- config.setString("branch", "master", "rebase", "true");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("pull", null, "rebase", "preserve");
+ config.setString("branch", "master", "rebase", "true");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.REBASE);
}
@@ -423,14 +408,11 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** the branch-local config should be respected */
public void testPullWithRebaseConfig3() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("branch", "master", "rebase", "true");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("branch", "master", "rebase", "true");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.REBASE);
}
@@ -438,27 +420,19 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** without config it should merge */
public void testPullWithoutConfig() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- return target.pull().call();
- }
- };
+ Callable<PullResult> setup = target.pull()::call;
doTestPullWithRebase(setup, TestPullMode.MERGE);
}
@Test
/** the branch local config should win over the global config */
public void testPullWithMergeConfig() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("pull", null, "rebase", "true");
- config.setString("branch", "master", "rebase", "false");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("pull", null, "rebase", "true");
+ config.setString("branch", "master", "rebase", "false");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.MERGE);
}
@@ -466,14 +440,11 @@ public class PullCommandTest extends RepositoryTestCase {
@Test
/** the branch local config should win over the global config */
public void testPullWithMergeConfig2() throws Exception {
- Callable<PullResult> setup = new Callable<PullResult>() {
- @Override
- public PullResult call() throws Exception {
- StoredConfig config = dbTarget.getConfig();
- config.setString("pull", null, "rebase", "false");
- config.save();
- return target.pull().call();
- }
+ Callable<PullResult> setup = () -> {
+ StoredConfig config = dbTarget.getConfig();
+ config.setString("pull", null, "rebase", "false");
+ config.save();
+ return target.pull().call();
};
doTestPullWithRebase(setup, TestPullMode.MERGE);
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java
index 1d9cd78140..d6aead4a52 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java
@@ -49,6 +49,7 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@@ -854,8 +855,7 @@ public class TreeWalkAttributeTest extends RepositoryTestCase {
static Set<Attribute> asSet(Attribute... attrs) {
HashSet<Attribute> result = new HashSet<>();
- for (Attribute attr : attrs)
- result.add(attr);
+ result.addAll(Arrays.asList(attrs));
return result;
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBasicTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBasicTest.java
index 014406eb98..972dc60156 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBasicTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBasicTest.java
@@ -205,8 +205,9 @@ public class DirCacheBasicTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
assertFalse(dc.hasUnmergedPaths());
@@ -229,8 +230,9 @@ public class DirCacheBasicTest extends RepositoryTestCase {
ents[2].setFileMode(FileMode.REGULAR_FILE);
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
assertTrue(dc.hasUnmergedPaths());
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java
index 3598f3a4a1..6020a748aa 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java
@@ -71,8 +71,9 @@ public class DirCacheBuilderIteratorTest extends RepositoryTestCase {
}
{
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java
index 50753ae1bd..cdf86f00a9 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java
@@ -211,12 +211,8 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
boolean receivedEvent = false;
DirCache dc = db.lockDirCache();
- IndexChangedListener listener = new IndexChangedListener() {
-
- @Override
- public void onIndexChanged(IndexChangedEvent event) {
- throw new ReceivedEventMarkerException();
- }
+ IndexChangedListener listener = (IndexChangedEvent event) -> {
+ throw new ReceivedEventMarkerException();
};
ListenerList l = db.getListenerList();
@@ -239,12 +235,8 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
// do the same again, as this doesn't change index compared to first
// round we should get no event this time
dc = db.lockDirCache();
- listener = new IndexChangedListener() {
-
- @Override
- public void onIndexChanged(IndexChangedEvent event) {
- throw new ReceivedEventMarkerException();
- }
+ listener = (IndexChangedEvent event) -> {
+ throw new ReceivedEventMarkerException();
};
l = db.getListenerList();
@@ -302,8 +294,9 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
assertEquals(paths.length, dc.getEntryCount());
@@ -352,8 +345,9 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
{
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
}
assertEquals(paths.length, dc.getEntryCount());
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheFindTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheFindTest.java
index 3b8c6ee7b4..7fc28018f6 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheFindTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheFindTest.java
@@ -66,8 +66,9 @@ public class DirCacheFindTest extends RepositoryTestCase {
final int aLast = 3;
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
assertEquals(paths.length, dc.getEntryCount());
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
index 82565fceec..bc99aeef2f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
@@ -94,8 +94,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
final DirCacheIterator i = new DirCacheIterator(dc);
@@ -121,8 +122,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
final DirCacheIterator i = new DirCacheIterator(dc);
@@ -154,8 +156,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
final String[] expPaths = { "a-", "a", "a0b" };
@@ -200,8 +203,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
final DirCacheIterator i = new DirCacheIterator(dc);
@@ -236,8 +240,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
try (TreeWalk tw = new TreeWalk(db)) {
@@ -271,8 +276,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
DirCacheIterator dci = new DirCacheIterator(dc);
@@ -365,8 +371,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
DirCacheIterator dci = new DirCacheIterator(dc);
@@ -398,8 +405,9 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
try (TreeWalk tw = new TreeWalk(db)) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheTreeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheTreeTest.java
index f662e2660c..513db75323 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheTreeTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheTreeTest.java
@@ -102,8 +102,9 @@ public class DirCacheTreeTest extends RepositoryTestCase {
final int aLast = 3;
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
assertNull(dc.getCacheTree(false));
@@ -142,8 +143,9 @@ public class DirCacheTreeTest extends RepositoryTestCase {
final int acLast = 3;
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.finish();
assertNull(dc.getCacheTree(false));
@@ -198,8 +200,9 @@ public class DirCacheTreeTest extends RepositoryTestCase {
}
final DirCacheBuilder b = dc.builder();
- for (int i = 0; i < ents.length; i++)
- b.add(ents[i]);
+ for (DirCacheEntry ent : ents) {
+ b.add(ent);
+ }
b.commit();
DirCache read = db.readDirCache();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/events/ConfigChangeEventTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/events/ConfigChangeEventTest.java
index 3624100671..b6f312dfec 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/events/ConfigChangeEventTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/events/ConfigChangeEventTest.java
@@ -54,12 +54,9 @@ public class ConfigChangeEventTest extends RepositoryTestCase {
@Test
public void testFileRepository_ChangeEventsOnlyOnSave() throws Exception {
final ConfigChangedEvent[] events = new ConfigChangedEvent[1];
- db.getListenerList().addConfigChangedListener(
- new ConfigChangedListener() {
- @Override
- public void onConfigChanged(ConfigChangedEvent event) {
- events[0] = event;
- }
+ db.getListenerList()
+ .addConfigChangedListener((ConfigChangedEvent event) -> {
+ events[0] = event;
});
FileBasedConfig config = db.getConfig();
assertNull(events[0]);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java
index bfa30d5b4b..5a5ae1d7a3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java
@@ -976,7 +976,7 @@ public class DfsGarbageCollectorTest {
rw.markStart(rw.parseCommit(ref.getObjectId()));
}
for (RevCommit next; (next = rw.next()) != null;) {
- if (AnyObjectId.equals(next, id)) {
+ if (AnyObjectId.isEqual(next, id)) {
return true;
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/InMemoryRepositoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/InMemoryRepositoryTest.java
new file mode 100644
index 0000000000..bab6110ce6
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/InMemoryRepositoryTest.java
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2019, Google LLC.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.internal.storage.dfs;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Set;
+
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.ObjectIdRef;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.Ref.Storage;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevTag;
+import org.junit.Test;
+
+public class InMemoryRepositoryTest {
+
+ @Test
+ public void keepUpdateIndexPeelingTag() throws Exception {
+ InMemoryRepository repo = new InMemoryRepository(
+ new DfsRepositoryDescription());
+ try (TestRepository<InMemoryRepository> git = new TestRepository<>(
+ repo)) {
+ RevCommit commit = git.branch("master").commit()
+ .message("first commit").create();
+ RevTag tag = git.tag("v0.1", commit);
+ git.update("refs/tags/v0.1", tag);
+
+ Ref unpeeledTag = new ObjectIdRef.Unpeeled(Storage.LOOSE,
+ "refs/tags/v0.1", tag.getId(), 1000);
+
+ Ref peeledTag = repo.getRefDatabase().peel(unpeeledTag);
+ assertTrue(peeledTag instanceof ObjectIdRef.PeeledTag);
+ assertEquals(1000, peeledTag.getUpdateIndex());
+ }
+ }
+
+ @Test
+ public void keepUpdateIndexPeelingNonTag() throws Exception {
+ InMemoryRepository repo = new InMemoryRepository(
+ new DfsRepositoryDescription());
+ try (TestRepository<InMemoryRepository> git = new TestRepository<>(
+ repo)) {
+ RevCommit commit = git.branch("master").commit()
+ .message("first commit").create();
+
+ Ref unpeeledRef = new ObjectIdRef.Unpeeled(Storage.LOOSE,
+ "refs/heads/master", commit.getId(), 1000);
+ Ref peeledRef = repo.getRefDatabase().peel(unpeeledRef);
+ assertTrue(peeledRef instanceof ObjectIdRef.PeeledNonTag);
+ assertEquals(1000, peeledRef.getUpdateIndex());
+ }
+ }
+
+ @Test
+ public void sha1ToTip_ref() throws Exception {
+ InMemoryRepository repo = new InMemoryRepository(
+ new DfsRepositoryDescription());
+ try (TestRepository<InMemoryRepository> git = new TestRepository<>(
+ repo)) {
+ RevCommit commit = git.branch("master").commit()
+ .message("first commit").create();
+
+ Set<Ref> tipsWithSha1 = repo.getRefDatabase()
+ .getTipsWithSha1(commit.getId());
+ assertEquals(1, tipsWithSha1.size());
+ Ref ref = tipsWithSha1.iterator().next();
+ assertEquals(ref.getName(), "refs/heads/master");
+ assertEquals(commit.getId(), ref.getObjectId());
+ }
+ }
+
+ @Test
+ public void sha1ToTip_annotatedTag() throws Exception {
+ InMemoryRepository repo = new InMemoryRepository(
+ new DfsRepositoryDescription());
+ try (TestRepository<InMemoryRepository> git = new TestRepository<>(
+ repo)) {
+ RevCommit commit = git.commit()
+ .message("first commit").create();
+ RevTag tagObj = git.tag("v0.1", commit);
+ git.update("refs/tags/v0.1", tagObj);
+ Set<Ref> tipsWithSha1 = repo.getRefDatabase()
+ .getTipsWithSha1(commit.getId());
+ assertEquals(1, tipsWithSha1.size());
+ Ref ref = tipsWithSha1.iterator().next();
+ assertEquals(ref.getName(), "refs/tags/v0.1");
+ assertEquals(commit.getId(), ref.getPeeledObjectId());
+ }
+ }
+
+ @Test
+ public void sha1ToTip_tag() throws Exception {
+ InMemoryRepository repo = new InMemoryRepository(
+ new DfsRepositoryDescription());
+ try (TestRepository<InMemoryRepository> git = new TestRepository<>(
+ repo)) {
+ RevCommit commit = git.commit().message("first commit").create();
+ git.update("refs/tags/v0.2", commit);
+ Set<Ref> tipsWithSha1 = repo.getRefDatabase()
+ .getTipsWithSha1(commit.getId());
+ assertEquals(1, tipsWithSha1.size());
+ Ref ref = tipsWithSha1.iterator().next();
+ assertEquals(ref.getName(), "refs/tags/v0.2");
+ assertEquals(commit.getId(), ref.getObjectId());
+ }
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/BatchRefUpdateTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/BatchRefUpdateTest.java
index 3c4b8cf4bc..501b788f89 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/BatchRefUpdateTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/BatchRefUpdateTest.java
@@ -938,6 +938,7 @@ public class BatchRefUpdateTest extends LocalDiskRepositoryTestCase {
REJECTED_MISSING_OBJECT(ReceiveCommand.Result.REJECTED_MISSING_OBJECT),
TRANSACTION_ABORTED(ReceiveCommand::isTransactionAborted);
+ @SuppressWarnings("ImmutableEnumChecker")
final Predicate<? super ReceiveCommand> p;
private Result(Predicate<? super ReceiveCommand> p) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java
index 05f7c65fa8..9e7d41a693 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java
@@ -239,20 +239,15 @@ public class GcConcurrentTest extends GcTestCase {
SampleDataRepositoryTestCase.copyCGitTestPacks(repo);
ExecutorService executor = Executors.newSingleThreadExecutor();
final CountDownLatch latch = new CountDownLatch(1);
- Future<Collection<PackFile>> result = executor
- .submit(new Callable<Collection<PackFile>>() {
-
- @Override
- public Collection<PackFile> call() throws Exception {
- long start = System.currentTimeMillis();
- System.out.println("starting gc");
- latch.countDown();
- Collection<PackFile> r = gc.gc();
- System.out.println("gc took "
- + (System.currentTimeMillis() - start) + " ms");
- return r;
- }
- });
+ Future<Collection<PackFile>> result = executor.submit(() -> {
+ long start = System.currentTimeMillis();
+ System.out.println("starting gc");
+ latch.countDown();
+ Collection<PackFile> r = gc.gc();
+ System.out.println(
+ "gc took " + (System.currentTimeMillis() - start) + " ms");
+ return r;
+ });
try {
latch.await();
Thread.sleep(5);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java
index c43bdbd298..54708da03c 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java
@@ -155,41 +155,34 @@ public class GcPackRefsTest extends GcTestCase {
final CyclicBarrier packRefsDone = new CyclicBarrier(2);
ExecutorService pool = Executors.newFixedThreadPool(2);
try {
- Future<Result> result = pool.submit(new Callable<Result>() {
-
- @Override
- public Result call() throws Exception {
- RefUpdate update = new RefDirectoryUpdate(
- (RefDirectory) repo.getRefDatabase(),
- repo.exactRef("refs/tags/t")) {
- @Override
- public boolean isForceUpdate() {
- try {
- refUpdateLockedRef.await();
- packRefsDone.await();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- } catch (BrokenBarrierException e) {
- Thread.currentThread().interrupt();
- }
- return super.isForceUpdate();
+ Future<Result> result = pool.submit(() -> {
+ RefUpdate update = new RefDirectoryUpdate(
+ (RefDirectory) repo.getRefDatabase(),
+ repo.exactRef("refs/tags/t")) {
+ @Override
+ public boolean isForceUpdate() {
+ try {
+ refUpdateLockedRef.await();
+ packRefsDone.await();
+ } catch (InterruptedException
+ | BrokenBarrierException e) {
+ Thread.currentThread().interrupt();
}
- };
- update.setForceUpdate(true);
- update.setNewObjectId(b);
- return update.update();
- }
+ return super.isForceUpdate();
+ }
+ };
+ update.setForceUpdate(true);
+ update.setNewObjectId(b);
+ return update.update();
});
- pool.submit(new Callable<Void>() {
- @Override
- public Void call() throws Exception {
- refUpdateLockedRef.await();
- gc.packRefs();
- packRefsDone.await();
- return null;
- }
+ Future<Result> result2 = pool.submit(() -> {
+ refUpdateLockedRef.await();
+ gc.packRefs();
+ packRefsDone.await();
+ return null;
});
+ assertNull(result2.get());
assertSame(result.get(), Result.FORCED);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java
index 9d47c7e3bc..97c56385bd 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java
@@ -47,7 +47,6 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.File;
-import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.MessageFormat;
@@ -169,12 +168,8 @@ public class ObjectDirectoryTest extends RepositoryTestCase {
// 2500ms
Thread.sleep(2600);
- File[] ret = packsFolder.listFiles(new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- return name.endsWith(".pack");
- }
- });
+ File[] ret = packsFolder.listFiles(
+ (File dir, String name) -> name.endsWith(".pack"));
assertTrue(ret != null && ret.length == 1);
FS fs = db.getFS();
Assume.assumeTrue(fs.lastModifiedInstant(tmpFile)
@@ -224,12 +219,8 @@ public class ObjectDirectoryTest extends RepositoryTestCase {
private Collection<Callable<ObjectId>> blobInsertersForTheSameFanOutDir(
final ObjectDirectory dir) {
- Callable<ObjectId> callable = new Callable<ObjectId>() {
- @Override
- public ObjectId call() throws Exception {
- return dir.newInserter().insert(Constants.OBJ_BLOB, new byte[0]);
- }
- };
+ Callable<ObjectId> callable = () -> dir.newInserter()
+ .insert(Constants.OBJ_BLOB, new byte[0]);
return Collections.nCopies(4, callable);
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
index ca4486256b..5d0a7e2a0b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
@@ -60,7 +60,6 @@ import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -881,12 +880,8 @@ public class PackWriterTest extends SampleDataRepositoryTestCase {
for (MutableEntry me : pack) {
entries.add(me.cloneEntry());
}
- Collections.sort(entries, new Comparator<PackIndex.MutableEntry>() {
- @Override
- public int compare(MutableEntry o1, MutableEntry o2) {
- return Long.signum(o1.getOffset() - o2.getOffset());
- }
- });
+ Collections.sort(entries, (MutableEntry o1, MutableEntry o2) -> Long
+ .signum(o1.getOffset() - o2.getOffset()));
int i = 0;
for (MutableEntry me : entries) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
index 2357edf6cb..d8e16858e5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
@@ -71,7 +71,6 @@ import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jgit.errors.LockFailedException;
import org.eclipse.jgit.events.ListenerHandle;
import org.eclipse.jgit.events.RefsChangedEvent;
-import org.eclipse.jgit.events.RefsChangedListener;
import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
import org.eclipse.jgit.junit.Repeat;
import org.eclipse.jgit.junit.TestRepository;
@@ -573,12 +572,8 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase {
final int[] count = new int[1];
ListenerHandle listener = Repository.getGlobalListenerList()
- .addRefsChangedListener(new RefsChangedListener() {
-
- @Override
- public void onRefsChanged(RefsChangedEvent event) {
- count[0]++;
- }
+ .addRefsChangedListener((RefsChangedEvent event) -> {
+ count[0]++;
});
refs = refdir.getRefs(RefDatabase.ALL);
@@ -1320,19 +1315,15 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase {
final AtomicReference<StackOverflowError> error = new AtomicReference<>();
final AtomicReference<IOException> exception = new AtomicReference<>();
final AtomicInteger changeCount = new AtomicInteger();
- newRepo.getListenerList().addRefsChangedListener(
- new RefsChangedListener() {
-
- @Override
- public void onRefsChanged(RefsChangedEvent event) {
- try {
- refDb.getRefsByPrefix("ref");
- changeCount.incrementAndGet();
- } catch (StackOverflowError soe) {
- error.set(soe);
- } catch (IOException ioe) {
- exception.set(ioe);
- }
+ newRepo.getListenerList()
+ .addRefsChangedListener((RefsChangedEvent event) -> {
+ try {
+ refDb.getRefsByPrefix("ref");
+ changeCount.incrementAndGet();
+ } catch (StackOverflowError soe) {
+ error.set(soe);
+ } catch (IOException ioe) {
+ exception.set(ioe);
}
});
refDb.getRefsByPrefix("ref");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java
index 8ef21e6da7..c3f5baa67b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java
@@ -633,35 +633,23 @@ public class RefTreeDatabaseTest {
private void symref(String name, String dst)
throws IOException {
- commit(new Function() {
- @Override
- public boolean apply(ObjectReader reader, RefTree tree)
- throws IOException {
- Ref old = tree.exactRef(reader, name);
- Command n = new Command(
- old,
- new SymbolicRef(
- name,
- new ObjectIdRef.Unpeeled(Ref.Storage.NEW, dst, null)));
- return tree.apply(Collections.singleton(n));
- }
+ commit((ObjectReader reader, RefTree tree) -> {
+ Ref old = tree.exactRef(reader, name);
+ Command n = new Command(old, new SymbolicRef(name,
+ new ObjectIdRef.Unpeeled(Ref.Storage.NEW, dst, null)));
+ return tree.apply(Collections.singleton(n));
});
}
private void update(String name, ObjectId id)
throws IOException {
- commit(new Function() {
- @Override
- public boolean apply(ObjectReader reader, RefTree tree)
- throws IOException {
- Ref old = tree.exactRef(reader, name);
- Command n;
- try (RevWalk rw = new RevWalk(repo)) {
- n = new Command(old,
- Command.toRef(rw, id, null, name, true));
- }
- return tree.apply(Collections.singleton(n));
+ commit((ObjectReader reader, RefTree tree) -> {
+ Ref old = tree.exactRef(reader, name);
+ Command n;
+ try (RevWalk rw = new RevWalk(repo)) {
+ n = new Command(old, Command.toRef(rw, id, null, name, true));
}
+ return tree.apply(Collections.singleton(n));
});
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileTest.java
new file mode 100644
index 0000000000..0a3f89e238
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileTest.java
@@ -0,0 +1,339 @@
+/*
+ * Copyright (C) 2018, Konrad Windszus <konrad_w@gmx.de>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.internal.transport.http;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+import java.net.HttpCookie;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.eclipse.jgit.internal.storage.file.LockFile;
+import org.eclipse.jgit.internal.transport.http.NetscapeCookieFile;
+import org.eclipse.jgit.util.http.HttpCookiesMatcher;
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+public class NetscapeCookieFileTest {
+
+ @Rule
+ public TemporaryFolder folder = new TemporaryFolder();
+
+ private Path tmpFile;
+
+ private URL baseUrl;
+
+ /**
+ * This is the expiration date that is used in the test cookie files
+ */
+ private static long JAN_01_2030_NOON = Instant
+ .parse("2030-01-01T12:00:00.000Z").toEpochMilli();
+
+ @Before
+ public void setUp() throws IOException {
+ // this will not only return a new file name but also create new empty
+ // file!
+ tmpFile = folder.newFile().toPath();
+ baseUrl = new URL("http://domain.com/my/path");
+ }
+
+ @Test
+ public void testMergeCookies() {
+ Set<HttpCookie> cookieSet1 = new LinkedHashSet<>();
+ HttpCookie cookie = new HttpCookie("key1", "valueFromSet1");
+ cookieSet1.add(cookie);
+ cookie = new HttpCookie("key2", "valueFromSet1");
+ cookieSet1.add(cookie);
+
+ Set<HttpCookie> cookieSet2 = new LinkedHashSet<>();
+ cookie = new HttpCookie("key1", "valueFromSet2");
+ cookieSet2.add(cookie);
+ cookie = new HttpCookie("key3", "valueFromSet2");
+ cookieSet2.add(cookie);
+
+ Set<HttpCookie> cookiesExpectedMergedSet = new LinkedHashSet<>();
+ cookie = new HttpCookie("key1", "valueFromSet1");
+ cookiesExpectedMergedSet.add(cookie);
+ cookie = new HttpCookie("key2", "valueFromSet1");
+ cookiesExpectedMergedSet.add(cookie);
+ cookie = new HttpCookie("key3", "valueFromSet2");
+ cookiesExpectedMergedSet.add(cookie);
+
+ Assert.assertThat(
+ NetscapeCookieFile.mergeCookies(cookieSet1, cookieSet2),
+ HttpCookiesMatcher.containsInOrder(cookiesExpectedMergedSet));
+
+ Assert.assertThat(NetscapeCookieFile.mergeCookies(cookieSet1, null),
+ HttpCookiesMatcher.containsInOrder(cookieSet1));
+ }
+
+ @Test
+ public void testWriteToNewFile() throws IOException {
+ Set<HttpCookie> cookies = new LinkedHashSet<>();
+ cookies.add(new HttpCookie("key1", "value"));
+ // first cookie is a session cookie (and should be ignored)
+
+ HttpCookie cookie = new HttpCookie("key2", "value");
+ cookie.setSecure(true);
+ cookie.setDomain("mydomain.com");
+ cookie.setPath("/");
+ cookie.setMaxAge(1000);
+ cookies.add(cookie);
+ Date creationDate = new Date();
+ try (Writer writer = Files.newBufferedWriter(tmpFile,
+ StandardCharsets.US_ASCII)) {
+ NetscapeCookieFile.write(writer, cookies, baseUrl, creationDate);
+ }
+
+ String expectedExpiration = String
+ .valueOf(creationDate.getTime() + (cookie.getMaxAge() * 1000));
+
+ Assert.assertThat(
+ Files.readAllLines(tmpFile, StandardCharsets.US_ASCII),
+ CoreMatchers
+ .equalTo(Arrays.asList("mydomain.com\tTRUE\t/\tTRUE\t"
+ + expectedExpiration + "\tkey2\tvalue")));
+ }
+
+ @Test
+ public void testWriteToExistingFile() throws IOException {
+ try (InputStream input = this.getClass()
+ .getResourceAsStream("cookies-simple1.txt")) {
+ Files.copy(input, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+ }
+
+ Set<HttpCookie> cookies = new LinkedHashSet<>();
+ HttpCookie cookie = new HttpCookie("key2", "value2");
+ cookie.setMaxAge(1000);
+ cookies.add(cookie);
+ Date creationDate = new Date();
+ try (Writer writer = Files.newBufferedWriter(tmpFile,
+ StandardCharsets.US_ASCII)) {
+ NetscapeCookieFile.write(writer, cookies, baseUrl, creationDate);
+ }
+ String expectedExpiration = String
+ .valueOf(creationDate.getTime() + (cookie.getMaxAge() * 1000));
+
+ Assert.assertThat(
+ Files.readAllLines(tmpFile, StandardCharsets.US_ASCII),
+ CoreMatchers.equalTo(
+ Arrays.asList("domain.com\tTRUE\t/my/path\tFALSE\t"
+ + expectedExpiration + "\tkey2\tvalue2")));
+ }
+
+ @Test(expected = IOException.class)
+ public void testWriteWhileSomeoneIsHoldingTheLock()
+ throws IllegalArgumentException, IOException, InterruptedException {
+ try (InputStream input = this.getClass()
+ .getResourceAsStream("cookies-simple1.txt")) {
+ Files.copy(input, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+ }
+ NetscapeCookieFile cookieFile = new NetscapeCookieFile(tmpFile);
+ // now imitate another process/thread holding the lock file
+ LockFile lockFile = new LockFile(tmpFile.toFile());
+ try {
+ Assert.assertTrue("Could not acquire lock", lockFile.lock());
+ cookieFile.write(baseUrl);
+ } finally {
+ lockFile.unlock();
+ }
+ }
+
+ @Test
+ public void testWriteAfterAnotherJgitProcessModifiedTheFile()
+ throws IOException, InterruptedException {
+ try (InputStream input = this.getClass()
+ .getResourceAsStream("cookies-simple1.txt")) {
+ Files.copy(input, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+ }
+ NetscapeCookieFile cookieFile = new NetscapeCookieFile(tmpFile);
+ cookieFile.getCookies(true);
+ // now modify file externally
+ try (InputStream input = this.getClass()
+ .getResourceAsStream("cookies-simple2.txt")) {
+ Files.copy(input, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+ }
+ // now try to write
+ cookieFile.write(baseUrl);
+
+ // validate that the external changes are there as well
+ // due to rounding errors (conversion from ms to sec to ms)
+ // the expiration date might not be exact
+ List<String> lines = Files.readAllLines(tmpFile,
+ StandardCharsets.US_ASCII);
+
+ Assert.assertEquals("Expected 3 lines", 3, lines.size());
+ assertStringMatchesPatternWithInexactNumber(lines.get(0),
+ "some-domain1\tTRUE\t/some/path1\tFALSE\t(\\d*)\tkey1\tvalueFromSimple2",
+ JAN_01_2030_NOON, 1000);
+ assertStringMatchesPatternWithInexactNumber(lines.get(1),
+ "some-domain1\tTRUE\t/some/path1\tFALSE\t(\\d*)\tkey3\tvalueFromSimple2",
+ JAN_01_2030_NOON, 1000);
+ assertStringMatchesPatternWithInexactNumber(lines.get(2),
+ "some-domain1\tTRUE\t/some/path1\tFALSE\t(\\d*)\tkey2\tvalueFromSimple1",
+ JAN_01_2030_NOON, 1000);
+ }
+
+ @SuppressWarnings("boxing")
+ private static final void assertStringMatchesPatternWithInexactNumber(
+ String string, String pattern, long expectedNumericValue,
+ long delta) {
+ java.util.regex.Matcher matcher = Pattern.compile(pattern)
+ .matcher(string);
+ Assert.assertTrue("Given string '" + string + "' does not match '"
+ + pattern + "'", matcher.matches());
+ // extract numeric value
+ Long actualNumericValue = Long.decode(matcher.group(1));
+
+ Assert.assertTrue(
+ "Value is supposed to be close to " + expectedNumericValue
+ + " but is " + actualNumericValue + ".",
+ Math.abs(expectedNumericValue - actualNumericValue) <= delta);
+ }
+
+ @Test
+ public void testWriteAndReadCycle() throws IOException {
+ Set<HttpCookie> cookies = new LinkedHashSet<>();
+
+ HttpCookie cookie = new HttpCookie("key1", "value1");
+ cookie.setPath("/some/path1");
+ cookie.setDomain("some-domain1");
+ cookie.setMaxAge(1000);
+ cookies.add(cookie);
+ cookie = new HttpCookie("key2", "value2");
+ cookie.setSecure(true);
+ cookie.setPath("/some/path2");
+ cookie.setDomain("some-domain2");
+ cookie.setMaxAge(1000);
+ cookie.setHttpOnly(true);
+ cookies.add(cookie);
+
+ Date creationDate = new Date();
+
+ try (Writer writer = Files.newBufferedWriter(tmpFile,
+ StandardCharsets.US_ASCII)) {
+ NetscapeCookieFile.write(writer, cookies, baseUrl, creationDate);
+ }
+ Set<HttpCookie> actualCookies = new NetscapeCookieFile(tmpFile,
+ creationDate).getCookies(true);
+ Assert.assertThat(actualCookies,
+ HttpCookiesMatcher.containsInOrder(cookies));
+ }
+
+ @Test
+ public void testReadAndWriteCycle() throws IOException {
+ try (InputStream input = this.getClass()
+ .getResourceAsStream("cookies-simple1.txt")) {
+ Files.copy(input, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+ }
+ // round up to the next second (to prevent rounding errors)
+ Date creationDate = new Date(
+ (System.currentTimeMillis() / 1000) * 1000);
+ Set<HttpCookie> cookies = new NetscapeCookieFile(tmpFile, creationDate)
+ .getCookies(true);
+ Path tmpFile2 = folder.newFile().toPath();
+ try (Writer writer = Files.newBufferedWriter(tmpFile2,
+ StandardCharsets.US_ASCII)) {
+ NetscapeCookieFile.write(writer, cookies, baseUrl, creationDate);
+ }
+ // compare original file with newly written one, they should not differ
+ Assert.assertEquals(Files.readAllLines(tmpFile),
+ Files.readAllLines(tmpFile2));
+ }
+
+ @Test
+ public void testReadWithEmptyAndCommentLines() throws IOException {
+ try (InputStream input = this.getClass().getResourceAsStream(
+ "cookies-with-empty-and-comment-lines.txt")) {
+ Files.copy(input, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+ }
+
+ Date creationDate = new Date();
+ Set<HttpCookie> cookies = new LinkedHashSet<>();
+
+ HttpCookie cookie = new HttpCookie("key2", "value2");
+ cookie.setDomain("some-domain2");
+ cookie.setPath("/some/path2");
+ cookie.setMaxAge((JAN_01_2030_NOON - creationDate.getTime()) / 1000);
+ cookie.setSecure(true);
+ cookie.setHttpOnly(true);
+ cookies.add(cookie);
+
+ cookie = new HttpCookie("key3", "value3");
+ cookie.setDomain("some-domain3");
+ cookie.setPath("/some/path3");
+ cookie.setMaxAge((JAN_01_2030_NOON - creationDate.getTime()) / 1000);
+ cookies.add(cookie);
+
+ Set<HttpCookie> actualCookies = new NetscapeCookieFile(tmpFile, creationDate)
+ .getCookies(true);
+ Assert.assertThat(actualCookies,
+ HttpCookiesMatcher.containsInOrder(cookies));
+ }
+
+ @Test
+ public void testReadInvalidFile() throws IOException {
+ try (InputStream input = this.getClass()
+ .getResourceAsStream("cookies-invalid.txt")) {
+ Files.copy(input, tmpFile, StandardCopyOption.REPLACE_EXISTING);
+ }
+
+ new NetscapeCookieFile(tmpFile)
+ .getCookies(true);
+ }
+}
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 22dc471552..e839545250 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
@@ -1462,6 +1462,48 @@ public class ConfigTest {
assertEquals("xt", parseEscapedSubsection("\"x\\t\""));
}
+ @Test
+ public void testInvalidGroupHeader() throws ConfigInvalidException {
+ expectedEx.expect(ConfigInvalidException.class);
+ expectedEx.expectMessage(JGitText.get().badGroupHeader);
+ parse("[foo \"bar\" ]\nfoo=bar\n");
+ }
+
+ @Test
+ public void testCrLf() throws ConfigInvalidException {
+ assertEquals("true", parseEscapedValue("true\r\n"));
+ }
+
+ @Test
+ public void testLfContinuation() throws ConfigInvalidException {
+ assertEquals("true", parseEscapedValue("tr\\\nue"));
+ }
+
+ @Test
+ public void testCrCharContinuation() throws ConfigInvalidException {
+ expectedEx.expect(ConfigInvalidException.class);
+ expectedEx.expectMessage("Bad escape: \\u000d");
+ parseEscapedValue("tr\\\rue");
+ }
+
+ @Test
+ public void testCrEOFContinuation() throws ConfigInvalidException {
+ expectedEx.expect(ConfigInvalidException.class);
+ expectedEx.expectMessage("Bad escape: \\u000d");
+ parseEscapedValue("tr\\\r");
+ }
+
+ @Test
+ public void testCrLfContinuation() throws ConfigInvalidException {
+ assertEquals("true", parseEscapedValue("tr\\\r\nue"));
+ }
+
+ @Test
+ public void testWhitespaceContinuation() throws ConfigInvalidException {
+ assertEquals("tr ue", parseEscapedValue("tr \\\n ue"));
+ assertEquals("tr ue", parseEscapedValue("tr \\\r\n ue"));
+ }
+
private static void assertValueRoundTrip(String value)
throws ConfigInvalidException {
assertValueRoundTrip(value, value);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
index 531c918e9b..e7a5b286dd 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
@@ -1678,7 +1678,6 @@ public class ObjectCheckerTest {
rejectName('>');
rejectName(':');
rejectName('"');
- rejectName('/');
rejectName('\\');
rejectName('|');
rejectName('?');
@@ -1693,7 +1692,8 @@ public class ObjectCheckerTest {
checkOneName("te" + c + "st");
fail("incorrectly accepted with " + c);
} catch (CorruptObjectException e) {
- assertEquals("name contains '" + c + "'", e.getMessage());
+
+ assertEquals("char '" + c + "' not allowed in Windows filename", e.getMessage());
}
}
@@ -1703,7 +1703,19 @@ public class ObjectCheckerTest {
checkOneName("te" + ((char) c) + "st");
fail("incorrectly accepted with 0x" + h);
} catch (CorruptObjectException e) {
- assertEquals("name contains byte 0x" + h, e.getMessage());
+ assertEquals("byte 0x" + h + " not allowed in Windows filename", e.getMessage());
+ }
+ }
+
+
+ @Test
+ public void testRejectInvalidCharacter() {
+ try {
+ checkOneName("te/st");
+ fail("incorrectly accepted with /");
+ } catch (CorruptObjectException e) {
+
+ assertEquals("name contains '/'", e.getMessage());
}
}
@@ -1763,16 +1775,13 @@ public class ObjectCheckerTest {
}
private static ObjectIdSet set(ObjectId... ids) {
- return new ObjectIdSet() {
- @Override
- public boolean contains(AnyObjectId objectId) {
- for (ObjectId id : ids) {
- if (id.equals(objectId)) {
- return true;
- }
+ return (AnyObjectId objectId) -> {
+ for (ObjectId id : ids) {
+ if (id.equals(objectId)) {
+ return true;
}
- return false;
}
+ return false;
};
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RebaseTodoFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RebaseTodoFileTest.java
new file mode 100644
index 0000000000..5cfc75ca93
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RebaseTodoFileTest.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2019, Thomas Wolf <thomas.wolf@paranor.ch>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.lib;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.junit.Test;
+
+public class RebaseTodoFileTest extends RepositoryTestCase {
+
+ private static final String TEST_TODO = "test.todo";
+
+ private void createTodoList(String... lines) throws IOException {
+ Path p = Paths.get(db.getDirectory().getAbsolutePath(), TEST_TODO);
+ Files.write(p, Arrays.asList(lines));
+ }
+
+ @Test
+ public void testReadTodoFile() throws Exception {
+ String[] expected = { "reword " + ObjectId.zeroId().name() + " Foo",
+ "# A comment in the the todo list",
+ "pick " + ObjectId.zeroId().name() + " Foo fie",
+ "squash " + ObjectId.zeroId().name() + " F",
+ "fixup " + ObjectId.zeroId().name(),
+ "edit " + ObjectId.zeroId().name() + " f",
+ "edit " + ObjectId.zeroId().name() + ' ' };
+ createTodoList(expected);
+ RebaseTodoFile todo = new RebaseTodoFile(db);
+ List<RebaseTodoLine> lines = todo.readRebaseTodo(TEST_TODO, true);
+ assertEquals("Expected 7 lines", 7, lines.size());
+ int i = 0;
+ for (RebaseTodoLine line : lines) {
+ switch (i) {
+ case 0:
+ assertEquals("Expected REWORD", RebaseTodoLine.Action.REWORD,
+ line.getAction());
+ assertEquals("Unexpected ID", ObjectId.zeroId().abbreviate(40),
+ line.getCommit());
+ assertEquals("Unexpected Message", "Foo",
+ line.getShortMessage());
+ break;
+ case 1:
+ assertEquals("Expected COMMENT", RebaseTodoLine.Action.COMMENT,
+ line.getAction());
+ assertEquals("Unexpected Message",
+ "# A comment in the the todo list",
+ line.getComment());
+ break;
+ case 2:
+ assertEquals("Expected PICK", RebaseTodoLine.Action.PICK,
+ line.getAction());
+ assertEquals("Unexpected ID", ObjectId.zeroId().abbreviate(40),
+ line.getCommit());
+ assertEquals("Unexpected Message", "Foo fie",
+ line.getShortMessage());
+ break;
+ case 3:
+ assertEquals("Expected SQUASH", RebaseTodoLine.Action.SQUASH,
+ line.getAction());
+ assertEquals("Unexpected ID", ObjectId.zeroId().abbreviate(40),
+ line.getCommit());
+ assertEquals("Unexpected Message", "F", line.getShortMessage());
+ break;
+ case 4:
+ assertEquals("Expected FIXUP", RebaseTodoLine.Action.FIXUP,
+ line.getAction());
+ assertEquals("Unexpected ID", ObjectId.zeroId().abbreviate(40),
+ line.getCommit());
+ assertEquals("Unexpected Message", "", line.getShortMessage());
+ break;
+ case 5:
+ assertEquals("Expected EDIT", RebaseTodoLine.Action.EDIT,
+ line.getAction());
+ assertEquals("Unexpected ID", ObjectId.zeroId().abbreviate(40),
+ line.getCommit());
+ assertEquals("Unexpected Message", "f", line.getShortMessage());
+ break;
+ case 6:
+ assertEquals("Expected EDIT", RebaseTodoLine.Action.EDIT,
+ line.getAction());
+ assertEquals("Unexpected ID", ObjectId.zeroId().abbreviate(40),
+ line.getCommit());
+ assertEquals("Unexpected Message", "", line.getShortMessage());
+ break;
+ default:
+ fail("Too many lines");
+ return;
+ }
+ i++;
+ }
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefTest.java
index 7d2c4a2784..b53d5b9448 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefTest.java
@@ -58,8 +58,10 @@ import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.util.Collection;
import java.util.List;
import java.util.Optional;
+import java.util.Set;
import java.util.TreeSet;
import org.eclipse.jgit.lib.Ref.Storage;
@@ -313,7 +315,7 @@ public class RefTest extends SampleDataRepositoryTestCase {
assertEquals(dst.isPeeled(), ref.isPeeled());
}
- private static void checkContainsRef(List<Ref> haystack, Ref needle) {
+ private static void checkContainsRef(Collection<Ref> haystack, Ref needle) {
for (Ref ref : haystack) {
if (ref.getName().equals(needle.getName()) &&
ref.getObjectId().equals(needle.getObjectId())) {
@@ -347,4 +349,17 @@ public class RefTest extends SampleDataRepositoryTestCase {
checkContainsRef(refs, db.exactRef("refs/heads/prefix/a"));
checkContainsRef(refs, db.exactRef("refs/tags/A"));
}
+
+ @Test
+ public void testResolveTipSha1() throws IOException {
+ ObjectId masterId = db.resolve("refs/heads/master");
+ Set<Ref> resolved = db.getRefDatabase().getTipsWithSha1(masterId);
+
+ assertEquals(2, resolved.size());
+ checkContainsRef(resolved, db.exactRef("refs/heads/master"));
+ checkContainsRef(resolved, db.exactRef("HEAD"));
+
+ assertEquals(db.getRefDatabase()
+ .getTipsWithSha1(ObjectId.zeroId()).size(), 0);
+ }
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReflogConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReflogConfigTest.java
index df1a52dc09..f2f277c6ea 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReflogConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReflogConfigTest.java
@@ -45,7 +45,6 @@
package org.eclipse.jgit.lib;
-import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -63,7 +62,8 @@ public class ReflogConfigTest extends RepositoryTestCase {
// check that there are no entries in the reflog and turn off writing
// reflogs
- assertEquals(0, db.getReflogReader(Constants.HEAD).getReverseEntries().size());
+ assertTrue(db.getReflogReader(Constants.HEAD).getReverseEntries()
+ .isEmpty());
final FileBasedConfig cfg = db.getConfig();
cfg.setBoolean("core", null, "logallrefupdates", false);
cfg.save();
@@ -72,9 +72,8 @@ public class ReflogConfigTest extends RepositoryTestCase {
// written
commit("A Commit\n", commitTime, tz);
commitTime += 60 * 1000;
- assertTrue(
- "Reflog for HEAD still contain no entry",
- db.getReflogReader(Constants.HEAD).getReverseEntries().size() == 0);
+ assertTrue("Reflog for HEAD still contain no entry", db
+ .getReflogReader(Constants.HEAD).getReverseEntries().isEmpty());
// set the logAllRefUpdates parameter to true and check it
cfg.setBoolean("core", null, "logallrefupdates", true);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java
index 545a188a98..682982226e 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java
@@ -61,29 +61,26 @@ public class ThreadSafeProgressMonitorTest {
final MockProgressMonitor mock = new MockProgressMonitor();
final ThreadSafeProgressMonitor pm = new ThreadSafeProgressMonitor(mock);
- runOnThread(new Runnable() {
- @Override
- public void run() {
- try {
- pm.start(1);
- fail("start did not fail on background thread");
- } catch (IllegalStateException notMainThread) {
- // Expected result
- }
-
- try {
- pm.beginTask("title", 1);
- fail("beginTask did not fail on background thread");
- } catch (IllegalStateException notMainThread) {
- // Expected result
- }
-
- try {
- pm.endTask();
- fail("endTask did not fail on background thread");
- } catch (IllegalStateException notMainThread) {
- // Expected result
- }
+ runOnThread(() -> {
+ try {
+ pm.start(1);
+ fail("start did not fail on background thread");
+ } catch (IllegalStateException notMainThread) {
+ // Expected result
+ }
+
+ try {
+ pm.beginTask("title", 1);
+ fail("beginTask did not fail on background thread");
+ } catch (IllegalStateException notMainThread) {
+ // Expected result
+ }
+
+ try {
+ pm.endTask();
+ fail("endTask did not fail on background thread");
+ } catch (IllegalStateException notMainThread) {
+ // Expected result
}
});
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 2ae9c11a7d..62495fb023 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
@@ -842,9 +842,9 @@ public class MergerTest extends RepositoryTestCase {
* Throws an exception if reading beyond limit.
*/
static class BigReadForbiddenStream extends ObjectStream.Filter {
- int limit;
+ long limit;
- BigReadForbiddenStream(ObjectStream orig, int limit) {
+ BigReadForbiddenStream(ObjectStream orig, long limit) {
super(orig.getType(), orig.getSize(), orig);
this.limit = limit;
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmapCalculatorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmapCalculatorTest.java
new file mode 100644
index 0000000000..c5d4d4238d
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmapCalculatorTest.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2019, Google LLC.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.revwalk;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.internal.storage.file.GC;
+import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder;
+import org.eclipse.jgit.lib.NullProgressMonitor;
+import org.eclipse.jgit.lib.ProgressMonitor;
+import org.junit.Before;
+import org.junit.Test;
+
+public class BitmapCalculatorTest extends LocalDiskRepositoryTestCase {
+ TestRepository<FileRepository> repo;
+
+ /** {@inheritDoc} */
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ FileRepository db = createWorkRepository();
+ repo = new TestRepository<>(db);
+ }
+
+ @Test
+ public void addOnlyCommits() throws Exception {
+ RevBlob abBlob = repo.blob("a_b_content");
+ RevCommit root = repo.commit().add("a/b", abBlob).create();
+ repo.update("refs/heads/master", root);
+
+ // GC creates bitmap index with ALL objects
+ GC gc = new GC(repo.getRepository());
+ gc.setAuto(false);
+ gc.gc();
+
+ // These objects are not in the bitmap index.
+ RevBlob acBlob = repo.blob("a_c_content");
+ RevCommit head = repo.commit().parent(root).add("a/c", acBlob).create();
+ repo.update("refs/heads/master", head);
+
+ BitmapCalculator bitmapWalker = new BitmapCalculator(repo.getRevWalk());
+ BitmapBuilder bitmap = bitmapWalker
+ .getBitmap(head, NullProgressMonitor.INSTANCE);
+
+ assertTrue(bitmap.contains(root.getId()));
+ assertTrue(bitmap.contains(root.getTree().getId()));
+ assertTrue(bitmap.contains(abBlob.getId()));
+
+ // BitmapCalculator added only the commit, no other objects.
+ assertTrue(bitmap.contains(head.getId()));
+ assertFalse(bitmap.contains(head.getTree().getId()));
+ assertFalse(bitmap.contains(acBlob.getId()));
+ }
+
+ @Test
+ public void walkUntilBitmap() throws Exception {
+ RevCommit root = repo.commit().create();
+ repo.update("refs/heads/master", root);
+
+ // GC creates bitmap index with ALL objects
+ GC gc = new GC(repo.getRepository());
+ gc.setAuto(false);
+ gc.gc();
+
+ // These objects are not in the bitmap index.
+ RevCommit commit1 = repo.commit(root);
+ RevCommit commit2 = repo.commit(commit1);
+ repo.update("refs/heads/master", commit2);
+
+ CounterProgressMonitor monitor = new CounterProgressMonitor();
+ BitmapCalculator bitmapWalker = new BitmapCalculator(repo.getRevWalk());
+ BitmapBuilder bitmap = bitmapWalker.getBitmap(commit2, monitor);
+
+ assertTrue(bitmap.contains(root));
+ assertTrue(bitmap.contains(commit1));
+ assertTrue(bitmap.contains(commit2));
+ assertEquals(2, monitor.getUpdates());
+ }
+
+ @Test
+ public void noNeedToWalk() throws Exception {
+ RevCommit root = repo.commit().create();
+ RevCommit commit1 = repo.commit(root);
+ RevCommit commit2 = repo.commit(commit1);
+ repo.update("refs/heads/master", commit2);
+
+ // GC creates bitmap index with ALL objects
+ GC gc = new GC(repo.getRepository());
+ gc.setAuto(false);
+ gc.gc();
+
+ CounterProgressMonitor monitor = new CounterProgressMonitor();
+ BitmapCalculator bitmapWalker = new BitmapCalculator(repo.getRevWalk());
+ BitmapBuilder bitmap = bitmapWalker.getBitmap(commit2, monitor);
+
+ assertTrue(bitmap.contains(root));
+ assertTrue(bitmap.contains(commit1));
+ assertTrue(bitmap.contains(commit2));
+ assertEquals(0, monitor.getUpdates());
+ }
+
+ private static class CounterProgressMonitor implements ProgressMonitor {
+
+ private int counter;
+
+ @Override
+ public void start(int totalTasks) {
+ // Nothing to do in tests
+ }
+
+ @Override
+ public void beginTask(String title, int totalWork) {
+ // Nothing to to in tests
+ }
+
+ @Override
+ public void update(int completed) {
+ counter += 1;
+ }
+
+ @Override
+ public void endTask() {
+ // Nothing to do in tests
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return false;
+ }
+
+ int getUpdates() {
+ return counter;
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmappedReachabilityCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmappedReachabilityCheckerTest.java
new file mode 100644
index 0000000000..5d3adf5eab
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmappedReachabilityCheckerTest.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2019, Google LLC
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.revwalk;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.internal.storage.file.GC;
+import org.eclipse.jgit.junit.TestRepository;
+
+public class BitmappedReachabilityCheckerTest
+ extends ReachabilityCheckerTestCase {
+
+ @Override
+ protected ReachabilityChecker getChecker(
+ TestRepository<FileRepository> repository) throws Exception {
+ // GC generates the bitmaps
+ GC gc = new GC(repo.getRepository());
+ gc.setAuto(false);
+ gc.gc();
+
+ // This is null when the test didn't create any branch
+ assertNotNull("Probably the test didn't define any ref",
+ repo.getRevWalk().getObjectReader().getBitmapIndex());
+
+ return new BitmappedReachabilityChecker(repository.getRevWalk());
+ }
+
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/PedestrianReachabilityCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/PedestrianReachabilityCheckerTest.java
new file mode 100644
index 0000000000..8d3e78c1fe
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/PedestrianReachabilityCheckerTest.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2019, Google LLC.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.revwalk;
+
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.junit.TestRepository;
+
+public class PedestrianReachabilityCheckerTest
+ extends ReachabilityCheckerTestCase {
+
+ @Override
+ protected ReachabilityChecker getChecker(
+ TestRepository<FileRepository> repository) {
+ return new PedestrianReachabilityChecker(true, repository.getRevWalk());
+ }
+
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java
new file mode 100644
index 0000000000..dd73e35727
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2019, Google LLC.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.revwalk;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.Optional;
+
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
+import org.eclipse.jgit.junit.TestRepository;
+import org.junit.Before;
+import org.junit.Test;
+
+public abstract class ReachabilityCheckerTestCase
+ extends LocalDiskRepositoryTestCase {
+
+ protected abstract ReachabilityChecker getChecker(
+ TestRepository<FileRepository> repository) throws Exception;
+
+ TestRepository<FileRepository> repo;
+
+ /** {@inheritDoc} */
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ FileRepository db = createWorkRepository();
+ repo = new TestRepository<>(db);
+ }
+
+ @Test
+ public void reachable() throws Exception {
+ RevCommit a = repo.commit().create();
+ RevCommit b1 = repo.commit(a);
+ RevCommit b2 = repo.commit(b1);
+ RevCommit c1 = repo.commit(a);
+ RevCommit c2 = repo.commit(c1);
+ repo.update("refs/heads/checker", b2);
+
+ ReachabilityChecker checker = getChecker(repo);
+
+ assertReachable("reachable from one tip",
+ checker.areAllReachable(Arrays.asList(a), Arrays.asList(c2)));
+ assertReachable("reachable from another tip",
+ checker.areAllReachable(Arrays.asList(a), Arrays.asList(b2)));
+ assertReachable("reachable from itself",
+ checker.areAllReachable(Arrays.asList(a), Arrays.asList(b2)));
+ }
+
+ @Test
+ public void reachable_merge() throws Exception {
+ RevCommit a = repo.commit().create();
+ RevCommit b1 = repo.commit(a);
+ RevCommit b2 = repo.commit(b1);
+ RevCommit c1 = repo.commit(a);
+ RevCommit c2 = repo.commit(c1);
+ RevCommit merge = repo.commit(c2, b2);
+ repo.update("refs/heads/checker", merge);
+
+ ReachabilityChecker checker = getChecker(repo);
+
+ assertReachable("reachable through one branch",
+ checker.areAllReachable(Arrays.asList(b1),
+ Arrays.asList(merge)));
+ assertReachable("reachable through another branch",
+ checker.areAllReachable(Arrays.asList(c1),
+ Arrays.asList(merge)));
+ assertReachable("reachable, before the branching",
+ checker.areAllReachable(Arrays.asList(a),
+ Arrays.asList(merge)));
+ }
+
+ @Test
+ public void unreachable_isLaterCommit() throws Exception {
+ RevCommit a = repo.commit().create();
+ RevCommit b1 = repo.commit(a);
+ RevCommit b2 = repo.commit(b1);
+ repo.update("refs/heads/checker", b2);
+
+ ReachabilityChecker checker = getChecker(repo);
+
+ assertUnreachable("unreachable from the future",
+ checker.areAllReachable(Arrays.asList(b2), Arrays.asList(b1)));
+ }
+
+ @Test
+ public void unreachable_differentBranch() throws Exception {
+ RevCommit a = repo.commit().create();
+ RevCommit b1 = repo.commit(a);
+ RevCommit b2 = repo.commit(b1);
+ RevCommit c1 = repo.commit(a);
+ repo.update("refs/heads/checker", b2);
+
+ ReachabilityChecker checker = getChecker(repo);
+
+ assertUnreachable("unreachable from different branch",
+ checker.areAllReachable(Arrays.asList(c1), Arrays.asList(b2)));
+ }
+
+ @Test
+ public void reachable_longChain() throws Exception {
+ RevCommit root = repo.commit().create();
+ RevCommit head = root;
+ for (int i = 0; i < 10000; i++) {
+ head = repo.commit(head);
+ }
+ repo.update("refs/heads/master", head);
+
+ ReachabilityChecker checker = getChecker(repo);
+
+ assertReachable("reachable with long chain in the middle", checker
+ .areAllReachable(Arrays.asList(root), Arrays.asList(head)));
+ }
+
+ private static void assertReachable(String msg,
+ Optional<RevCommit> result) {
+ assertFalse(msg, result.isPresent());
+ }
+
+ private static void assertUnreachable(String msg,
+ Optional<RevCommit> result) {
+ assertTrue(msg, result.isPresent());
+ }
+
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
index 4969305de0..e3972207f7 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
@@ -89,8 +89,8 @@ public class RevObjectTest extends RevWalkTestCase {
assertEquals(a1.hashCode(), a2.hashCode());
assertEquals(b1.hashCode(), b2.hashCode());
- assertTrue(AnyObjectId.equals(a1, a2));
- assertTrue(AnyObjectId.equals(b1, b2));
+ assertTrue(AnyObjectId.isEqual(a1, a2));
+ assertTrue(AnyObjectId.isEqual(b1, b2));
}
@Test
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java
index 8b1d860059..f512d2849b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java
@@ -44,7 +44,8 @@
package org.eclipse.jgit.transport;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
@@ -142,21 +143,21 @@ public class PacketLineInTest {
init("0004");
final String act = in.readString();
assertEquals("", act);
- assertNotSame(PacketLineIn.END, act);
+ assertFalse(PacketLineIn.isEnd(act));
assertEOF();
}
@Test
public void testReadString_End() throws IOException {
init("0000");
- assertSame(PacketLineIn.END, in.readString());
+ assertTrue(PacketLineIn.isEnd(in.readString()));
assertEOF();
}
@Test
public void testReadString_Delim() throws IOException {
init("0001");
- assertSame(PacketLineIn.DELIM, in.readString());
+ assertTrue(PacketLineIn.isDelimiter(in.readString()));
assertEOF();
}
@@ -183,14 +184,14 @@ public class PacketLineInTest {
init("0004");
final String act = in.readStringRaw();
assertEquals("", act);
- assertNotSame(PacketLineIn.END, act);
+ assertFalse(PacketLineIn.isEnd(act));
assertEOF();
}
@Test
public void testReadStringRaw_End() throws IOException {
init("0000");
- assertSame(PacketLineIn.END, in.readStringRaw());
+ assertTrue(PacketLineIn.isEnd(in.readString()));
assertEOF();
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java
index 2c98c84ae5..6e8327c792 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java
@@ -64,9 +64,9 @@ public class ProtocolV0ParserTest {
ByteArrayOutputStream send = new ByteArrayOutputStream();
PacketLineOut pckOut = new PacketLineOut(send);
for (String line : inputLines) {
- if (line == PacketLineIn.END) {
+ if (PacketLineIn.isEnd(line)) {
pckOut.end();
- } else if (line == PacketLineIn.DELIM) {
+ } else if (PacketLineIn.isDelimiter(line)) {
pckOut.writeDelim();
} else {
pckOut.writeString(line);
@@ -90,7 +90,7 @@ public class ProtocolV0ParserTest {
"4624442d68ee402a94364191085b77137618633e", "thin-pack",
"no-progress", "include-tag", "ofs-delta", "\n"),
"want f900c8326a43303685c46b279b9f70411bff1a4b\n",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV0Parser parser = new ProtocolV0Parser(defaultConfig());
FetchV0Request request = parser.recvWants(pckIn);
assertTrue(request.getClientCapabilities()
@@ -114,7 +114,7 @@ public class ProtocolV0ParserTest {
"4624442d68ee402a94364191085b77137618633e", "thin-pack",
"agent=JGit.test/0.0.1", "\n"),
"want f900c8326a43303685c46b279b9f70411bff1a4b\n",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV0Parser parser = new ProtocolV0Parser(defaultConfig());
FetchV0Request request = parser.recvWants(pckIn);
assertTrue(request.getClientCapabilities()
@@ -136,7 +136,7 @@ public class ProtocolV0ParserTest {
PacketLineIn pckIn = formatAsPacketLine(
"want 4624442d68ee402a94364191085b77137618633e\n",
"want f900c8326a43303685c46b279b9f70411bff1a4b\n",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV0Parser parser = new ProtocolV0Parser(defaultConfig());
FetchV0Request request = parser.recvWants(pckIn);
assertTrue(request.getClientCapabilities().isEmpty());
@@ -151,7 +151,7 @@ public class ProtocolV0ParserTest {
PacketLineIn pckIn = formatAsPacketLine(
"want 4624442d68ee402a94364191085b77137618633e\n",
"want f900c8326a43303685c46b279b9f70411bff1a4b\n", "deepen 3\n",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV0Parser parser = new ProtocolV0Parser(defaultConfig());
FetchV0Request request = parser.recvWants(pckIn);
assertTrue(request.getClientCapabilities().isEmpty());
@@ -168,7 +168,7 @@ public class ProtocolV0ParserTest {
"want 4624442d68ee402a94364191085b77137618633e\n",
"want f900c8326a43303685c46b279b9f70411bff1a4b\n",
"shallow 4b643d0ef739a1b494e7d6926d8d8ed80d35edf4\n",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV0Parser parser = new ProtocolV0Parser(defaultConfig());
FetchV0Request request = parser.recvWants(pckIn);
assertTrue(request.getClientCapabilities().isEmpty());
@@ -186,14 +186,15 @@ public class ProtocolV0ParserTest {
"want 4624442d68ee402a94364191085b77137618633e\n",
"want f900c8326a43303685c46b279b9f70411bff1a4b\n",
"filter blob:limit=13000\n",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV0Parser parser = new ProtocolV0Parser(defaultConfig());
FetchV0Request request = parser.recvWants(pckIn);
assertTrue(request.getClientCapabilities().isEmpty());
assertThat(request.getWantIds(),
hasOnlyObjectIds("4624442d68ee402a94364191085b77137618633e",
"f900c8326a43303685c46b279b9f70411bff1a4b"));
- assertEquals(13000, request.getFilterBlobLimit());
+ assertEquals(13000, request.getFilterSpec().getBlobLimit());
+ assertEquals(-1, request.getFilterSpec().getTreeDepthLimit());
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java
index dafa81ecd0..0d70cd6121 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java
@@ -123,9 +123,9 @@ public class ProtocolV2ParserTest {
ByteArrayOutputStream send = new ByteArrayOutputStream();
PacketLineOut pckOut = new PacketLineOut(send);
for (String line : inputLines) {
- if (line == PacketLineIn.END) {
+ if (PacketLineIn.isEnd(line)) {
pckOut.end();
- } else if (line == PacketLineIn.DELIM) {
+ } else if (PacketLineIn.isDelimiter(line)) {
pckOut.writeDelim();
} else {
pckOut.writeString(line);
@@ -136,19 +136,19 @@ public class ProtocolV2ParserTest {
}
/*
- * Succesful fetch with the basic core commands of the protocol.
+ * Successful fetch with the basic core commands of the protocol.
*/
@Test
public void testFetchBasicArguments()
throws PackProtocolException, IOException {
PacketLineIn pckIn = formatAsPacketLine(
- PacketLineIn.DELIM,
+ PacketLineIn.delimiter(),
"thin-pack", "no-progress", "include-tag", "ofs-delta",
"want 4624442d68ee402a94364191085b77137618633e",
"want f900c8326a43303685c46b279b9f70411bff1a4b",
"have 554f6e41067b9e3e565b6988a8294fac1cb78f4b",
"have abc760ab9ad72f08209943251b36cb886a578f87", "done",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
FetchV2Request request = parser.parseFetchRequest(pckIn);
@@ -173,12 +173,12 @@ public class ProtocolV2ParserTest {
@Test
public void testFetchWithShallow_deepen() throws IOException {
PacketLineIn pckIn = formatAsPacketLine(
- PacketLineIn.DELIM,
+ PacketLineIn.delimiter(),
"deepen 15",
"deepen-relative",
"shallow 28274d02c489f4c7e68153056e9061a46f62d7a0",
"shallow 145e683b229dcab9d0e2ccb01b386f9ecc17d29d",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
FetchV2Request request = parser.parseFetchRequest(pckIn);
@@ -193,11 +193,11 @@ public class ProtocolV2ParserTest {
@Test
public void testFetchWithShallow_deepenNot() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"shallow 28274d02c489f4c7e68153056e9061a46f62d7a0",
"shallow 145e683b229dcab9d0e2ccb01b386f9ecc17d29d",
"deepen-not a08595f76159b09d57553e37a5123f1091bb13e7",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
FetchV2Request request = parser.parseFetchRequest(pckIn);
@@ -210,11 +210,11 @@ public class ProtocolV2ParserTest {
@Test
public void testFetchWithShallow_deepenSince() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"shallow 28274d02c489f4c7e68153056e9061a46f62d7a0",
"shallow 145e683b229dcab9d0e2ccb01b386f9ecc17d29d",
"deepen-since 123123123",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
FetchV2Request request = parser.parseFetchRequest(pckIn);
@@ -226,32 +226,46 @@ public class ProtocolV2ParserTest {
@Test
public void testFetchWithNoneFilter() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"filter blob:none",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.start().allowFilter().done());
FetchV2Request request = parser.parseFetchRequest(pckIn);
- assertEquals(0, request.getFilterBlobLimit());
+ assertEquals(0, request.getFilterSpec().getBlobLimit());
+ assertEquals(-1, request.getFilterSpec().getTreeDepthLimit());
}
@Test
public void testFetchWithBlobSizeFilter() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"filter blob:limit=15",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.start().allowFilter().done());
FetchV2Request request = parser.parseFetchRequest(pckIn);
- assertEquals(15, request.getFilterBlobLimit());
+ assertEquals(15, request.getFilterSpec().getBlobLimit());
+ assertEquals(-1, request.getFilterSpec().getTreeDepthLimit());
+ }
+
+ @Test
+ public void testFetchWithTreeDepthFilter() throws IOException {
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
+ "filter tree:3",
+ PacketLineIn.end());
+ ProtocolV2Parser parser = new ProtocolV2Parser(
+ ConfigBuilder.start().allowFilter().done());
+ FetchV2Request request = parser.parseFetchRequest(pckIn);
+ assertEquals(-1, request.getFilterSpec().getBlobLimit());
+ assertEquals(3, request.getFilterSpec().getTreeDepthLimit());
}
@Test
public void testFetchMustNotHaveMultipleFilters() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"filter blob:none",
"filter blob:limit=12",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.start().allowFilter().done());
@@ -261,8 +275,8 @@ public class ProtocolV2ParserTest {
@Test
public void testFetchFilterWithoutAllowFilter() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
- "filter blob:limit=12", PacketLineIn.END);
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
+ "filter blob:limit=12", PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
@@ -277,10 +291,10 @@ public class ProtocolV2ParserTest {
testRepo.update("branchA", one);
testRepo.update("branchB", two);
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"want e4980cdc48cfa1301493ca94eb70523f6788b819",
"want-ref refs/heads/branchA",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.start().allowRefInWant().done());
@@ -295,10 +309,10 @@ public class ProtocolV2ParserTest {
@Test
public void testFetchWithRefInWantUnknownRef() throws Exception {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"want e4980cdc48cfa1301493ca94eb70523f6788b819",
"want-ref refs/heads/branchC",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.start().allowRefInWant().done());
@@ -314,8 +328,8 @@ public class ProtocolV2ParserTest {
@Test
public void testLsRefsMinimalReq() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
- PacketLineIn.END);
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
@@ -327,8 +341,8 @@ public class ProtocolV2ParserTest {
@Test
public void testLsRefsSymrefs() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM, "symrefs",
- PacketLineIn.END);
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(), "symrefs",
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
@@ -342,9 +356,9 @@ public class ProtocolV2ParserTest {
@Test
public void testLsRefsPeel() throws IOException {
PacketLineIn pckIn = formatAsPacketLine(
- PacketLineIn.DELIM,
+ PacketLineIn.delimiter(),
"peel",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
@@ -356,9 +370,9 @@ public class ProtocolV2ParserTest {
@Test
public void testLsRefsRefPrefixes() throws IOException {
- PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.DELIM,
+ PacketLineIn pckIn = formatAsPacketLine(PacketLineIn.delimiter(),
"ref-prefix refs/for", "ref-prefix refs/heads",
- PacketLineIn.END);
+ PacketLineIn.end());
ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault());
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java
index cea432e34c..89d02d7527 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java
@@ -67,9 +67,6 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.transport.resolver.ReceivePackFactory;
-import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -91,27 +88,16 @@ public class PushConnectionTest {
server = newRepo("server");
client = newRepo("client");
processedRefs = new ArrayList<>();
- testProtocol = new TestProtocol<>(
- null,
- new ReceivePackFactory<Object>() {
- @Override
- public ReceivePack create(Object req, Repository db)
- throws ServiceNotEnabledException,
- ServiceNotAuthorizedException {
- ReceivePack rp = new ReceivePack(db);
- rp.setPreReceiveHook(
- new PreReceiveHook() {
- @Override
- public void onPreReceive(ReceivePack receivePack,
- Collection<ReceiveCommand> cmds) {
- for (ReceiveCommand cmd : cmds) {
- processedRefs.add(cmd.getRefName());
- }
- }
- });
- return rp;
- }
- });
+ testProtocol = new TestProtocol<>(null, (Object req, Repository db) -> {
+ ReceivePack rp = new ReceivePack(db);
+ rp.setPreReceiveHook((ReceivePack receivePack,
+ Collection<ReceiveCommand> cmds) -> {
+ for (ReceiveCommand cmd : cmds) {
+ processedRefs.add(cmd.getRefName());
+ }
+ });
+ return rp;
+ });
uri = testProtocol.register(ctx, server);
try (ObjectInserter ins = server.newObjectInserter()) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java
index f26201d56d..fd1c3bf8b8 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java
@@ -69,9 +69,6 @@ import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.transport.resolver.ReceivePackFactory;
-import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -95,16 +92,11 @@ public class PushOptionsTest extends RepositoryTestCase {
client = newRepo("client");
testProtocol = new TestProtocol<>(null,
- new ReceivePackFactory<Object>() {
- @Override
- public ReceivePack create(Object req, Repository git)
- throws ServiceNotEnabledException,
- ServiceNotAuthorizedException {
- receivePack = new ReceivePack(git);
- receivePack.setAllowPushOptions(true);
- receivePack.setAtomic(true);
- return receivePack;
- }
+ (Object req, Repository git) -> {
+ receivePack = new ReceivePack(git);
+ receivePack.setAllowPushOptions(true);
+ receivePack.setAtomic(true);
+ return receivePack;
});
uri = testProtocol.register(ctx, server);
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 50c8a29543..5d208eea73 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
@@ -306,11 +306,11 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
int nul = master.indexOf('\0');
assertTrue("has capability list", nul > 0);
assertEquals(B.name() + ' ' + R_MASTER, master.substring(0, nul));
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
assertEquals("unpack error Missing commit " + P.name(), r.readString());
assertEquals("ng refs/heads/s n/a (unpacker error)", r.readString());
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
}
private static void receive(final ReceivePack rp,
@@ -366,13 +366,13 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
int nul = master.indexOf('\0');
assertTrue("has capability list", nul > 0);
assertEquals(B.name() + ' ' + R_MASTER, master.substring(0, nul));
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
assertEquals("unpack error Missing blob " + b.name(),
r.readString());
assertEquals("ng refs/heads/s n/a (unpacker error)",
r.readString());
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
}
}
@@ -419,13 +419,13 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
int nul = master.indexOf('\0');
assertTrue("has capability list", nul > 0);
assertEquals(B.name() + ' ' + R_MASTER, master.substring(0, nul));
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
assertEquals("unpack error Missing blob " + b.name(),
r.readString());
assertEquals("ng refs/heads/s n/a (unpacker error)",
r.readString());
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
}
}
@@ -473,13 +473,13 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
int nul = master.indexOf('\0');
assertTrue("has capability list", nul > 0);
assertEquals(B.name() + ' ' + R_MASTER, master.substring(0, nul));
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
assertEquals("unpack error Missing blob " + n.name(),
r.readString());
assertEquals("ng refs/heads/s n/a (unpacker error)",
r.readString());
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
}
}
@@ -504,13 +504,13 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
int nul = master.indexOf('\0');
assertTrue("has capability list", nul > 0);
assertEquals(B.name() + ' ' + R_MASTER, master.substring(0, nul));
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
String errorLine = r.readString();
assertTrue(errorLine.startsWith("unpack error"));
assertTrue(errorLine.contains("Invalid submodule URL '-"));
assertEquals("ng refs/heads/s n/a (unpacker error)", r.readString());
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
}
private TemporaryBuffer.Heap setupSourceRepoInvalidGitmodules()
@@ -589,13 +589,13 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
int nul = master.indexOf('\0');
assertTrue("has capability list", nul > 0);
assertEquals(B.name() + ' ' + R_MASTER, master.substring(0, nul));
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
assertEquals("unpack error Missing tree " + t.name(),
r.readString());
assertEquals("ng refs/heads/s n/a (unpacker error)",
r.readString());
- assertSame(PacketLineIn.END, r.readString());
+ assertTrue(PacketLineIn.isEnd(r.readString()));
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefAdvertiserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefAdvertiserTest.java
index ce69adf9c1..ccb548d919 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefAdvertiserTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefAdvertiserTest.java
@@ -45,7 +45,7 @@ package org.eclipse.jgit.transport;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -95,7 +95,7 @@ public class RefAdvertiserTest {
assertEquals(id(3).name() + " refs/Iñtërnâtiônàlizætiøn☃💩\n", s);
s = pckIn.readStringRaw();
- assertSame(PacketLineIn.END, s);
+ assertTrue(PacketLineIn.isEnd(s));
}
private static ObjectId id(int i) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
index 1c4d0cfe24..f4c55aa50a 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TestProtocolTest.java
@@ -92,11 +92,8 @@ public class TestProtocolTest {
@Override
public UploadPack create(User req, Repository db) {
UploadPack up = new UploadPack(db);
- up.setPostUploadHook(new PostUploadHook() {
- @Override
- public void onPostUpload(PackStatistics stats) {
- havesCount = stats.getHaves();
- }
+ up.setPostUploadHook((PackStatistics stats) -> {
+ havesCount = stats.getHaves();
});
return up;
}
@@ -217,16 +214,12 @@ public class TestProtocolTest {
ObjectId master = remote.branch("master").commit().create();
final AtomicInteger rejected = new AtomicInteger();
- TestProtocol<User> proto = registerProto(new UploadPackFactory<User>() {
- @Override
- public UploadPack create(User req, Repository db)
- throws ServiceNotAuthorizedException {
- if (!"user2".equals(req.name)) {
- rejected.incrementAndGet();
- throw new ServiceNotAuthorizedException();
- }
- return new UploadPack(db);
+ TestProtocol<User> proto = registerProto((User req, Repository db) -> {
+ if (!"user2".equals(req.name)) {
+ rejected.incrementAndGet();
+ throw new ServiceNotAuthorizedException();
}
+ return new UploadPack(db);
}, new DefaultReceive());
// Same repository, different users.
@@ -262,16 +255,12 @@ public class TestProtocolTest {
final AtomicInteger rejected = new AtomicInteger();
TestProtocol<User> proto = registerProto(new DefaultUpload(),
- new ReceivePackFactory<User>() {
- @Override
- public ReceivePack create(User req, Repository db)
- throws ServiceNotAuthorizedException {
- if (!"user2".equals(req.name)) {
- rejected.incrementAndGet();
- throw new ServiceNotAuthorizedException();
- }
- return new ReceivePack(db);
+ (User req, Repository db) -> {
+ if (!"user2".equals(req.name)) {
+ rejected.incrementAndGet();
+ throw new ServiceNotAuthorizedException();
}
+ return new ReceivePack(db);
});
// Same repository, different users.
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java
new file mode 100644
index 0000000000..ee0e0af8c4
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright (C) 2018, Konrad Windszus <konrad_w@gmx.de>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.transport;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.HttpCookie;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.eclipse.jgit.internal.transport.http.NetscapeCookieFile;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.test.resources.SampleDataRepositoryTestCase;
+import org.eclipse.jgit.transport.http.HttpConnection;
+import org.eclipse.jgit.util.http.HttpCookiesMatcher;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentMatchers;
+import org.mockito.Mockito;
+
+public class TransportHttpTest extends SampleDataRepositoryTestCase {
+ private URIish uri;
+ private File cookieFile;
+
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ uri = new URIish("https://everyones.loves.git/u/2");
+
+ final Config config = db.getConfig();
+ config.setBoolean("http", null, "saveCookies", true);
+ cookieFile = createTempFile();
+ config.setString("http", null, "cookieFile",
+ cookieFile.getAbsolutePath());
+ }
+
+ @Test
+ public void testMatchesCookieDomain() {
+ Assert.assertTrue(TransportHttp.matchesCookieDomain("example.com",
+ "example.com"));
+ Assert.assertTrue(TransportHttp.matchesCookieDomain("Example.Com",
+ "example.cOM"));
+ Assert.assertTrue(TransportHttp.matchesCookieDomain(
+ "some.subdomain.example.com", "example.com"));
+ Assert.assertFalse(TransportHttp
+ .matchesCookieDomain("someotherexample.com", "example.com"));
+ Assert.assertFalse(TransportHttp.matchesCookieDomain("example.com",
+ "example1.com"));
+ Assert.assertFalse(TransportHttp
+ .matchesCookieDomain("sub.sub.example.com", ".example.com"));
+ Assert.assertTrue(TransportHttp.matchesCookieDomain("host.example.com",
+ "example.com"));
+ Assert.assertTrue(TransportHttp.matchesCookieDomain(
+ "something.example.com", "something.example.com"));
+ Assert.assertTrue(TransportHttp.matchesCookieDomain(
+ "host.something.example.com", "something.example.com"));
+ }
+
+ @Test
+ public void testMatchesCookiePath() {
+ Assert.assertTrue(
+ TransportHttp.matchesCookiePath("/some/path", "/some/path"));
+ Assert.assertTrue(TransportHttp.matchesCookiePath("/some/path/child",
+ "/some/path"));
+ Assert.assertTrue(TransportHttp.matchesCookiePath("/some/path/child",
+ "/some/path/"));
+ Assert.assertFalse(TransportHttp.matchesCookiePath("/some/pathother",
+ "/some/path"));
+ Assert.assertFalse(
+ TransportHttp.matchesCookiePath("otherpath", "/some/path"));
+ }
+
+ @Test
+ public void testProcessResponseCookies() throws IOException {
+ HttpConnection connection = Mockito.mock(HttpConnection.class);
+ Mockito.when(
+ connection.getHeaderFields(ArgumentMatchers.eq("Set-Cookie")))
+ .thenReturn(Arrays.asList(
+ "id=a3fWa; Expires=Fri, 01 Jan 2100 11:00:00 GMT; Secure; HttpOnly",
+ "sessionid=38afes7a8; HttpOnly; Path=/"));
+ Mockito.when(
+ connection.getHeaderFields(ArgumentMatchers.eq("Set-Cookie2")))
+ .thenReturn(Collections
+ .singletonList("cookie2=some value; Max-Age=1234; Path=/"));
+
+ try (TransportHttp transportHttp = new TransportHttp(db, uri)) {
+ Date creationDate = new Date();
+ transportHttp.processResponseCookies(connection);
+
+ // evaluate written cookie file
+ Set<HttpCookie> expectedCookies = new LinkedHashSet<>();
+
+ HttpCookie cookie = new HttpCookie("id", "a3fWa");
+ cookie.setDomain("everyones.loves.git");
+ cookie.setPath("/u/2/");
+
+ cookie.setMaxAge(
+ (Instant.parse("2100-01-01T11:00:00.000Z").toEpochMilli()
+ - creationDate.getTime()) / 1000);
+ cookie.setSecure(true);
+ cookie.setHttpOnly(true);
+ expectedCookies.add(cookie);
+
+ cookie = new HttpCookie("cookie2", "some value");
+ cookie.setDomain("everyones.loves.git");