Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2019-12-09 04:24:27 -0500
committerMatthias Sohn2019-12-09 04:24:42 -0500
commit13e54b0872f69cd514499d17fe296c2cb9ced2e8 (patch)
treed2748dc2252713f0615f488448f59ef1208daef3
parentf8e60ce1cf1b1241c6d44f5dd84c204784157642 (diff)
parent23c5ebff796ff8d43ccc2f33e54434f33ea92b3d (diff)
downloadjgit-next.tar.gz
jgit-next.tar.xz
jgit-next.zip
Merge branch 'master' into nextnext
* master: Add ability to redirect stderr from git hooks Add possibility to get pure stderr output from AbortedByHookException Fix API check errors introduced in ReceivePack in 945d43d5 Cleanup CommitAndLogCommandTest CLI: Add support for excluding paths from Git log command ReceivePack: Moves connectivity check to separate class Upgrade error_prone_core to 2.3.4 Suppress API error for RefDatabase.hasFastTipsWithSha1() Remove API filters which became obsolete after bumping version to 5.7.0 ReftableTest: Clean up boxing warnings on usage of String.format Add missing @since tag for ReceivePack#receiveWithExceptionPropagation MergedReftable: Remove unnecessary semicolon Prepare 5.7.0-SNAPSHOT builds Introduce RefDatabase#hasFastTipsWithSha1 Update Orbit to R20191126223242 for 2019-12 Prepare 5.6.0-SNAPSHOT builds JGit v5.6.0.201912041214-rc1 server: Add a custom error handler transport: Add methods that do not handle exceptions transport: Let users specify an error handler for unpacking a pack file ReceivePack: Use try-with-resources for PostReceiveHook transport: Consolidate status reporting code transport: Add ReceiveCommandErrorHandler transport: Move exception handler to the caller transport: Move handling code to the caller side UploadPackServlet: Use uploadWithExceptionPropagation GitSmartHttpTools: Do not use sideband when sending an error Prepare 5.6.0-SNAPSHOT builds JGit v5.6.0.201911271000-m3 ReceivePack: Open visibility for some methods JGit pgm: Format blame output to match canonical git Make blame work correctly on merge conflicts Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl Bazel: Add missing newlines at end of BUILD files Upgrade maven-enforcer-plugin to 3.0.0-M3 Add missing license header to ReftableDatabase Add missing license header to UploadPackRefSortingForReachabilityTest [spotbugs] Fix potential NPE in FSTest Remove unused import in CreateFileSnapshotBenchmark RepositoryCache: don't require HEAD in git repositories FileRepository: cleanup refs outside refs/ on reftable conversion Update Orbit to S20191118194249 for 2019-12 M3 Silence API error for new method in ReachabilityChecker UploadPackTest: Fix unused parameter in checkUnadvertisedIfUnallowed BitmappedReachabilityChecker: Use only one bitmap for the whole check checkNotAdvertisedWants: Be lazy converting Ref to RevCommit ReachabilityChecker: Receive a Stream instead of a Collection UploadPack: Prioritize references for non-advertised wants checks ReceivePack: Fix name hiding of 'atomic' member ReceivePack: Remove unnecessarily nested else-clause Change-Id: I812a8e2cc7ce7f94752722bb257d545ef62a476b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--lib/jmh/BUILD2
-rw-r--r--org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF10
-rw-r--r--org.eclipse.jgit.ant.test/pom.xml2
-rw-r--r--org.eclipse.jgit.ant/META-INF/MANIFEST.MF8
-rw-r--r--org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ant/pom.xml2
-rw-r--r--org.eclipse.jgit.archive/META-INF/MANIFEST.MF16
-rw-r--r--org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.archive/pom.xml2
-rw-r--r--org.eclipse.jgit.benchmarks/BUILD2
-rw-r--r--org.eclipse.jgit.benchmarks/pom.xml4
-rw-r--r--org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/CreateFileSnapshotBenchmark.java1
-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.MF4
-rw-r--r--org.eclipse.jgit.http.apache/pom.xml2
-rw-r--r--org.eclipse.jgit.http.server/META-INF/MANIFEST.MF30
-rw-r--r--org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.http.server/pom.xml2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java15
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java43
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java60
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java70
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java9
-rw-r--r--org.eclipse.jgit.http.test/META-INF/MANIFEST.MF40
-rw-r--r--org.eclipse.jgit.http.test/pom.xml2
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java2
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.junit.http/pom.xml2
-rw-r--r--org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF10
-rw-r--r--org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.junit.ssh/pom.xml2
-rw-r--r--org.eclipse.jgit.junit/META-INF/MANIFEST.MF40
-rw-r--r--org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.junit/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF38
-rw-r--r--org.eclipse.jgit.lfs.server.test/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF32
-rw-r--r--org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.lfs.server/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF24
-rw-r--r--org.eclipse.jgit.lfs.test/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs/META-INF/MANIFEST.MF46
-rw-r--r--org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.lfs/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java10
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java14
-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.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml4
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml4
-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.target/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20191126223242-2019-12.tpd (renamed from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20191106190530.tpd)16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20191025144108-2019-12.tpd65
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/pom.xml2
-rw-r--r--org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF36
-rw-r--r--org.eclipse.jgit.pgm.test/pom.xml2
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BlameTest.java40
-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.xml2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java92
-rw-r--r--org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.jgit.ssh.apache.test/pom.xml2
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF26
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ssh.apache/pom.xml2
-rw-r--r--org.eclipse.jgit.test/META-INF/MANIFEST.MF108
-rw-r--r--org.eclipse.jgit.test/pom.xml2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java36
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java160
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogFilterTest.java221
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableTest.java15
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/ReftableTest.java106
-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/ReachabilityCheckerTestCase.java20
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackRefSortingForReachabilityTest.java76
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java18
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java4
-rw-r--r--org.eclipse.jgit.ui/META-INF/MANIFEST.MF18
-rw-r--r--org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit.ui/pom.xml2
-rw-r--r--org.eclipse.jgit/.settings/.api_filters120
-rw-r--r--org.eclipse.jgit/META-INF/MANIFEST.MF103
-rw-r--r--org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF4
-rw-r--r--org.eclipse.jgit/pom.xml2
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java72
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java52
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java43
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java28
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java117
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java64
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java43
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/Hooks.java95
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java13
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java56
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java3
-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/PedestrianReachabilityChecker.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ReachabilityChecker.java37
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommandErrorHandler.java83
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java498
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UnpackErrorHandler.java29
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java81
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java138
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java200
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java18
-rw-r--r--pom.xml6
-rw-r--r--tools/bzl/jmh.bzl8
154 files changed, 2862 insertions, 1699 deletions
diff --git a/lib/jmh/BUILD b/lib/jmh/BUILD
index deb2a78def..b15e66c2b9 100644
--- a/lib/jmh/BUILD
+++ b/lib/jmh/BUILD
@@ -9,4 +9,4 @@ java_library(
"@jopt//jar",
"@math3//jar",
],
-) \ No newline at end of file
+)
diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
index bfa786134c..a8e76b254a 100644
--- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
@@ -5,13 +5,13 @@ Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ant.test
Bundle-SymbolicName: org.eclipse.jgit.ant.test
Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.ant.tasks;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.ant.tasks;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.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 6935af82a4..0a0b1b3656 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ant.test</artifactId>
diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
index fbce458a35..a0d2fe1531 100644
--- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
@@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ant
Bundle-SymbolicName: org.eclipse.jgit.ant
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)"
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)"
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.ant;version="5.6.0",
- org.eclipse.jgit.ant.tasks;version="5.6.0";
+Export-Package: org.eclipse.jgit.ant;version="5.7.0",
+ org.eclipse.jgit.ant.tasks;version="5.7.0";
uses:="org.apache.tools.ant,
org.apache.tools.ant.types"
diff --git a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
index 80c658ec48..21bd52f31e 100644
--- a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.ant - Sources
Bundle-SymbolicName: org.eclipse.jgit.ant.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ant;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ant;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml
index 54f8a4b989..a53c7d00b8 100644
--- a/org.eclipse.jgit.ant/pom.xml
+++ b/org.eclipse.jgit.ant/pom.xml
@@ -48,7 +48,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ant</artifactId>
diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
index 956d243ba7..93fee3cecb 100644
--- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.archive
Bundle-SymbolicName: org.eclipse.jgit.archive
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -13,17 +13,17 @@ Import-Package: org.apache.commons.compress.archivers;version="[1.4,2.0)",
org.apache.commons.compress.compressors.bzip2;version="[1.4,2.0)",
org.apache.commons.compress.compressors.gzip;version="[1.4,2.0)",
org.apache.commons.compress.compressors.xz;version="[1.4,2.0)",
- org.eclipse.jgit.api;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.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.6.0";
+Export-Package: org.eclipse.jgit.archive;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.api,
org.apache.commons.compress.archivers,
org.osgi.framework",
- org.eclipse.jgit.archive.internal;version="5.6.0";x-internal:=true
+ org.eclipse.jgit.archive.internal;version="5.7.0";x-internal:=true
diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
index c0b96705fe..65250a75c7 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.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml
index 65a1f52170..907420ca75 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.archive</artifactId>
diff --git a/org.eclipse.jgit.benchmarks/BUILD b/org.eclipse.jgit.benchmarks/BUILD
index 3c6ff0e12b..7e331b101a 100644
--- a/org.eclipse.jgit.benchmarks/BUILD
+++ b/org.eclipse.jgit.benchmarks/BUILD
@@ -10,4 +10,4 @@ jmh_java_benchmarks(
deps = [
"//org.eclipse.jgit:jgit",
],
-) \ No newline at end of file
+)
diff --git a/org.eclipse.jgit.benchmarks/pom.xml b/org.eclipse.jgit.benchmarks/pom.xml
index a25db37f54..f74df6d153 100644
--- a/org.eclipse.jgit.benchmarks/pom.xml
+++ b/org.eclipse.jgit.benchmarks/pom.xml
@@ -47,7 +47,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jgit</groupId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
<artifactId>org.eclipse.jgit.benchmarks</artifactId>
<packaging>jar</packaging>
@@ -124,7 +124,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
- <version>2.3.3</version>
+ <version>2.3.4</version>
</dependency>
</dependencies>
</plugin>
diff --git a/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/CreateFileSnapshotBenchmark.java b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/CreateFileSnapshotBenchmark.java
index ffe4a26d8b..21c54c563f 100644
--- a/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/CreateFileSnapshotBenchmark.java
+++ b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/CreateFileSnapshotBenchmark.java
@@ -45,7 +45,6 @@ package org.eclipse.jgit.benchmarks;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.internal.storage.file.FileSnapshot;
diff --git a/org.eclipse.jgit.coverage/pom.xml b/org.eclipse.jgit.coverage/pom.xml
index 9dfb251080..53a46fc1b9 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ant</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.archive</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.apache</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.server</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.server</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.pgm</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ui</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.test</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ant.test</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.test</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.pgm.test</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.test</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-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 ff97910919..f19031f896 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.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
@@ -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.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)"
-Export-Package: org.eclipse.jgit.transport.http.apache;version="5.6.0";
+ org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)"
+Export-Package: org.eclipse.jgit.transport.http.apache;version="5.7.0";
uses:="org.apache.http.client,
org.eclipse.jgit.transport.http,
org.apache.http.entity,
diff --git a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
index 8950164877..6d11830f28 100644
--- a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.http.apache - Sources
Bundle-SymbolicName: org.eclipse.jgit.http.apache.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml
index 4be8a980ff..4c94d21174 100644
--- a/org.eclipse.jgit.http.apache/pom.xml
+++ b/org.eclipse.jgit.http.apache/pom.xml
@@ -48,7 +48,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.apache</artifactId>
diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
index bad1d8a869..0e86099903 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.http.server
Bundle-SymbolicName: org.eclipse.jgit.http.server
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.http.server;version="5.6.0",
- org.eclipse.jgit.http.server.glue;version="5.6.0";
+Export-Package: org.eclipse.jgit.http.server;version="5.7.0",
+ org.eclipse.jgit.http.server.glue;version="5.7.0";
uses:="javax.servlet,javax.servlet.http",
- org.eclipse.jgit.http.server.resolver;version="5.6.0";
+ org.eclipse.jgit.http.server.resolver;version="5.7.0";
uses:="org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.lib,
org.eclipse.jgit.transport,
@@ -18,14 +18,14 @@ 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.annotations;version="[5.5.0,5.7.0)",
- org.eclipse.jgit.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.transport.parser;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.resolver;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)"
+ org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)"
diff --git a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
index e051fd8283..d85db5e60e 100644
--- a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.http.server - Sources
Bundle-SymbolicName: org.eclipse.jgit.http.server.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml
index 97d90d0b54..e4ce5330ec 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.server</artifactId>
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 e9462eeb4c..06970a7693 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
@@ -96,6 +96,8 @@ public class GitFilter extends MetaFilter {
private ReceivePackFactory<HttpServletRequest> receivePackFactory = new DefaultReceivePackFactory();
+ private ReceivePackErrorHandler receivePackErrorHandler;
+
private final List<Filter> uploadPackFilters = new LinkedList<>();
private final List<Filter> receivePackFilters = new LinkedList<>();
@@ -190,6 +192,17 @@ public class GitFilter extends MetaFilter {
}
/**
+ * Set a custom error handler for git-receive-pack.
+ *
+ * @param h
+ * A custom error handler for git-receive-pack.
+ */
+ public void setReceivePackErrorHandler(ReceivePackErrorHandler h) {
+ assertNotInitialized();
+ this.receivePackErrorHandler = h;
+ }
+
+ /**
* Add receive-pack filter
*
* @param filter
@@ -233,7 +246,7 @@ public class GitFilter extends MetaFilter {
b = b.through(new ReceivePackServlet.Factory(receivePackFactory));
for (Filter f : receivePackFilters)
b = b.through(f);
- b.with(new ReceivePackServlet());
+ b.with(new ReceivePackServlet(receivePackErrorHandler));
}
ServletBinder refs = serve("*/" + Constants.INFO_REFS);
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java
index 5e09d012d7..5077e83b36 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java
@@ -48,8 +48,6 @@ import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import static org.eclipse.jgit.http.server.ServletUtils.ATTRIBUTE_HANDLER;
import static org.eclipse.jgit.transport.GitProtocolConstants.CAPABILITY_SIDE_BAND_64K;
-import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SIDE_BAND;
-import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_SIDE_BAND_64K;
import static org.eclipse.jgit.transport.SideBandOutputStream.CH_ERROR;
import static org.eclipse.jgit.transport.SideBandOutputStream.SMALL_BUF;
@@ -64,14 +62,12 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jgit.internal.transport.parser.FirstCommand;
-import org.eclipse.jgit.internal.transport.parser.FirstWant;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.PacketLineIn;
import org.eclipse.jgit.transport.PacketLineOut;
import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.RequestNotYetReadException;
import org.eclipse.jgit.transport.SideBandOutputStream;
-import org.eclipse.jgit.transport.UploadPack;
/**
* Utility functions for handling the Git-over-HTTP protocol.
@@ -220,44 +216,15 @@ public class GitSmartHttpTools {
private static void sendUploadPackError(HttpServletRequest req,
HttpServletResponse res, String textForGit) throws IOException {
+ // Do not use sideband. Sideband is acceptable only while packfile is
+ // being sent. Other places, like acknowledgement section, do not
+ // support sideband. Use an error packet.
ByteArrayOutputStream buf = new ByteArrayOutputStream(128);
PacketLineOut pckOut = new PacketLineOut(buf);
-
- boolean sideband;
- UploadPack up = (UploadPack) req.getAttribute(ATTRIBUTE_HANDLER);
- if (up != null) {
- try {
- sideband = up.isSideBand();
- } catch (RequestNotYetReadException e) {
- sideband = isUploadPackSideBand(req);
- }
- } else
- sideband = isUploadPackSideBand(req);
-
- if (sideband)
- writeSideBand(buf, textForGit);
- else
- writePacket(pckOut, textForGit);
+ writePacket(pckOut, textForGit);
send(req, res, UPLOAD_PACK_RESULT_TYPE, buf.toByteArray());
}
- private static boolean isUploadPackSideBand(HttpServletRequest req) {
- try {
- // The client may be in a state where they have sent the sideband
- // capability and are expecting a response in the sideband, but we might
- // not have an UploadPack, or it might not have read any of the request.
- // So, cheat and read the first line.
- String line = new PacketLineIn(req.getInputStream()).readString();
- FirstWant parsed = FirstWant.fromLine(line);
- return (parsed.getCapabilities().contains(OPTION_SIDE_BAND)
- || parsed.getCapabilities().contains(OPTION_SIDE_BAND_64K));
- } catch (IOException e) {
- // Probably the connection is closed and a subsequent write will fail, but
- // try it just in case.
- return false;
- }
- }
-
private static void sendReceivePackError(HttpServletRequest req,
HttpServletResponse res, String textForGit) throws IOException {
ByteArrayOutputStream buf = new ByteArrayOutputStream(128);
@@ -308,7 +275,7 @@ public class GitSmartHttpTools {
private static void writePacket(PacketLineOut pckOut, String textForGit)
throws IOException {
- pckOut.writeString("error: " + textForGit);
+ pckOut.writeString("ERR " + textForGit);
}
private static void send(HttpServletRequest req, HttpServletResponse res,
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java
new file mode 100644
index 0000000000..ee66cb102f
--- /dev/null
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2019, Google LLC and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.http.server;
+
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.jgit.transport.ReceivePack;
+import org.eclipse.jgit.transport.ServiceMayNotContinueException;
+
+/**
+ * Handle git-receive-pack errors.
+ *
+ * <p>
+ * This is an entry point for customizing an error handler for git-receive-pack.
+ * Right before calling {@link ReceivePack#receiveWithExceptionPropagation},
+ * JGit will call this handler if specified through {@link GitFilter}. The
+ * implementation of this handler is responsible for calling
+ * {@link ReceivePackRunnable} and handling exceptions for clients.
+ *
+ * <p>
+ * If a custom handler is not specified, JGit will use the default error
+ * handler.
+ *
+ * @since 5.6
+ */
+public interface ReceivePackErrorHandler {
+ /**
+ * @param req
+ * The HTTP request
+ * @param rsp
+ * The HTTP response
+ * @param r
+ * A continuation that handles a git-receive-pack request.
+ * @throws IOException
+ */
+ void receive(HttpServletRequest req, HttpServletResponse rsp,
+ ReceivePackRunnable r) throws IOException;
+
+ /** Process a git-receive-pack request. */
+ public interface ReceivePackRunnable {
+ /**
+ * See {@link ReceivePack#receiveWithExceptionPropagation}.
+ *
+ * @throws ServiceMayNotContinueException
+ * @throws IOException
+ */
+ void receive() throws ServiceMayNotContinueException, IOException;
+ }
+
+}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java
index aed36560a8..eb130d0a28 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java
@@ -71,6 +71,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.errors.PackProtocolException;
import org.eclipse.jgit.errors.UnpackException;
@@ -161,6 +162,13 @@ class ReceivePackServlet extends HttpServlet {
}
}
+ @Nullable
+ private final ReceivePackErrorHandler handler;
+
+ ReceivePackServlet(@Nullable ReceivePackErrorHandler handler) {
+ this.handler = handler;
+ }
+
/** {@inheritDoc} */
@Override
public void doPost(final HttpServletRequest req,
@@ -178,34 +186,42 @@ class ReceivePackServlet extends HttpServlet {
};
ReceivePack rp = (ReceivePack) req.getAttribute(ATTRIBUTE_HANDLER);
- try {
- rp.setBiDirectionalPipe(false);
- rsp.setContentType(RECEIVE_PACK_RESULT_TYPE);
-
- rp.receive(getInputStream(req), out, null);
- out.close();
- } catch (CorruptObjectException e ) {
- // This should be already reported to the client.
- getServletContext().log(MessageFormat.format(
- HttpServerText.get().receivedCorruptObject,
- e.getMessage(),
- ServletUtils.identify(rp.getRepository())));
- consumeRequestBody(req);
- out.close();
-
- } catch (UnpackException | PackProtocolException e) {
- // This should be already reported to the client.
- log(rp.getRepository(), e.getCause());
- consumeRequestBody(req);
- out.close();
-
- } catch (Throwable e) {
- log(rp.getRepository(), e);
- if (!rsp.isCommitted()) {
- rsp.reset();
- sendError(req, rsp, SC_INTERNAL_SERVER_ERROR);
+ rp.setBiDirectionalPipe(false);
+ rsp.setContentType(RECEIVE_PACK_RESULT_TYPE);
+
+ if (handler != null) {
+ handler.receive(req, rsp, () -> {
+ rp.receiveWithExceptionPropagation(getInputStream(req), out,
+ null);
+ out.close();
+ });
+ } else {
+ try {
+ rp.receive(getInputStream(req), out, null);
+ out.close();
+ } catch (CorruptObjectException e ) {
+ // This should be already reported to the client.
+ getServletContext().log(MessageFormat.format(
+ HttpServerText.get().receivedCorruptObject,
+ e.getMessage(),
+ ServletUtils.identify(rp.getRepository())));
+ consumeRequestBody(req);
+ out.close();
+
+ } catch (UnpackException | PackProtocolException e) {
+ // This should be already reported to the client.
+ log(rp.getRepository(), e.getCause());
+ consumeRequestBody(req);
+ out.close();
+
+ } catch (Throwable e) {
+ log(rp.getRepository(), e);
+ if (!rsp.isCommitted()) {
+ rsp.reset();
+ sendError(req, rsp, SC_INTERNAL_SERVER_ERROR);
+ }
+ return;
}
- return;
}
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java
index 54561e0cfc..6baab5ddd7 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java
@@ -70,7 +70,9 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import org.eclipse.jgit.annotations.Nullable;
+import org.eclipse.jgit.errors.PackProtocolException;
import org.eclipse.jgit.http.server.UploadPackErrorHandler.UploadPackRunnable;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.InternalHttpServerGlue;
@@ -212,7 +214,8 @@ class UploadPackServlet extends HttpServlet {
rsp.setContentType(UPLOAD_PACK_RESULT_TYPE);
try {
- up.upload(getInputStream(req), out, null);
+ up.uploadWithExceptionPropagation(getInputStream(req), out,
+ null);
out.close();
} catch (ServiceMayNotContinueException e) {
if (e.isOutput()) {
@@ -245,7 +248,9 @@ class UploadPackServlet extends HttpServlet {
log(up.getRepository(), e);
if (!rsp.isCommitted()) {
rsp.reset();
- sendError(req, rsp, SC_INTERNAL_SERVER_ERROR);
+ String msg = e instanceof PackProtocolException ? e.getMessage()
+ : null;
+ sendError(req, rsp, SC_INTERNAL_SERVER_ERROR, msg);
}
}
}
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
index 97f1105ad2..d4ea158864 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.http.test
Bundle-SymbolicName: org.eclipse.jgit.http.test
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
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.6.0,5.7.0)",
- org.eclipse.jgit.http.server;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.http.server.glue;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.http.server.resolver;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.resolver;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.http.server;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.http.server.glue;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.http.server.resolver;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.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 e055c58a15..94c97427aa 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.test</artifactId>
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 99aa06b17c..b23fd28547 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
@@ -1214,7 +1214,7 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
Collections.<ObjectId> emptySet());
fail("Successfully served ref with value " + c.getRef(master));
} catch (TransportException err) {
- assertEquals("internal server error", err.getMessage());
+ assertEquals("Internal server error", err.getMessage());
}
} finally {
noRefServer.tearDown();
diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
index 5806277710..5c889f6df8 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.junit.http
Bundle-SymbolicName: org.eclipse.jgit.junit.http
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
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.6.0,5.7.0)",
- org.eclipse.jgit.http.server;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.resolver;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.http.server;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.7.0,5.8.0)",
org.junit;version="[4.12,5.0.0)"
-Export-Package: org.eclipse.jgit.junit.http;version="5.6.0";
+Export-Package: org.eclipse.jgit.junit.http;version="5.7.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.junit,
javax.servlet.http,
diff --git a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
index b454cd0fec..3d79cd9825 100644
--- a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.junit.http - Sources
Bundle-SymbolicName: org.eclipse.jgit.junit.http.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml
index c69f194b8a..dbaa2780af 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.http</artifactId>
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
index 7ece7603f9..44a0fb6c43 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.junit.ssh
Bundle-SymbolicName: org.eclipse.jgit.junit.ssh
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
@@ -30,8 +30,8 @@ Import-Package: org.apache.sshd.common;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.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.junit.ssh;version="5.6.0"
+Export-Package: org.eclipse.jgit.junit.ssh;version="5.7.0"
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
index 2438c0085e..98c2db52ed 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.junit.ssh - Sources
Bundle-SymbolicName: org.eclipse.jgit.junit.ssh.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml
index d4591d7338..e81c02db8b 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.ssh</artifactId>
diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
index aedfaa99f2..871e329155 100644
--- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
@@ -3,35 +3,35 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.junit
Bundle-SymbolicName: org.eclipse.jgit.junit
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.annotations;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.api;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.api.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.dircache;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.merge;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="5.6.0",
- org.eclipse.jgit.treewalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util.io;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util.time;version="[5.6.0,5.7.0)",
+Import-Package: org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.api.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.dircache;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.merge;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="5.7.0",
+ org.eclipse.jgit.treewalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util.time;version="[5.7.0,5.8.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;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.6.0";
+Export-Package: org.eclipse.jgit.junit;version="5.7.0";
uses:="org.eclipse.jgit.dircache,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
@@ -44,4 +44,4 @@ Export-Package: org.eclipse.jgit.junit;version="5.6.0";
org.junit.runners.model,
org.junit.runner,
org.eclipse.jgit.util.time",
- org.eclipse.jgit.junit.time;version="5.6.0";uses:="org.eclipse.jgit.util.time"
+ org.eclipse.jgit.junit.time;version="5.7.0";uses:="org.eclipse.jgit.util.time"
diff --git a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
index d9a24d8dea..5fa88cb2a5 100644
--- a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.junit - Sources
Bundle-SymbolicName: org.eclipse.jgit.junit.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml
index af0a7f1c7a..1385f30dcd 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit</artifactId>
diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
index 4279a4aeb9..c4d3c90f00 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs.server.test
Bundle-SymbolicName: org.eclipse.jgit.lfs.server.test
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
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.6.0,5.7.0)",
- org.eclipse.jgit.api.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.server;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.server.fs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.test;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.api.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.server;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.test;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.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 6fb9b78c93..a291e0f7bb 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
index fb0ee06d6e..90ebd90c0c 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs.server
Bundle-SymbolicName: org.eclipse.jgit.lfs.server
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs.server;version="5.6.0";
+Export-Package: org.eclipse.jgit.lfs.server;version="5.7.0";
uses:="javax.servlet.http,
org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.fs;version="5.6.0";
+ org.eclipse.jgit.lfs.server.fs;version="5.7.0";
uses:="javax.servlet,
javax.servlet.http,
org.eclipse.jgit.lfs.server,
org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.internal;version="5.6.0";x-internal:=true,
- org.eclipse.jgit.lfs.server.s3;version="5.6.0";
+ org.eclipse.jgit.lfs.server.internal;version="5.7.0";x-internal:=true,
+ org.eclipse.jgit.lfs.server.s3;version="5.7.0";
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.6.0,5.7.0)",
- org.eclipse.jgit.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.slf4j;version="[1.7.0,2.0.0)"
diff --git a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
index 6f1c3a4731..bac5ee298f 100644
--- a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.lfs.server - Sources
Bundle-SymbolicName: org.eclipse.jgit.lfs.server.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml
index b95806b17d..a8c577a09d 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.server</artifactId>
diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
index 549a0ff8f7..e3fcf70ce2 100644
--- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
@@ -3,22 +3,22 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs.test
Bundle-SymbolicName: org.eclipse.jgit.lfs.test
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.internal.storage.dfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+Import-Package: org.eclipse.jgit.internal.storage.dfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.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.6.0";x-friends:="org.eclipse.jgit.lfs.server.test"
+Export-Package: org.eclipse.jgit.lfs.test;version="5.7.0";x-friends:="org.eclipse.jgit.lfs.server.test"
diff --git a/org.eclipse.jgit.lfs.test/pom.xml b/org.eclipse.jgit.lfs.test/pom.xml
index d1691c3183..778f7a8b6e 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs.test</artifactId>
diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
index 1fd1957afe..a1404f0a47 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs
Bundle-SymbolicName: org.eclipse.jgit.lfs
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs;version="5.6.0",
- org.eclipse.jgit.lfs.errors;version="5.6.0",
- org.eclipse.jgit.lfs.internal;version="5.6.0";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
- org.eclipse.jgit.lfs.lib;version="5.6.0"
+Export-Package: org.eclipse.jgit.lfs;version="5.7.0",
+ org.eclipse.jgit.lfs.errors;version="5.7.0",
+ org.eclipse.jgit.lfs.internal;version="5.7.0";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
+ org.eclipse.jgit.lfs.lib;version="5.7.0"
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.6.0,5.7.0)";resolution:=optional,
- org.eclipse.jgit.api.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.attributes;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.diff;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.hooks;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.pack;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util.io;version="[5.6.0,5.7.0)"
+ org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)";resolution:=optional,
+ org.eclipse.jgit.api.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.attributes;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.diff;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.hooks;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.pack;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)"
diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
index 382d1561e1..4dacb48474 100644
--- a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.lfs - Sources
Bundle-SymbolicName: org.eclipse.jgit.lfs.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index f1df7a0833..49daf4238c 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs</artifactId>
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java
index 3c5826362c..e90d92976a 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java
@@ -106,6 +106,16 @@ public class BuiltinLFS extends LfsFactory {
return null;
}
+ @Override
+ @Nullable
+ public PrePushHook getPrePushHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ if (isEnabled(repo)) {
+ return new LfsPrePushHook(repo, outputStream, errorStream);
+ }
+ return null;
+ }
+
/**
* @param db
* the repository
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
index 3e6a26159b..b3e304fea2 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
@@ -107,6 +107,20 @@ public class LfsPrePushHook extends PrePushHook {
super(repo, outputStream);
}
+ /**
+ * @param repo
+ * the repository
+ * @param outputStream
+ * not used by this implementation
+ * @param errorStream
+ * not used by this implementation
+ * @since 5.6
+ */
+ public LfsPrePushHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ super(repo, outputStream, errorStream);
+ }
+
@Override
public void setRefs(Collection<RemoteRefUpdate> toRefs) {
this.refs = toRefs;
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 fb36ac0abc..7c5106380a 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.6.0.qualifier"
+ version="5.7.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
index 0cbe270867..cc5f5aeb83 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
index de604cd6e0..17a732b4aa 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.6.0.qualifier"
+ version="5.7.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import plugin="org.eclipse.jgit" version="5.6.0" match="equivalent"/>
+ <import plugin="org.eclipse.jgit" version="5.7.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
index 81e69d24f0..66d7b300df 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
index 4604b4f8a0..2b46472561 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.6.0.qualifier"
+ version="5.7.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -24,7 +24,7 @@
<requires>
<import plugin="com.jcraft.jsch"/>
- <import plugin="org.eclipse.jgit" version="5.6.0" match="equivalent"/>
+ <import plugin="org.eclipse.jgit" version="5.7.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
index 5d07fa479b..479dcc0d6f 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
index 1b2897d04c..bc8ff0bd53 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.6.0.qualifier"
+ version="5.7.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import feature="org.eclipse.jgit" version="5.6.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="5.7.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml
index 0a828971bd..8805bba37f 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
index dd662c9f28..62df45ef80 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.6.0.qualifier"
+ version="5.7.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -35,9 +35,9 @@
version="0.0.0"/>
<requires>
- <import feature="org.eclipse.jgit" version="5.6.0" match="equivalent"/>
- <import feature="org.eclipse.jgit.lfs" version="5.6.0" match="equivalent"/>
- <import feature="org.eclipse.jgit.ssh.apache" version="5.6.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="5.7.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit.lfs" version="5.7.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit.ssh.apache" version="5.7.0" match="equivalent"/>
</requires>
<plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
index 504c1a8c90..a0906c5004 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
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 8f21d1d92f..77a6d1a690 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.repository</artifactId>
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 d4828e47c3..caa0dcb09c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.source"
label="%featureName"
- version="5.6.0.qualifier"
+ version="5.7.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import feature="org.eclipse.jgit" version="5.6.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="5.7.0" match="equivalent"/>
</requires>
<plugin
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 933cc8f495..5ab60597e5 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
@@ -63,7 +63,7 @@
<dependency>
<groupId>org.eclipse.jgit.feature</groupId>
<artifactId>org.eclipse.jgit</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
index 2582a77e77..41d251baf3 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.6.0.qualifier"
+ version="5.7.0.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
</url>
<requires>
- <import feature="org.eclipse.jgit" version="5.6.0" match="equivalent"/>
+ <import feature="org.eclipse.jgit" version="5.7.0" match="equivalent"/>
</requires>
<plugin
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 6fa69eae07..d7e8c61623 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
index 068c15dd98..ff1d81c113 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
@@ -2,4 +2,4 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JGit Target Platform Bundle
Bundle-SymbolicName: org.eclipse.jgit.target
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
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 0dd5f82d42..4a0d80d7f6 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="1573254319">
+<target name="jgit-4.10" sequenceNumber="1575495623">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
index 545ad951ed..e85e619ed7 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
@@ -1,7 +1,7 @@
target "jgit-4.10" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/releases/2018-12/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
index 673c1b11be..3d3bb38512 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.11" sequenceNumber="1573254399">
+<target name="jgit-4.11" sequenceNumber="1575495623">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
index 0e3ce8f260..cd09465a4b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
@@ -1,7 +1,7 @@
target "jgit-4.11" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.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.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
index 385c23cf94..380636cfa9 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.12" sequenceNumber="1573254399">
+<target name="jgit-4.12" sequenceNumber="1575495623">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
index e345b9aa6d..8904b99c65 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
@@ -1,7 +1,7 @@
target "jgit-4.12" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/releases/2019-06/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
index 29c23fefd0..e0fb34239e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.13" sequenceNumber="1573254399">
+<target name="jgit-4.13" sequenceNumber="1575495624">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
index 078c0ae5fb..1e5f36f776 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
@@ -1,7 +1,7 @@
target "jgit-4.13" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/releases/2019-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target
index 1d302afecb..f3b5965c42 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-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.14-staging" sequenceNumber="1573254400">
+<target name="jgit-4.14-staging" sequenceNumber="1575495626">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.tpd
index c6e647387d..d58281b75c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.tpd
@@ -1,7 +1,7 @@
target "jgit-4.14-staging" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/staging/2019-12/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
index 4b5cfb8b5a..0c82ed63a3 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="1573254410">
+<target name="jgit-4.6" sequenceNumber="1575495636">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
index 0b8b0d9234..f29a8252b1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
@@ -1,7 +1,7 @@
target "jgit-4.6" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/releases/neon/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
index bb2c342797..1d7acecb5b 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="1573254402">
+<target name="jgit-4.7" sequenceNumber="1575495628">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
index c550b4b4d4..97a2b12e2d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
@@ -1,7 +1,7 @@
target "jgit-4.7" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/releases/oxygen/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
index d8ba4307c3..8b6bd8caff 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="1573254398">
+<target name="jgit-4.8" sequenceNumber="1575495623">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
index fc8d6b4fcb..1fea5c19ee 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
@@ -1,7 +1,7 @@
target "jgit-4.8" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/releases/photon/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
index c95e05f847..67c389bbb7 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="1573254399">
+<target name="jgit-4.9" sequenceNumber="1575495623">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.22.v20191022"/>
@@ -57,12 +57,12 @@
<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"/>
- <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191104-1935"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191104-1935"/>
+ <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcpkix.source" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov" version="1.64.0.v20191109-0815"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.64.0.v20191109-0815"/>
<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"/>
@@ -82,7 +82,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
<unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
index 27bb6db7c2..af165488b1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
@@ -1,7 +1,7 @@
target "jgit-4.9" with source configurePhase
include "projects/jetty-9.4.22.tpd"
-include "orbit/I20191106190530.tpd"
+include "orbit/R20191126223242-2019-12.tpd"
location "http://download.eclipse.org/releases/2018-09/" {
org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20191106190530.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20191126223242-2019-12.tpd
index c42871466e..679e919cdb 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20191106190530.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20191126223242-2019-12.tpd
@@ -1,7 +1,7 @@
-target "I20191106190530" with source configurePhase
+target "R20191126223242-2019-12" with source configurePhase
// see http://download.eclipse.org/tools/orbit/downloads/
-location "https://download.eclipse.org/tools/orbit/downloads/drops/I20191106190530/repository" {
+location "https://download.eclipse.org/tools/orbit/downloads/drops/R20191126223242/repository" {
com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
@@ -36,12 +36,12 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I201911061905
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]
- org.bouncycastle.bcpg [1.64.0.v20191104-1935,1.64.0.v20191104-1935]
- org.bouncycastle.bcpg.source [1.64.0.v20191104-1935,1.64.0.v20191104-1935]
- org.bouncycastle.bcpkix [1.64.0.v20191104-1935,1.64.0.v20191104-1935]
- org.bouncycastle.bcpkix.source [1.64.0.v20191104-1935,1.64.0.v20191104-1935]
- org.bouncycastle.bcprov [1.64.0.v20191104-1935,1.64.0.v20191104-1935]
- org.bouncycastle.bcprov.source [1.64.0.v20191104-1935,1.64.0.v20191104-1935]
+ org.bouncycastle.bcpg [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
+ org.bouncycastle.bcpg.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
+ org.bouncycastle.bcpkix [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
+ org.bouncycastle.bcpkix.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
+ org.bouncycastle.bcprov [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
+ org.bouncycastle.bcprov.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000]
org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20191025144108-2019-12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20191025144108-2019-12.tpd
deleted file mode 100644
index 6f858ff5da..0000000000
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20191025144108-2019-12.tpd
+++ /dev/null
@@ -1,65 +0,0 @@
-target "S20191025144108-2019-12" with source configurePhase
-// see http://download.eclipse.org/tools/orbit/downloads/
-
-location "https://download.eclipse.org/tools/orbit/downloads/drops/S20191025144108/repository" {
- com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
- com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
- com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
- com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
- com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305]
- com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305]
- javaewah [1.1.6.v20160919-1400,1.1.6.v20160919-1400]
- javaewah.source [1.1.6.v20160919-1400,1.1.6.v20160919-1400]
- javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800]
- javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800]
- net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
- net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
- net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
- net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
- net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
- net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
- org.apache.ant [1.10.7.v20190926-0324,1.10.7.v20190926-0324]
- org.apache.ant.source [1.10.7.v20190926-0324,1.10.7.v20190926-0324]
- org.apache.commons.codec [1.10.0.v20180409-1845,1.10.0.v20180409-1845]
- org.apache.commons.codec.source [1.10.0.v20180409-1845,1.10.0.v20180409-1845]
- org.apache.commons.compress [1.18.0.v20181121-2221,1.18.0.v20181121-2221]
- org.apache.commons.compress.source [1.18.0.v20181121-2221,1.18.0.v20181121-2221]
- org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
- org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
- org.apache.httpcomponents.httpclient [4.5.6.v20190503-0009,4.5.6.v20190503-0009]
- org.apache.httpcomponents.httpclient.source [4.5.6.v20190503-0009,4.5.6.v20190503-0009]
- org.apache.httpcomponents.httpcore [4.4.10.v20190123-2214,4.4.10.v20190123-2214]
- 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.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]
- 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.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000]
- org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
- org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
- org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
- org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
- org.junit [4.12.0.v201504281640,4.12.0.v201504281640]
- org.junit.source [4.12.0.v201504281640,4.12.0.v201504281640]
- org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
- org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
- org.mockito [2.23.0.v20190527-1420,2.23.0.v20190527-1420]
- org.mockito.source [2.23.0.v20190527-1420,2.23.0.v20190527-1420]
- org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
- org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
- org.slf4j.api [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
- org.slf4j.api.source [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
- org.slf4j.impl.log4j12 [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
- org.slf4j.impl.log4j12.source [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
- org.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
- org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
-}
-
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 e8d9df0467..6f0a99450f 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-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 47a8030183..6eeb61745d 100644
--- a/org.eclipse.jgit.packaging/pom.xml
+++ b/org.eclipse.jgit.packaging/pom.xml
@@ -49,7 +49,7 @@
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JGit Tycho Parent</name>
diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
index fc36051db5..b48c1e5ff2 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.pgm.test
Bundle-SymbolicName: org.eclipse.jgit.pgm.test
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.api;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.api.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.diff;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.dircache;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="5.6.0",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.merge;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.pgm;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.pgm.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.pgm.opt;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util.io;version="[5.6.0,5.7.0)",
+Import-Package: org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.api.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.diff;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.dircache;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="5.7.0",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.merge;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.pgm;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.pgm.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.pgm.opt;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util.io;version="[5.7.0,5.8.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 1ba893c7f7..b1473ab919 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm.test</artifactId>
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BlameTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BlameTest.java
index e806872c14..6da1e463f0 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BlameTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BlameTest.java
@@ -42,8 +42,14 @@
*/
package org.eclipse.jgit.pgm;
+import static org.junit.Assert.assertTrue;
+
import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.MergeResult;
import org.eclipse.jgit.lib.CLIRepositoryTestCase;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.PersonIdent;
+import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -85,7 +91,7 @@ public class BlameTest extends CLIRepositoryTestCase {
git.add().addFilepattern("inIndex.txt").call();
}
assertStringArrayEquals(
- " (Not Committed Yet 1) index",
+ "00000000 (Not Committed Yet 2009-08-15 20:12:58 -0330 1) index",
execute("git blame inIndex.txt"));
}
@@ -119,4 +125,36 @@ public class BlameTest extends CLIRepositoryTestCase {
thrown.expectMessage("no such path 'sub/does_not_exist.txt' in HEAD");
execute("git blame sub/does_not_exist.txt");
}
+
+ @Test
+ public void testBlameMergeConflict() throws Exception {
+ try (Git git = new Git(db)) {
+ writeTrashFile("file", "Origin\n");
+ git.add().addFilepattern("file").call();
+ git.commit().setMessage("initial commit").call();
+ git.checkout().setCreateBranch(true)
+ .setName("side").call();
+ writeTrashFile("file",
+ "Conflicting change from side branch\n");
+ git.add().addFilepattern("file").call();
+ RevCommit side = git.commit().setMessage("side commit")
+ .setCommitter(new PersonIdent("gitter", "")).call();
+ git.checkout().setName(Constants.MASTER).call();
+ writeTrashFile("file", "Change on master branch\n");
+ git.add().addFilepattern("file").call();
+ git.commit().setMessage("Commit conflict on master")
+ .setCommitter(new PersonIdent("gitter", "")).call();
+ MergeResult result = git.merge()
+ .include("side", side).call();
+ assertTrue("Expected conflict on 'file'",
+ result.getConflicts().containsKey("file"));
+ }
+ String[] expected = {
+ "00000000 (Not Committed Yet 2009-08-15 20:12:58 -0330 1) <<<<<<< HEAD",
+ "0f5b671c (gitter 2009-08-15 20:12:58 -0330 2) Change on master branch",
+ "00000000 (Not Committed Yet 2009-08-15 20:12:58 -0330 3) =======",
+ "ae78cff6 (gitter 2009-08-15 20:12:58 -0330 4) Conflicting change from side branch",
+ "00000000 (Not Committed Yet 2009-08-15 20:12:58 -0330 5) >>>>>>> side" };
+ assertArrayOfLinesEquals(expected, execute("git blame file"));
+ }
}
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index 48dc730011..b280658a23 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: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.pgm
Bundle-SymbolicName: org.eclipse.jgit.pgm
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
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.6.0,5.7.0)",
- org.eclipse.jgit.api.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.archive;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.awtui;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.blame;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.diff;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.dircache;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.gitrepo;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.ketch;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.io;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.reftree;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.server;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.server.fs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs.server.s3;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.merge;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.notes;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revplot;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.pack;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.resolver;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.sshd;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util.io;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.api.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.archive;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.awtui;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.blame;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.diff;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.dircache;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.gitrepo;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.ketch;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.io;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.reftree;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.server;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs.server.s3;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.merge;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.notes;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revplot;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.pack;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.sshd;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util.io;version="[5.7.0,5.8.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.6.0";
+Export-Package: org.eclipse.jgit.console;version="5.7.0";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.util",
- org.eclipse.jgit.pgm;version="5.6.0";
+ org.eclipse.jgit.pgm;version="5.7.0";
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.6.0";
org.eclipse.jgit.treewalk,
javax.swing,
org.eclipse.jgit.transport",
- org.eclipse.jgit.pgm.debug;version="5.6.0";
+ org.eclipse.jgit.pgm.debug;version="5.7.0";
uses:="org.eclipse.jgit.util.io,
org.eclipse.jgit.pgm",
- org.eclipse.jgit.pgm.internal;version="5.6.0";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test",
- org.eclipse.jgit.pgm.opt;version="5.6.0";
+ org.eclipse.jgit.pgm.internal;version="5.7.0";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test",
+ org.eclipse.jgit.pgm.opt;version="5.7.0";
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 70aa5003dd..95f81a3b4f 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.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index 003076fd98..c460713159 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm</artifactId>
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 b67b04c5be..1a4c111bcb 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
@@ -50,7 +50,6 @@ import static java.lang.Integer.valueOf;
import static java.lang.Long.valueOf;
import static org.eclipse.jgit.lib.Constants.OBJECT_ID_STRING_LENGTH;
-import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
@@ -60,11 +59,11 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
+import org.eclipse.jgit.api.errors.NoHeadException;
import org.eclipse.jgit.blame.BlameGenerator;
import org.eclipse.jgit.blame.BlameResult;
import org.eclipse.jgit.diff.RawText;
import org.eclipse.jgit.diff.RawTextComparator;
-import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.errors.NoWorkTreeException;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
@@ -134,6 +133,9 @@ class Blame extends TextBuiltin {
private BlameResult blame;
+ /** Used to get a current time stamp for lines without commit. */
+ private final PersonIdent dummyDate = new PersonIdent("", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
/** {@inheritDoc} */
@Override
protected void run() {
@@ -186,28 +188,7 @@ class Blame extends TextBuiltin {
}
generator.push(null, rev);
} else {
- ObjectId head = db.resolve(Constants.HEAD);
- if (head == null) {
- throw die(MessageFormat.format(CLIText.get().noSuchRef,
- Constants.HEAD));
- }
- generator.push(null, head);
- if (!db.isBare()) {
- DirCache dc = db.readDirCache();
- int entry = dc.findEntry(file);
- if (0 <= entry) {
- generator.push(null, dc.getEntry(entry).getObjectId());
- } else {
- throw die(MessageFormat.format(
- CLIText.get().noSuchPathInRef, file,
- Constants.HEAD));
- }
-
- File inTree = new File(db.getWorkTree(), file);
- if (db.getFS().isFile(inTree)) {
- generator.push(null, new RawText(inTree));
- }
- }
+ generator.prepareHead();
}
blame = BlameResult.create(generator);
@@ -236,6 +217,10 @@ class Blame extends TextBuiltin {
authorWidth = Math.max(authorWidth, author(line).length());
dateWidth = Math.max(dateWidth, date(line).length());
pathWidth = Math.max(pathWidth, path(line).length());
+ } else if (c == null) {
+ authorWidth = Math.max(authorWidth, author(line).length());
+ dateWidth = Math.max(dateWidth, date(line).length());
+ pathWidth = Math.max(pathWidth, path(line).length());
}
while (line + 1 < end
&& sameCommit(blame.getSourceCommit(line + 1), c)) {
@@ -280,7 +265,7 @@ class Blame extends TextBuiltin {
} while (++line < end
&& sameCommit(blame.getSourceCommit(line), c));
}
- } catch (NoWorkTreeException | IOException e) {
+ } catch (NoWorkTreeException | NoHeadException | IOException e) {
throw die(e.getMessage(), e);
}
}
@@ -373,10 +358,12 @@ class Blame extends TextBuiltin {
}
private String date(int line) {
- if (blame.getSourceCommit(line) == null)
- return ""; //$NON-NLS-1$
-
- PersonIdent author = blame.getSourceAuthor(line);
+ PersonIdent author;
+ if (blame.getSourceCommit(line) == null) {
+ author = dummyDate;
+ } else {
+ author = blame.getSourceAuthor(line);
+ }
if (author == null)
return ""; //$NON-NLS-1$
@@ -394,28 +381,37 @@ class Blame extends TextBuiltin {
if (r != null)
return r;
- if (showBlankBoundary && commit.getParentCount() == 0)
- commit = null;
-
if (commit == null) {
- int len = showLongRevision ? OBJECT_ID_STRING_LENGTH : (abbrev + 1);
- StringBuilder b = new StringBuilder(len);
- for (int i = 0; i < len; i++)
- b.append(' ');
- r = b.toString();
-
- } else if (!root && commit.getParentCount() == 0) {
- if (showLongRevision)
- r = "^" + commit.name().substring(0, OBJECT_ID_STRING_LENGTH - 1); //$NON-NLS-1$
- else
- r = "^" + reader.abbreviate(commit, abbrev).name(); //$NON-NLS-1$
+ if (showLongRevision) {
+ r = ObjectId.zeroId().name();
+ } else {
+ r = ObjectId.zeroId().abbreviate(abbrev + 1).name();
+ }
} else {
- if (showLongRevision)
- r = commit.name();
- else
- r = reader.abbreviate(commit, abbrev + 1).name();
+ if (showBlankBoundary && commit.getParentCount() == 0)
+ commit = null;
+
+ if (commit == null) {
+ int len = showLongRevision ? OBJECT_ID_STRING_LENGTH
+ : (abbrev + 1);
+ StringBuilder b = new StringBuilder(len);
+ for (int i = 0; i < len; i++)
+ b.append(' ');
+ r = b.toString();
+
+ } else if (!root && commit.getParentCount() == 0) {
+ if (showLongRevision)
+ r = "^" + commit.name().substring(0, //$NON-NLS-1$
+ OBJECT_ID_STRING_LENGTH - 1);
+ else
+ r = "^" + reader.abbreviate(commit, abbrev).name(); //$NON-NLS-1$
+ } else {
+ if (showLongRevision)
+ r = commit.name();
+ else
+ r = reader.abbreviate(commit, abbrev + 1).name();
+ }
}
-
abbreviatedCommits.put(commit, r);
return r;
}
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 4bae3d9b6e..8fd1756440 100644
--- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ssh.apache.test
Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.test
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -15,15 +15,15 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.2.0,2.3.0)",
org.apache.sshd.common.session;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.eclipse.jgit.api.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit.ssh;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.ssh;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.sshd;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.api.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.ssh;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.sshd;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.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 838fd83f6d..413daae4dc 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
index 209a10f491..2ca1175635 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
@@ -6,9 +6,9 @@ Bundle-SymbolicName: org.eclipse.jgit.ssh.apache
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.6.0";x-internal:=true;
+Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.7.0";x-internal:=true;
uses:="org.apache.sshd.client,
org.apache.sshd.client.auth,
org.apache.sshd.client.auth.keyboard,
@@ -23,9 +23,9 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.6.0";x-inter
org.apache.sshd.common.signature,
org.apache.sshd.common.util.buffer,
org.eclipse.jgit.transport",
- org.eclipse.jgit.internal.transport.sshd.auth;version="5.6.0";x-internal:=true,
- org.eclipse.jgit.internal.transport.sshd.proxy;version="5.6.0";x-friends:="org.eclipse.jgit.ssh.apache.test",
- org.eclipse.jgit.transport.sshd;version="5.6.0";
+ org.eclipse.jgit.internal.transport.sshd.auth;version="5.7.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="5.7.0";x-friends:="org.eclipse.jgit.ssh.apache.test",
+ org.eclipse.jgit.transport.sshd;version="5.7.0";
uses:="org.eclipse.jgit.transport,
org.apache.sshd.client.config.hosts,
org.apache.sshd.common.keyprovider,
@@ -75,12 +75,12 @@ Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.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.6.0,5.7.0)",
- org.eclipse.jgit.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.fnmatch;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.fnmatch;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.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 c1d8d9a29a..56d4bcdb2a 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.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml
index 26e44b085d..af0f0fd022 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index 8043065389..d8f6bcfe28 100644
--- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.test
Bundle-SymbolicName: org.eclipse.jgit.test
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
@@ -18,58 +18,58 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)",
org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)",
org.bouncycastle.util.encoders;version="[1.61.0,2.0.0)",
- org.eclipse.jgit.annotations;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.api;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.api.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.archive;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.attributes;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.awtui;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.blame;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.diff;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.dircache;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.events;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.fnmatch;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.gitrepo;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.hooks;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.ignore;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.ignore.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.fsck;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.io;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.storage.reftree;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.transport.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.internal.transport.parser;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit.ssh;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.junit.time;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lfs;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.merge;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.notes;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.patch;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.pgm;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.pgm.internal;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revplot;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.file;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.storage.pack;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.submodule;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.http;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport.resolver;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util.io;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util.sha1;version="[5.6.0,5.7.0)",
+ org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.api.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.archive;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.attributes;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.awtui;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.blame;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.diff;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.dircache;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.events;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.fnmatch;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.gitrepo;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.hooks;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.ignore;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.ignore.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.fsck;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.io;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.storage.reftree;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.transport.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.junit.time;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lfs;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.merge;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.notes;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.patch;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.pgm;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.pgm.internal;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revplot;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.file;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.storage.pack;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.submodule;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.http;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util.sha1;version="[5.7.0,5.8.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)",
@@ -84,4 +84,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.6.0";x-friends:="org.eclipse.jgit.ssh.apache.test"
+Export-Package: org.eclipse.jgit.transport.ssh;version="5.7.0";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 d8af7dc524..1bd4b27f5e 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.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.test</artifactId>
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java
index 7e73084e8e..4d1375a2f5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, GitHub Inc.
+ * Copyright (C) 2011, 2019 GitHub Inc.
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@@ -44,6 +44,7 @@ package org.eclipse.jgit.api;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
@@ -462,6 +463,39 @@ public class BlameCommandTest extends RepositoryTestCase {
}
@Test
+ public void testUnresolvedMergeConflict() throws Exception {
+ try (Git git = new Git(db)) {
+ RevCommit base = commitFile("file.txt", "Origin\n", "master");
+
+ RevCommit master = commitFile("file.txt",
+ "Change on master branch\n", "master");
+
+ git.checkout().setName("side").setCreateBranch(true)
+ .setStartPoint(base).call();
+ RevCommit side = commitFile("file.txt",
+ "Conflicting change on side\n", "side");
+
+ checkoutBranch("refs/heads/master");
+ MergeResult result = git.merge().include(side).call();
+
+ // The merge results in a conflict, which we do not resolve
+ assertTrue("Expected a conflict",
+ result.getConflicts().containsKey("file.txt"));
+
+ BlameCommand command = new BlameCommand(db);
+ command.setFilePath("file.txt");
+ BlameResult lines = command.call();
+
+ assertEquals(5, lines.getResultContents().size());
+ assertNull(lines.getSourceCommit(0));
+ assertEquals(master, lines.getSourceCommit(1));
+ assertNull(lines.getSourceCommit(2));
+ assertEquals(side, lines.getSourceCommit(3));
+ assertNull(lines.getSourceCommit(4));
+ }
+ }
+
+ @Test
public void testWhitespaceMerge() throws Exception {
try (Git git = new Git(db)) {
RevCommit base = commitFile("file.txt", join("0", "1", "2"), "master");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java
index c028ca300c..2c51f7b9b7 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java
@@ -40,6 +40,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
package org.eclipse.jgit.api;
import static java.nio.charset.StandardCharsets.UTF_8;
@@ -50,14 +51,10 @@ import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;
import java.io.File;
-import java.io.IOException;
import java.io.PrintWriter;
import org.eclipse.jgit.api.errors.GitAPIException;
-import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.api.errors.NoMessageException;
-import org.eclipse.jgit.errors.IncorrectObjectTypeException;
-import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
@@ -76,13 +73,12 @@ import org.junit.Test;
*/
public class CommitAndLogCommandTest extends RepositoryTestCase {
@Test
- public void testSomeCommits() throws JGitInternalException, IOException,
- GitAPIException {
-
+ public void testSomeCommits() throws Exception {
// do 4 commits
try (Git git = new Git(db)) {
git.commit().setMessage("initial commit").call();
- git.commit().setMessage("second commit").setCommitter(committer).call();
+ git.commit().setMessage("second commit").setCommitter(committer)
+ .call();
git.commit().setMessage("third commit").setAuthor(author).call();
git.commit().setMessage("fourth commit").setAuthor(author)
.setCommitter(committer).call();
@@ -90,79 +86,28 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
// check that all commits came in correctly
PersonIdent defaultCommitter = new PersonIdent(db);
- PersonIdent expectedAuthors[] = new PersonIdent[] { defaultCommitter,
- committer, author, author };
+ PersonIdent expectedAuthors[] = new PersonIdent[] {
+ defaultCommitter, committer, author, author };
PersonIdent expectedCommitters[] = new PersonIdent[] {
defaultCommitter, committer, defaultCommitter, committer };
String expectedMessages[] = new String[] { "initial commit",
"second commit", "third commit", "fourth commit" };
int l = expectedAuthors.length - 1;
for (RevCommit c : commits) {
- assertEquals(expectedAuthors[l].getName(), c.getAuthorIdent()
- .getName());
- assertEquals(expectedCommitters[l].getName(), c.getCommitterIdent()
- .getName());
+ assertEquals(expectedAuthors[l].getName(),
+ c.getAuthorIdent().getName());
+ assertEquals(expectedCommitters[l].getName(),
+ c.getCommitterIdent().getName());
assertEquals(c.getFullMessage(), expectedMessages[l]);
l--;
}
assertEquals(l, -1);
ReflogReader reader = db.getReflogReader(Constants.HEAD);
- assertTrue(reader.getLastEntry().getComment().startsWith("commit:"));
+ assertTrue(
+ reader.getLastEntry().getComment().startsWith("commit:"));
reader = db.getReflogReader(db.getBranch());
- assertTrue(reader.getLastEntry().getComment().startsWith("commit:"));
- }
- }
-
- @Test
- public void testLogWithFilter() throws IOException, JGitInternalException,
- GitAPIException {
-
- try (Git git = new Git(db)) {
- // create first file
- File file = new File(db.getWorkTree(), "a.txt");
- FileUtils.createNewFile(file);
- try (PrintWriter writer = new PrintWriter(file, UTF_8.name())) {
- writer.print("content1");
- }
-
- // First commit - a.txt file
- git.add().addFilepattern("a.txt").call();
- git.commit().setMessage("commit1").setCommitter(committer).call();
-
- // create second file
- file = new File(db.getWorkTree(), "b.txt");
- FileUtils.createNewFile(file);
- try (PrintWriter writer = new PrintWriter(file, UTF_8.name())) {
- writer.print("content2");
- }
-
- // Second commit - b.txt file
- git.add().addFilepattern("b.txt").call();
- git.commit().setMessage("commit2").setCommitter(committer).call();
-
- // First log - a.txt filter
- int count = 0;
- for (RevCommit c : git.log().addPath("a.txt").call()) {
- assertEquals("commit1", c.getFullMessage());
- count++;
- }
- assertEquals(1, count);
-
- // Second log - b.txt filter
- count = 0;
- for (RevCommit c : git.log().addPath("b.txt").call()) {
- assertEquals("commit2", c.getFullMessage());
- count++;
- }
- assertEquals(1, count);
-
- // Third log - without filter
- count = 0;
- for (RevCommit c : git.log().call()) {
- assertEquals(committer, c.getCommitterIdent());
- count++;
- }
- assertEquals(2, count);
+ assertTrue(
+ reader.getLastEntry().getComment().startsWith("commit:"));
}
}
@@ -204,19 +149,20 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
}
@Test
- public void testMergeEmptyBranches() throws IOException,
- JGitInternalException, GitAPIException {
+ public void testMergeEmptyBranches() throws Exception {
try (Git git = new Git(db)) {
git.commit().setMessage("initial commit").call();
RefUpdate r = db.updateRef("refs/heads/side");
r.setNewObjectId(db.resolve(Constants.HEAD));
assertEquals(r.forceUpdate(), RefUpdate.Result.NEW);
- RevCommit second = git.commit().setMessage("second commit").setCommitter(committer).call();
+ RevCommit second = git.commit().setMessage("second commit")
+ .setCommitter(committer).call();
db.updateRef(Constants.HEAD).link("refs/heads/side");
- RevCommit firstSide = git.commit().setMessage("first side commit").setAuthor(author).call();
+ RevCommit firstSide = git.commit().setMessage("first side commit")
+ .setAuthor(author).call();
- write(new File(db.getDirectory(), Constants.MERGE_HEAD), ObjectId
- .toString(db.resolve("refs/heads/master")));
+ write(new File(db.getDirectory(), Constants.MERGE_HEAD),
+ ObjectId.toString(db.resolve("refs/heads/master")));
write(new File(db.getDirectory(), Constants.MERGE_MSG), "merging");
RevCommit commit = git.commit().call();
@@ -228,8 +174,7 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
}
@Test
- public void testAddUnstagedChanges() throws IOException,
- JGitInternalException, GitAPIException {
+ public void testAddUnstagedChanges() throws Exception {
File file = new File(db.getWorkTree(), "a.txt");
FileUtils.createNewFile(file);
try (PrintWriter writer = new PrintWriter(file, UTF_8.name())) {
@@ -260,7 +205,7 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
}
@Test
- public void testModeChange() throws IOException, GitAPIException {
+ public void testModeChange() throws Exception {
assumeFalse(System.getProperty("os.name").startsWith("Windows"));// SKIP
try (Git git = new Git(db)) {
// create file
@@ -278,7 +223,8 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
FS fs = db.getFS();
fs.setExecute(file, true);
git.add().addFilepattern("a.txt").call();
- git.commit().setMessage("mode change").setCommitter(committer).call();
+ git.commit().setMessage("mode change").setCommitter(committer)
+ .call();
// pure mode change should be committable with -o option
fs.setExecute(file, false);
@@ -289,34 +235,32 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
}
@Test
- public void testCommitRange() throws GitAPIException,
- JGitInternalException, MissingObjectException,
- IncorrectObjectTypeException {
+ public void testCommitRange() throws Exception {
// do 4 commits and set the range to the second and fourth one
try (Git git = new Git(db)) {
git.commit().setMessage("first commit").call();
RevCommit second = git.commit().setMessage("second commit")
.setCommitter(committer).call();
git.commit().setMessage("third commit").setAuthor(author).call();
- RevCommit last = git.commit().setMessage("fourth commit").setAuthor(
- author)
- .setCommitter(committer).call();
- Iterable<RevCommit> commits = git.log().addRange(second.getId(),
- last.getId()).call();
+ RevCommit last = git.commit().setMessage("fourth commit")
+ .setAuthor(author).setCommitter(committer).call();
+ Iterable<RevCommit> commits = git.log()
+ .addRange(second.getId(), last.getId()).call();
// check that we have the third and fourth commit
PersonIdent defaultCommitter = new PersonIdent(db);
- PersonIdent expectedAuthors[] = new PersonIdent[] { author, author };
+ PersonIdent expectedAuthors[] = new PersonIdent[] { author,
+ author };
PersonIdent expectedCommitters[] = new PersonIdent[] {
defaultCommitter, committer };
String expectedMessages[] = new String[] { "third commit",
"fourth commit" };
int l = expectedAuthors.length - 1;
for (RevCommit c : commits) {
- assertEquals(expectedAuthors[l].getName(), c.getAuthorIdent()
- .getName());
- assertEquals(expectedCommitters[l].getName(), c.getCommitterIdent()
- .getName());
+ assertEquals(expectedAuthors[l].getName(),
+ c.getAuthorIdent().getName());
+ assertEquals(expectedCommitters[l].getName(),
+ c.getCommitterIdent().getName());
assertEquals(c.getFullMessage(), expectedMessages[l]);
l--;
}
@@ -325,8 +269,7 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
}
@Test
- public void testCommitAmend() throws JGitInternalException, IOException,
- GitAPIException {
+ public void testCommitAmend() throws Exception {
try (Git git = new Git(db)) {
git.commit().setMessage("first comit").call(); // typo
git.commit().setAmend(true).setMessage("first commit").call();
@@ -348,15 +291,14 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
}
@Test
- public void testInsertChangeId() throws JGitInternalException,
- GitAPIException {
+ public void testInsertChangeId() throws Exception {
try (Git git = new Git(db)) {
String messageHeader = "Some header line\n\nSome detail explanation\n";
String changeIdTemplate = "\nChange-Id: I"
+ ObjectId.zeroId().getName() + "\n";
String messageFooter = "Some foooter lines\nAnother footer line\n";
- RevCommit commit = git.commit().setMessage(
- messageHeader + messageFooter)
+ RevCommit commit = git.commit()
+ .setMessage(messageHeader + messageFooter)
.setInsertChangeId(true).call();
// we should find a real change id (at the end of the file)
byte[] chars = commit.getFullMessage().getBytes(UTF_8);
@@ -364,11 +306,12 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
String lastLine = RawParseUtils.decode(chars, lastLineBegin + 1,
chars.length);
assertTrue(lastLine.contains("Change-Id:"));
- assertFalse(lastLine.contains(
- "Change-Id: I" + ObjectId.zeroId().getName()));
+ assertFalse(lastLine
+ .contains("Change-Id: I" + ObjectId.zeroId().getName()));
- commit = git.commit().setMessage(
- messageHeader + changeIdTemplate + messageFooter)
+ commit = git.commit()
+ .setMessage(
+ messageHeader + changeIdTemplate + messageFooter)
.setInsertChangeId(true).call();
// we should find a real change id (in the line as dictated by the
// template)
@@ -383,11 +326,12 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
String line = RawParseUtils.decode(chars, lineStart, lineEnd);
assertTrue(line.contains("Change-Id:"));
- assertFalse(line.contains(
- "Change-Id: I" + ObjectId.zeroId().getName()));
+ assertFalse(line
+ .contains("Change-Id: I" + ObjectId.zeroId().getName()));
- commit = git.commit().setMessage(
- messageHeader + changeIdTemplate + messageFooter)
+ commit = git.commit()
+ .setMessage(
+ messageHeader + changeIdTemplate + messageFooter)
.setInsertChangeId(false).call();
// we should find the untouched template
chars = commit.getFullMessage().getBytes(UTF_8);
@@ -400,8 +344,8 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
line = RawParseUtils.decode(chars, lineStart, lineEnd);
- assertTrue(commit.getFullMessage().contains(
- "Change-Id: I" + ObjectId.zeroId().getName()));
+ assertTrue(commit.getFullMessage()
+ .contains("Change-Id: I" + ObjectId.zeroId().getName()));
}
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogFilterTest.java
new file mode 100644
index 0000000000..988ca58906
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogFilterTest.java
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 2019, John Tipper <John_Tipper@hotmail.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.
+ */
+package org.eclipse.jgit.api;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Iterator;
+
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.util.FileUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Testing the log command with include and exclude filters
+ */
+public class LogFilterTest extends RepositoryTestCase {
+ private Git git;
+
+ @Before
+ public void setup() throws Exception {
+ super.setUp();
+ git = new Git(db);
+
+ // create first file
+ File file = new File(db.getWorkTree(), "a.txt");
+ FileUtils.createNewFile(file);
+ try (PrintWriter writer = new PrintWriter(file, UTF_8.name())) {
+ writer.print("content1");
+ }
+
+ // First commit - a.txt file
+ git.add().addFilepattern("a.txt").call();
+ git.commit().setMessage("commit1").setCommitter(committer).call();
+
+ // create second file
+ file = new File(db.getWorkTree(), "b.txt");
+ FileUtils.createNewFile(file);
+ try (PrintWriter writer = new PrintWriter(file, UTF_8.name())) {
+ writer.print("content2");
+ }
+
+ // Second commit - b.txt file
+ git.add().addFilepattern("b.txt").call();
+ git.commit().setMessage("commit2").setCommitter(committer).call();
+
+ // create third file
+ Path includeSubdir = Paths.get(db.getWorkTree().toString(),
+ "subdir-include");
+ includeSubdir.toFile().mkdirs();
+ file = Paths.get(includeSubdir.toString(), "c.txt").toFile();
+ FileUtils.createNewFile(file);
+ try (PrintWriter writer = new PrintWriter(file, UTF_8.name())) {
+ writer.print("content3");
+ }
+
+ // Third commit - c.txt file
+ git.add().addFilepattern("subdir-include").call();
+ git.commit().setMessage("commit3").setCommitter(committer).call();
+
+ // create fourth file
+ Path excludeSubdir = Paths.get(db.getWorkTree().toString(),
+ "subdir-exclude");
+ excludeSubdir.toFile().mkdirs();
+ file = Paths.get(excludeSubdir.toString(), "d.txt").toFile();
+ FileUtils.createNewFile(file);
+ try (PrintWriter writer = new PrintWriter(file, UTF_8.name())) {
+ writer.print("content4");
+ }
+
+ // Fourth commit - d.txt file
+ git.add().addFilepattern("subdir-exclude").call();
+ git.commit().setMessage("commit4").setCommitter(committer).call();
+ }
+
+ @After
+ @Override
+ public void tearDown() throws Exception {
+ git.close();
+ super.tearDown();
+ }
+
+ @Test
+ public void testLogWithFilterCanDistinguishFilesByPath() throws Exception {
+ int count = 0;
+ for (RevCommit c : git.log().addPath("a.txt").call()) {
+ assertEquals("commit1", c.getFullMessage());
+ count++;
+ }
+ assertEquals(1, count);
+
+ count = 0;
+ for (RevCommit c : git.log().addPath("b.txt").call()) {
+ assertEquals("commit2", c.getFullMessage());
+ count++;
+ }
+ assertEquals(1, count);
+ }
+
+ @Test
+ public void testLogWithFilterCanIncludeFilesInDirectory() throws Exception {
+ int count = 0;
+ for (RevCommit c : git.log().addPath("subdir-include").call()) {
+ assertEquals("commit3", c.getFullMessage());
+ count++;
+ }
+ assertEquals(1, count);
+ }
+
+ @Test
+ public void testLogWithFilterCanExcludeFilesInDirectory() throws Exception {
+ int count = 0;
+ Iterator it = git.log().excludePath("subdir-exclude").call().iterator();
+ while (it.hasNext()) {
+ it.next();
+ count++;
+ }
+ // of all the commits, we expect to filter out only d.txt
+ assertEquals(3, count);
+ }
+
+ @Test
+ public void testLogWithoutFilter() throws Exception {
+ int count = 0;
+ for (RevCommit c : git.log().call()) {
+ assertEquals(committer, c.getCommitterIdent());
+ count++;
+ }
+ assertEquals(4, count);
+ }
+
+ @Test
+ public void testLogWithFilterCanExcludeAndIncludeFilesInDifferentDirectories()
+ throws Exception {
+ int count = 0;
+ Iterator it = git.log().addPath("subdir-include")
+ .excludePath("subdir-exclude").call().iterator();
+ while (it.hasNext()) {
+ it.next();
+ count++;
+ }
+ // we expect to include c.txt
+ assertEquals(1, count);
+ }
+
+ @Test
+ public void testLogWithFilterExcludeAndIncludeSameFileIncludesNothing()
+ throws Exception {
+ int count = 0;
+ Iterator it = git.log().addPath("subdir-exclude")
+ .excludePath("subdir-exclude").call().iterator();
+
+ while (it.hasNext()) {
+ it.next();
+ count++;
+ }
+ // we expect the exclude to trump everything
+ assertEquals(0, count);
+ }
+
+ @Test
+ public void testLogWithFilterCanExcludeFileAndDirectory() throws Exception {
+ int count = 0;
+ Iterator it = git.log().excludePath("b.txt")
+ .excludePath("subdir-exclude").call().iterator();
+
+ while (it.hasNext()) {
+ it.next();
+ count++;
+ }
+ // we expect a.txt and c.txt
+ assertEquals(2, count);
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableTest.java
index bb68ef185a..cdc64fa1b2 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableTest.java
@@ -73,6 +73,7 @@ import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RefUpdate.Result;
import org.eclipse.jgit.lib.ReflogEntry;
import org.eclipse.jgit.lib.ReflogReader;
+import org.eclipse.jgit.lib.RepositoryCache;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.test.resources.SampleDataRepositoryTestCase;
import org.eclipse.jgit.transport.ReceiveCommand;
@@ -123,6 +124,11 @@ public class FileReftableTest extends SampleDataRepositoryTestCase {
}
@Test
+ public void additionalRefsAreRemoved() {
+ assertFalse(new File(db.getDirectory(), Constants.HEAD).exists());
+ }
+
+ @Test
public void testCompactFully() throws Exception {
ObjectId c1 = db.resolve("master^^");
ObjectId c2 = db.resolve("master^");
@@ -149,6 +155,8 @@ public class FileReftableTest extends SampleDataRepositoryTestCase {
assertFalse(b.isSymbolic());
assertTrue(b.isPeeled());
assertEquals(bCommit, b.getObjectId().name());
+
+ assertTrue(db.getRefDatabase().hasFastTipsWithSha1());
}
@Test
@@ -163,6 +171,8 @@ public class FileReftableTest extends SampleDataRepositoryTestCase {
assertFalse(b.isSymbolic());
assertTrue(b.isPeeled());
assertEquals(bCommit, b.getObjectId().name());
+
+ assertFalse(db.getRefDatabase().hasFastTipsWithSha1());
}
@Test
@@ -503,6 +513,11 @@ public class FileReftableTest extends SampleDataRepositoryTestCase {
}
@Test
+ public void isGitRepository() {
+ assertTrue(RepositoryCache.FileKey.isGitRepository(db.getDirectory(), db.getFS()));
+ }
+
+ @Test
public void testRenameDestExists() throws IOException {
ObjectId rb = db.resolve("refs/heads/b");
writeSymref(Constants.HEAD, "refs/heads/b");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/ReftableTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/ReftableTest.java
index 45e6c7d128..ec8b7593f0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/ReftableTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/ReftableTest.java
@@ -149,12 +149,13 @@ public class ReftableTest {
assertEquals(expBytes, table.length);
}
- @SuppressWarnings("boxing")
@Test
public void estimateCurrentBytesWithIndex() throws IOException {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 5670; i++) {
- refs.add(ref(String.format("refs/heads/%04d", i), i));
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("refs/heads/%04d", i), i);
+ refs.add(ref);
}
ReftableConfig cfg = new ReftableConfig();
@@ -177,6 +178,69 @@ public class ReftableTest {
}
@Test
+ public void hasObjMapRefs() throws IOException {
+ ArrayList<Ref> refs = new ArrayList<>();
+ refs.add(ref(MASTER, 1));
+ byte[] table = write(refs);
+ ReftableReader t = read(table);
+ assertTrue(t.hasObjectMap());
+ }
+
+ @Test
+ public void hasObjMapRefsSmallTable() throws IOException {
+ ArrayList<Ref> refs = new ArrayList<>();
+ ReftableConfig cfg = new ReftableConfig();
+ cfg.setIndexObjects(false);
+ refs.add(ref(MASTER, 1));
+ byte[] table = write(refs);
+ ReftableReader t = read(table);
+ assertTrue(t.hasObjectMap());
+ }
+
+ @Test
+ public void hasObjLogs() throws IOException {
+ PersonIdent who = new PersonIdent("Log", "Ger", 1500079709, -8 * 60);
+ String msg = "test";
+ ReftableConfig cfg = new ReftableConfig();
+ cfg.setIndexObjects(false);
+
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ ReftableWriter writer = new ReftableWriter(buffer)
+ .setMinUpdateIndex(1)
+ .setConfig(cfg)
+ .setMaxUpdateIndex(1)
+ .begin();
+
+ writer.writeLog("master", 1, who, ObjectId.zeroId(), id(1), msg);
+ writer.finish();
+ byte[] table = buffer.toByteArray();
+
+ ReftableReader t = read(table);
+ assertTrue(t.hasObjectMap());
+ }
+
+ @Test
+ public void hasObjMapRefsNoIndexObjects() throws IOException {
+ ArrayList<Ref> refs = new ArrayList<>();
+ ReftableConfig cfg = new ReftableConfig();
+ cfg.setIndexObjects(false);
+ cfg.setRefBlockSize(256);
+ cfg.setAlignBlocks(true);
+
+ // Fill up 5 blocks.
+ int N = 256 * 5 / 25;
+ for (int i= 0; i < N; i++) {
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("%02d/xxxxxxxxxx", i), i);
+ refs.add(ref);
+ }
+ byte[] table = write(refs, cfg);
+
+ ReftableReader t = read(table);
+ assertFalse(t.hasObjectMap());
+ }
+
+ @Test
public void oneIdRef() throws IOException {
Ref exp = ref(MASTER, 1);
byte[] table = write(exp);
@@ -364,12 +428,13 @@ public class ReftableTest {
}
}
- @SuppressWarnings("boxing")
@Test
public void indexScan() throws IOException {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 5670; i++) {
- refs.add(ref(String.format("refs/heads/%04d", i), i));
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("refs/heads/%04d", i), i);
+ refs.add(ref);
}
byte[] table = write(refs);
@@ -378,12 +443,13 @@ public class ReftableTest {
assertScan(refs, read(table));
}
- @SuppressWarnings("boxing")
@Test
public void indexSeek() throws IOException {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 5670; i++) {
- refs.add(ref(String.format("refs/heads/%04d", i), i));
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("refs/heads/%04d", i), i);
+ refs.add(ref);
}
byte[] table = write(refs);
@@ -392,12 +458,13 @@ public class ReftableTest {
assertSeek(refs, read(table));
}
- @SuppressWarnings("boxing")
@Test
public void noIndexScan() throws IOException {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 567; i++) {
- refs.add(ref(String.format("refs/heads/%03d", i), i));
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("refs/heads/%03d", i), i);
+ refs.add(ref);
}
byte[] table = write(refs);
@@ -407,12 +474,13 @@ public class ReftableTest {
assertScan(refs, read(table));
}
- @SuppressWarnings("boxing")
@Test
public void noIndexSeek() throws IOException {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 567; i++) {
- refs.add(ref(String.format("refs/heads/%03d", i), i));
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("refs/heads/%03d", i), i);
+ refs.add(ref);
}
byte[] table = write(refs);
@@ -585,6 +653,7 @@ public class ReftableTest {
// Fill out the 1st ref block.
List<String> names = new ArrayList<>();
for (int i = 0; i < 4; i++) {
+ @SuppressWarnings("boxing")
String name = new String(new char[220]).replace("\0", String.format("%c", i + 'a'));
names.add(name);
writer.writeRef(ref(name, i));
@@ -724,7 +793,6 @@ public class ReftableTest {
}
}
- @SuppressWarnings("boxing")
@Test
public void logScan() throws IOException {
ReftableConfig cfg = new ReftableConfig();
@@ -737,6 +805,7 @@ public class ReftableTest {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 5670; i++) {
+ @SuppressWarnings("boxing")
Ref ref = ref(String.format("refs/heads/%04d", i), i);
refs.add(ref);
writer.writeRef(ref);
@@ -769,12 +838,13 @@ public class ReftableTest {
}
}
- @SuppressWarnings("boxing")
@Test
public void byObjectIdOneRefNoIndex() throws IOException {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 200; i++) {
- refs.add(ref(String.format("refs/heads/%02d", i), i));
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("refs/heads/%02d", i), i);
+ refs.add(ref);
}
refs.add(ref("refs/heads/master", 100));
@@ -802,12 +872,13 @@ public class ReftableTest {
}
}
- @SuppressWarnings("boxing")
@Test
public void byObjectIdOneRefWithIndex() throws IOException {
List<Ref> refs = new ArrayList<>();
for (int i = 1; i <= 5200; i++) {
- refs.add(ref(String.format("refs/heads/%02d", i), i));
+ @SuppressWarnings("boxing")
+ Ref ref = ref(String.format("refs/heads/%02d", i), i);
+ refs.add(ref);
}
refs.add(ref("refs/heads/master", 100));
@@ -936,8 +1007,13 @@ public class ReftableTest {
}
private byte[] write(Collection<Ref> refs) throws IOException {
+ return write(refs, new ReftableConfig());
+ }
+
+ private byte[] write(Collection<Ref> refs, ReftableConfig cfg) throws IOException {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
stats = new ReftableWriter(buffer)
+ .setConfig(cfg)
.begin()
.sortAndWriteRefs(refs)
.finish()
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
deleted file mode 100644
index c5d4d4238d..0000000000
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmapCalculatorTest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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/ReachabilityCheckerTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java
index dd73e35727..092033449b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java
@@ -47,6 +47,7 @@ import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.Optional;
+import java.util.stream.Stream;
import org.eclipse.jgit.internal.storage.file.FileRepository;
import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
@@ -83,11 +84,11 @@ public abstract class ReachabilityCheckerTestCase
ReachabilityChecker checker = getChecker(repo);
assertReachable("reachable from one tip",
- checker.areAllReachable(Arrays.asList(a), Arrays.asList(c2)));
+ checker.areAllReachable(Arrays.asList(a), Stream.of(c2)));
assertReachable("reachable from another tip",
- checker.areAllReachable(Arrays.asList(a), Arrays.asList(b2)));
+ checker.areAllReachable(Arrays.asList(a), Stream.of(b2)));
assertReachable("reachable from itself",
- checker.areAllReachable(Arrays.asList(a), Arrays.asList(b2)));
+ checker.areAllReachable(Arrays.asList(a), Stream.of(b2)));
}
@Test
@@ -104,13 +105,13 @@ public abstract class ReachabilityCheckerTestCase
assertReachable("reachable through one branch",
checker.areAllReachable(Arrays.asList(b1),
- Arrays.asList(merge)));
+ Stream.of(merge)));
assertReachable("reachable through another branch",
checker.areAllReachable(Arrays.asList(c1),
- Arrays.asList(merge)));
+ Stream.of(merge)));
assertReachable("reachable, before the branching",
checker.areAllReachable(Arrays.asList(a),
- Arrays.asList(merge)));
+ Stream.of(merge)));
}
@Test
@@ -123,7 +124,7 @@ public abstract class ReachabilityCheckerTestCase
ReachabilityChecker checker = getChecker(repo);
assertUnreachable("unreachable from the future",
- checker.areAllReachable(Arrays.asList(b2), Arrays.asList(b1)));
+ checker.areAllReachable(Arrays.asList(b2), Stream.of(b1)));
}
@Test
@@ -137,7 +138,7 @@ public abstract class ReachabilityCheckerTestCase
ReachabilityChecker checker = getChecker(repo);
assertUnreachable("unreachable from different branch",
- checker.areAllReachable(Arrays.asList(c1), Arrays.asList(b2)));
+ checker.areAllReachable(Arrays.asList(c1), Stream.of(b2)));
}
@Test
@@ -152,7 +153,7 @@ public abstract class ReachabilityCheckerTestCase
ReachabilityChecker checker = getChecker(repo);
assertReachable("reachable with long chain in the middle", checker
- .areAllReachable(Arrays.asList(root), Arrays.asList(head)));
+ .areAllReachable(Arrays.asList(root), Stream.of(head)));
}
private static void assertReachable(String msg,
@@ -164,5 +165,4 @@ public abstract class ReachabilityCheckerTestCase
Optional<RevCommit> result) {
assertTrue(msg, result.isPresent());
}
-
}
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 89ac2fe96d..daf7b9fb7a 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
@@ -495,8 +495,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
receive(rp, inBuf, outBuf);
fail("Expected UnpackException");
} catch (UnpackException failed) {
- Throwable err = failed.getCause();
- assertTrue(err instanceof IOException);
+ // Expected
}
final PacketLineIn r = asPacketLineIn(outBuf);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackRefSortingForReachabilityTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackRefSortingForReachabilityTest.java
new file mode 100644
index 0000000000..0875a33287
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackRefSortingForReachabilityTest.java
@@ -0,0 +1,76 @@
+/*
+ * 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.transport;
+
+import static org.hamcrest.Matchers.contains;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectIdRef.Unpeeled;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.Ref.Storage;
+import org.junit.Test;
+
+public class UploadPackRefSortingForReachabilityTest {
+
+ @Test
+ public void sortReferences() {
+ List<Ref> refs = Stream.of("refs/changes/12/12", "refs/changes/12/1",
+ "refs/heads/master", "refs/heads/something",
+ "refs/changes/55/1", "refs/tags/v1.1")
+ .map(s -> new Unpeeled(Storage.LOOSE, s, ObjectId.zeroId()))
+ .collect(Collectors.toList());
+ Stream<Ref> sorted = UploadPack.importantRefsFirst(refs);
+ List<String> collected = sorted.map(Ref::getName)
+ .collect(Collectors.toList());
+ assertThat(collected,
+ contains("refs/heads/master", "refs/heads/something",
+ "refs/tags/v1.1", "refs/changes/12/12",
+ "refs/changes/12/1", "refs/changes/55/1"));
+ }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
index 6d53555e9f..108e5edb78 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
@@ -462,7 +462,9 @@ public class UploadPackTest {
assertThat(lines, containsInAnyOrder("ls-refs", "fetch", "server-option"));
}
- private void checkUnadvertisedIfUnallowed(String fetchCapability) throws Exception {
+ private void checkUnadvertisedIfUnallowed(String configSection,
+ String configName, String fetchCapability) throws Exception {
+ server.getConfig().setBoolean(configSection, null, configName, false);
ByteArrayInputStream recvStream =
uploadPackV2Setup(null, PacketLineIn.end());
PacketLineIn pckIn = new PacketLineIn(recvStream);
@@ -473,9 +475,9 @@ public class UploadPackTest {
String line;
while (!PacketLineIn.isEnd((line = pckIn.readString()))) {
if (line.startsWith("fetch=")) {
- assertThat(
- Arrays.asList(line.substring(6).split(" ")),
- hasItems("shallow"));
+ List<String> fetchItems = Arrays.asList(line.substring(6).split(" "));
+ assertThat(fetchItems, hasItems("shallow"));
+ assertFalse(fetchItems.contains(fetchCapability));
lines.add("fetch");
} else {
lines.add(line);
@@ -487,7 +489,7 @@ public class UploadPackTest {
@Test
public void testV2CapabilitiesAllowFilter() throws Exception {
checkAdvertisedIfAllowed("uploadpack", "allowfilter", "filter");
- checkUnadvertisedIfUnallowed("filter");
+ checkUnadvertisedIfUnallowed("uploadpack", "allowfilter", "filter");
}
@Test
@@ -497,7 +499,8 @@ public class UploadPackTest {
@Test
public void testV2CapabilitiesRefInWantNotAdvertisedIfUnallowed() throws Exception {
- checkUnadvertisedIfUnallowed("ref-in-want");
+ checkUnadvertisedIfUnallowed("uploadpack", "allowrefinwant",
+ "ref-in-want");
}
@Test
@@ -506,7 +509,8 @@ public class UploadPackTest {
true);
checkAdvertisedIfAllowed("uploadpack", "advertisesidebandall",
"sideband-all");
- checkUnadvertisedIfUnallowed("sideband-all");
+ checkUnadvertisedIfUnallowed("uploadpack", "advertisesidebandall",
+ "sideband-all");
}
@Test
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
index 89a2fc44c7..c9a339352b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
@@ -254,7 +254,9 @@ public class FSTest {
formatter.format(t1.toInstant()),
Long.valueOf(resolutionNs)), t2.compareTo(t1) > 0);
} finally {
- Files.delete(f);
+ if (f != null) {
+ Files.delete(f);
+ }
}
}
}
diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
index 38f63f99b6..d382c9ab00 100644
--- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
@@ -4,14 +4,14 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.ui
Bundle-SymbolicName: org.eclipse.jgit.ui
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.jgit.awtui;version="5.6.0"
-Import-Package: org.eclipse.jgit.errors;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.lib;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.nls;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revplot;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.revwalk;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.transport;version="[5.6.0,5.7.0)",
- org.eclipse.jgit.util;version="[5.6.0,5.7.0)"
+Export-Package: org.eclipse.jgit.awtui;version="5.7.0"
+Import-Package: org.eclipse.jgit.errors;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.nls;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revplot;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
+ org.eclipse.jgit.util;version="[5.7.0,5.8.0)"
diff --git a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
index c19a634419..782f24d898 100644
--- a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.ui - Sources
Bundle-SymbolicName: org.eclipse.jgit.ui.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ui;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ui;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml
index 7d6c77d491..c4687aa55f 100644
--- a/org.eclipse.jgit.ui/pom.xml
+++ b/org.eclipse.jgit.ui/pom.xml
@@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ui</artifactId>
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index 69d7183891..b7f6db0274 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -1,125 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.jgit" version="2">
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.jgit.transport.BaseReceivePack">
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="305324134">
+ <resource path="src/org/eclipse/jgit/lib/RefDatabase.java" type="org.eclipse.jgit.lib.RefDatabase">
+ <filter id="1141899266">
<message_arguments>
- <message_argument value="org.eclipse.jgit.transport.BaseReceivePack"/>
- <message_argument value="org.eclipse.jgit_5.6.0"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/lib/Config.java" type="org.eclipse.jgit.lib.Config">
- <filter id="1142947843">
- <message_arguments>
- <message_argument value="5.5.2"/>
- <message_argument value="getBaseConfig()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/lib/Constants.java" type="org.eclipse.jgit.lib.Constants">
- <filter id="1142947843">
- <message_arguments>
- <message_argument value="5.5.2"/>
- <message_argument value="XDG_CONFIG_HOME"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/storage/pack/PackStatistics.java" type="org.eclipse.jgit.storage.pack.PackStatistics$Accumulator">
- <filter id="336658481">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.storage.pack.PackStatistics.Accumulator"/>
- <message_argument value="offloadedPackfileSize"/>
- </message_arguments>
- </filter>
- <filter id="336658481">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.storage.pack.PackStatistics.Accumulator"/>
- <message_argument value="offloadedPackfiles"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java" type="org.eclipse.jgit.transport.AbstractAdvertiseRefsHook">
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="338792546">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.AbstractAdvertiseRefsHook"/>
- <message_argument value="advertiseRefs(BaseReceivePack)"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/transport/AdvertiseRefsHook.java" type="org.eclipse.jgit.transport.AdvertiseRefsHook">
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="403804204">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.AdvertiseRefsHook"/>
- <message_argument value="advertiseRefs(ReceivePack)"/>
- </message_arguments>
- </filter>
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="405901410">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.AdvertiseRefsHook"/>
- <message_argument value="advertiseRefs(BaseReceivePack)"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java" type="org.eclipse.jgit.transport.AdvertiseRefsHookChain">
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="338792546">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.AdvertiseRefsHookChain"/>
- <message_argument value="advertiseRefs(BaseReceivePack)"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/transport/ReceiveCommand.java" type="org.eclipse.jgit.transport.ReceiveCommand">
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="338792546">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.ReceiveCommand"/>
- <message_argument value="execute(BaseReceivePack)"/>
+ <message_argument value="5.6"/>
+ <message_argument value="5.7"/>
+ <message_argument value="hasFastTipsWithSha1()"/>
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/jgit/transport/ReceivePack.java" type="org.eclipse.jgit.transport.ReceivePack">
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="338792546">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.ReceivePack"/>
- <message_argument value="getLockMessageProcessName()"/>
- </message_arguments>
- </filter>
- <filter comment="Merged BaseReceivePack into ReceivePack, replace BaseReceivePack with ReceivePack" id="338849923">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.ReceivePack"/>
- </message_arguments>
- </filter>
- <filter id="421572723">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.transport.ReceivePack"/>
- <message_argument value="enableCapabilities()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/util/QuotedString.java" type="org.eclipse.jgit.util.QuotedString">
<filter id="336658481">
<message_arguments>
- <message_argument value="org.eclipse.jgit.util.QuotedString"/>
- <message_argument value="GIT_PATH_MINIMAL"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/jgit/util/SystemReader.java" type="org.eclipse.jgit.util.SystemReader">
- <filter id="336695337">
- <message_arguments>
- <message_argument value="org.eclipse.jgit.util.SystemReader"/>
- <message_argument value="openJGitConfig(Config, FS)"/>
- </message_arguments>
- </filter>
- <filter id="1142947843">
- <message_arguments>
- <message_argument value="5.5.2"/>
- <message_argument value="getJGitConfig()"/>
- </message_arguments>
- </filter>
- <filter id="1142947843">
- <message_arguments>
- <message_argument value="5.5.2"/>
- <message_argument value="openJGitConfig(Config, FS)"/>
+ <message_argument value="org.eclipse.jgit.transport.ReceivePack"/>
+ <message_argument value="connectivityChecker"/>
</message_arguments>
</filter>
</resource>
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index ab0f1a2c09..1fd25780d5 100644
--- a/org.eclipse.jgit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/MANIFEST.MF
@@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit
Bundle-SymbolicName: org.eclipse.jgit
-Bundle-Version: 5.6.0.qualifier
+Bundle-Version: 5.7.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.jgit.annotations;version="5.6.0",
- org.eclipse.jgit.api;version="5.6.0";
+Export-Package: org.eclipse.jgit.annotations;version="5.7.0",
+ org.eclipse.jgit.api;version="5.7.0";
uses:="org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff,
@@ -22,53 +22,53 @@ Export-Package: org.eclipse.jgit.annotations;version="5.6.0",
org.eclipse.jgit.submodule,
org.eclipse.jgit.transport,
org.eclipse.jgit.merge",
- org.eclipse.jgit.api.errors;version="5.6.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.errors",
- org.eclipse.jgit.attributes;version="5.6.0",
- org.eclipse.jgit.blame;version="5.6.0";
+ org.eclipse.jgit.api.errors;version="5.7.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.errors",
+ org.eclipse.jgit.attributes;version="5.7.0",
+ org.eclipse.jgit.blame;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff",
- org.eclipse.jgit.diff;version="5.6.0";
+ org.eclipse.jgit.diff;version="5.7.0";
uses:="org.eclipse.jgit.patch,
org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.util",
- org.eclipse.jgit.dircache;version="5.6.0";
+ org.eclipse.jgit.dircache;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.util,
org.eclipse.jgit.events,
org.eclipse.jgit.attributes",
- org.eclipse.jgit.errors;version="5.6.0";
+ org.eclipse.jgit.errors;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.internal.storage.pack,
org.eclipse.jgit.transport,
org.eclipse.jgit.dircache",
- org.eclipse.jgit.events;version="5.6.0";uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.fnmatch;version="5.6.0",
- org.eclipse.jgit.gitrepo;version="5.6.0";
+ org.eclipse.jgit.events;version="5.7.0";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.fnmatch;version="5.7.0",
+ org.eclipse.jgit.gitrepo;version="5.7.0";
uses:="org.eclipse.jgit.api,
org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.xml.sax.helpers,
org.xml.sax",
- org.eclipse.jgit.gitrepo.internal;version="5.6.0";x-internal:=true,
- org.eclipse.jgit.hooks;version="5.6.0";uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.ignore;version="5.6.0",
- org.eclipse.jgit.ignore.internal;version="5.6.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal;version="5.6.0";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test",
- org.eclipse.jgit.internal.fsck;version="5.6.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.ketch;version="5.6.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.revwalk;version="5.6.0";x-internal:=true,
- org.eclipse.jgit.internal.storage.dfs;version="5.6.0";
+ org.eclipse.jgit.gitrepo.internal;version="5.7.0";x-internal:=true,
+ org.eclipse.jgit.hooks;version="5.7.0";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.ignore;version="5.7.0",
+ org.eclipse.jgit.ignore.internal;version="5.7.0";x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.internal;version="5.7.0";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test",
+ org.eclipse.jgit.internal.fsck;version="5.7.0";x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.internal.ketch;version="5.7.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.revwalk;version="5.7.0";x-internal:=true,
+ org.eclipse.jgit.internal.storage.dfs;version="5.7.0";
x-friends:="org.eclipse.jgit.test,
org.eclipse.jgit.http.server,
org.eclipse.jgit.http.test,
org.eclipse.jgit.lfs.test",
- org.eclipse.jgit.internal.storage.file;version="5.6.0";
+ org.eclipse.jgit.internal.storage.file;version="5.7.0";
x-friends:="org.eclipse.jgit.test,
org.eclipse.jgit.junit,
org.eclipse.jgit.junit.http,
@@ -77,19 +77,19 @@ Export-Package: org.eclipse.jgit.annotations;version="5.6.0",
org.eclipse.jgit.pgm,
org.eclipse.jgit.pgm.test,
org.eclipse.jgit.ssh.apache",
- org.eclipse.jgit.internal.storage.io;version="5.6.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.pack;version="5.6.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.reftable;version="5.6.0";
+ org.eclipse.jgit.internal.storage.io;version="5.7.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.storage.pack;version="5.7.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.storage.reftable;version="5.7.0";
x-friends:="org.eclipse.jgit.http.test,
org.eclipse.jgit.junit,
org.eclipse.jgit.test,
org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.reftree;version="5.6.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.submodule;version="5.6.0";x-internal:=true,
- org.eclipse.jgit.internal.transport.http;version="5.6.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.parser;version="5.6.0";x-friends:="org.eclipse.jgit.http.server,org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.ssh;version="5.6.0";x-friends:="org.eclipse.jgit.ssh.apache",
- org.eclipse.jgit.lib;version="5.6.0";
+ org.eclipse.jgit.internal.storage.reftree;version="5.7.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
+ org.eclipse.jgit.internal.submodule;version="5.7.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.http;version="5.7.0";x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.internal.transport.parser;version="5.7.0";x-friends:="org.eclipse.jgit.http.server,org.eclipse.jgit.test",
+ org.eclipse.jgit.internal.transport.ssh;version="5.7.0";x-friends:="org.eclipse.jgit.ssh.apache",
+ org.eclipse.jgit.lib;version="5.7.0";
uses:="org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.util,
@@ -99,33 +99,33 @@ Export-Package: org.eclipse.jgit.annotations;version="5.6.0",
org.eclipse.jgit.treewalk,
org.eclipse.jgit.transport,
org.eclipse.jgit.submodule",
- org.eclipse.jgit.lib.internal;version="5.6.0";x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.merge;version="5.6.0";
+ org.eclipse.jgit.lib.internal;version="5.7.0";x-friends:="org.eclipse.jgit.test",
+ org.eclipse.jgit.merge;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.diff,
org.eclipse.jgit.dircache,
org.eclipse.jgit.api",
- org.eclipse.jgit.nls;version="5.6.0",
- org.eclipse.jgit.notes;version="5.6.0";
+ org.eclipse.jgit.nls;version="5.7.0",
+ org.eclipse.jgit.notes;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.merge",
- org.eclipse.jgit.patch;version="5.6.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.diff",
- org.eclipse.jgit.revplot;version="5.6.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.revwalk",
- org.eclipse.jgit.revwalk;version="5.6.0";
+ org.eclipse.jgit.patch;version="5.7.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.diff",
+ org.eclipse.jgit.revplot;version="5.7.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.revwalk",
+ org.eclipse.jgit.revwalk;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff,
org.eclipse.jgit.revwalk.filter",
- org.eclipse.jgit.revwalk.filter;version="5.6.0";uses:="org.eclipse.jgit.revwalk,org.eclipse.jgit.lib,org.eclipse.jgit.util",
- org.eclipse.jgit.storage.file;version="5.6.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.util",
- org.eclipse.jgit.storage.pack;version="5.6.0";uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.submodule;version="5.6.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk.filter,org.eclipse.jgit.treewalk",
- org.eclipse.jgit.transport;version="5.6.0";
+ org.eclipse.jgit.revwalk.filter;version="5.7.0";uses:="org.eclipse.jgit.revwalk,org.eclipse.jgit.lib,org.eclipse.jgit.util",
+ org.eclipse.jgit.storage.file;version="5.7.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.util",
+ org.eclipse.jgit.storage.pack;version="5.7.0";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.submodule;version="5.7.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk.filter,org.eclipse.jgit.treewalk",
+ org.eclipse.jgit.transport;version="5.7.0";
uses:="org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.internal.storage.pack,
@@ -138,24 +138,24 @@ Export-Package: org.eclipse.jgit.annotations;version="5.6.0",
org.eclipse.jgit.transport.http,
org.eclipse.jgit.errors,
org.eclipse.jgit.storage.pack",
- org.eclipse.jgit.transport.http;version="5.6.0";uses:="javax.net.ssl",
- org.eclipse.jgit.transport.resolver;version="5.6.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport",
- org.eclipse.jgit.treewalk;version="5.6.0";
+ org.eclipse.jgit.transport.http;version="5.7.0";uses:="javax.net.ssl",
+ org.eclipse.jgit.transport.resolver;version="5.7.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport",
+ org.eclipse.jgit.treewalk;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.attributes,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.util,
org.eclipse.jgit.dircache",
- org.eclipse.jgit.treewalk.filter;version="5.6.0";uses:="org.eclipse.jgit.treewalk",
- org.eclipse.jgit.util;version="5.6.0";
+ org.eclipse.jgit.treewalk.filter;version="5.7.0";uses:="org.eclipse.jgit.treewalk",
+ org.eclipse.jgit.util;version="5.7.0";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.transport.http,
org.eclipse.jgit.storage.file,
org.ietf.jgss",
- org.eclipse.jgit.util.io;version="5.6.0",
- org.eclipse.jgit.util.sha1;version="5.6.0",
- org.eclipse.jgit.util.time;version="5.6.0"
+ org.eclipse.jgit.util.io;version="5.7.0",
+ org.eclipse.jgit.util.sha1;version="5.7.0",
+ org.eclipse.jgit.util.time;version="5.7.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
com.jcraft.jsch;version="[0.1.37,0.2.0)",
@@ -172,6 +172,7 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.bouncycastle.openpgp.operator;version="[1.61.0,2.0.0)",
org.bouncycastle.openpgp.operator.jcajce;version="[1.61.0,2.0.0)",
org.bouncycastle.util.encoders;version="[1.61.0,2.0.0)",
+ org.bouncycastle.util.io;version="[1.61.0,2.0.0)",
org.slf4j;version="[1.7.0,2.0.0)",
org.xml.sax,
org.xml.sax.helpers
diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
index 01c9aa0564..a926b8fd82 100644
--- a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit - Sources
Bundle-SymbolicName: org.eclipse.jgit.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit;version="5.6.0.qualifier";roots="."
+Bundle-Version: 5.7.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit;version="5.7.0.qualifier";roots="."
diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml
index 6b8cdaab1a..3b37cee59c 100644
--- a/org.eclipse.jgit/pom.xml
+++ b/org.eclipse.jgit/pom.xml
@@ -53,7 +53,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit</artifactId>
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index 882b766f4f..27d3e6aaa3 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -457,6 +457,7 @@ nonBareLinkFilesNotSupported=Link files are not supported with nonbare repos
nonCommitToHeads=Cannot point a branch to a non-commit object
noPathAttributesFound=No Attributes found for {0}.
noSuchRef=no such ref
+noSuchRefKnown=no such ref: {0}
noSuchSubmodule=no such submodule {0}
notABoolean=Not a boolean: {0}
notABundle=not a bundle
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
index 0c765b01cb..a69aa70c6e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, GitHub Inc.
+ * Copyright (C) 2011, 2019 GitHub Inc.
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@@ -42,11 +42,7 @@
*/
package org.eclipse.jgit.api;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -56,17 +52,10 @@ import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.blame.BlameGenerator;
import org.eclipse.jgit.blame.BlameResult;
import org.eclipse.jgit.diff.DiffAlgorithm;
-import org.eclipse.jgit.diff.RawText;
import org.eclipse.jgit.diff.RawTextComparator;
-import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.lib.AnyObjectId;
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.lib.CoreConfig.AutoCRLF;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.treewalk.WorkingTreeOptions;
-import org.eclipse.jgit.util.IO;
-import org.eclipse.jgit.util.io.AutoLFInputStream;
/**
* Blame command for building a {@link org.eclipse.jgit.blame.BlameResult} for a
@@ -221,68 +210,11 @@ public class BlameCommand extends GitCommand<BlameResult> {
else if (startCommit != null)
gen.push(null, startCommit);
else {
- gen.push(null, repo.resolve(Constants.HEAD));
- if (!repo.isBare()) {
- DirCache dc = repo.readDirCache();
- int entry = dc.findEntry(path);
- if (0 <= entry)
- gen.push(null, dc.getEntry(entry).getObjectId());
-
- File inTree = new File(repo.getWorkTree(), path);
- if (repo.getFS().isFile(inTree)) {
- RawText rawText = getRawText(inTree);
- gen.push(null, rawText);
- }
- }
+ gen.prepareHead();
}
return gen.computeBlameResult();
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
}
}
-
- private RawText getRawText(File inTree) throws IOException,
- FileNotFoundException {
- RawText rawText;
-
- WorkingTreeOptions workingTreeOptions = getRepository().getConfig()
- .get(WorkingTreeOptions.KEY);
- AutoCRLF autoCRLF = workingTreeOptions.getAutoCRLF();
- switch (autoCRLF) {
- case FALSE:
- case INPUT:
- // Git used the repo format on checkout, but other tools
- // may change the format to CRLF. We ignore that here.
- rawText = new RawText(inTree);
- break;
- case TRUE:
- try (AutoLFInputStream in = new AutoLFInputStream(
- new FileInputStream(inTree), true)) {
- // Canonicalization should lead to same or shorter length
- // (CRLF to LF), so the file size on disk is an upper size bound
- rawText = new RawText(toByteArray(in, (int) inTree.length()));
- }
- break;
- default:
- throw new IllegalArgumentException(
- "Unknown autocrlf option " + autoCRLF); //$NON-NLS-1$
- }
- return rawText;
- }
-
- private static byte[] toByteArray(InputStream source, int upperSizeLimit)
- throws IOException {
- byte[] buffer = new byte[upperSizeLimit];
- try {
- int read = IO.readFully(source, buffer, 0);
- if (read == upperSizeLimit) {
- return buffer;
- }
- byte[] copy = new byte[read];
- System.arraycopy(buffer, 0, copy, 0, read);
- return copy;
- } finally {
- source.close();
- }
- }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
index b55987ead4..915b9860bb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -143,6 +143,8 @@ public class CommitCommand extends GitCommand<RevCommit> {
private HashMap<String, PrintStream> hookOutRedirect = new HashMap<>(3);
+ private HashMap<String, PrintStream> hookErrRedirect = new HashMap<>(3);
+
private Boolean allowEmpty;
private Boolean signCommit;
@@ -188,7 +190,8 @@ public class CommitCommand extends GitCommand<RevCommit> {
state.name()));
if (!noVerify) {
- Hooks.preCommit(repo, hookOutRedirect.get(PreCommitHook.NAME))
+ Hooks.preCommit(repo, hookOutRedirect.get(PreCommitHook.NAME),
+ hookErrRedirect.get(PreCommitHook.NAME))
.call();
}
@@ -230,7 +233,8 @@ public class CommitCommand extends GitCommand<RevCommit> {
if (!noVerify) {
message = Hooks
.commitMsg(repo,
- hookOutRedirect.get(CommitMsgHook.NAME))
+ hookOutRedirect.get(CommitMsgHook.NAME),
+ hookErrRedirect.get(CommitMsgHook.NAME))
.setCommitMessage(message).call();
}
@@ -311,7 +315,8 @@ public class CommitCommand extends GitCommand<RevCommit> {
repo.writeRevertHead(null);
}
Hooks.postCommit(repo,
- hookOutRedirect.get(PostCommitHook.NAME)).call();
+ hookOutRedirect.get(PostCommitHook.NAME),
+ hookErrRedirect.get(PostCommitHook.NAME)).call();
return revCommit;
}
@@ -891,6 +896,23 @@ public class CommitCommand extends GitCommand<RevCommit> {
}
/**
+ * Set the error stream for all hook scripts executed by this command
+ * (pre-commit, commit-msg, post-commit). If not set it defaults to
+ * {@code System.err}.
+ *
+ * @param hookStdErr
+ * the error stream for hook scripts executed by this command
+ * @return {@code this}
+ * @since 5.6
+ */
+ public CommitCommand setHookErrorStream(PrintStream hookStdErr) {
+ setHookErrorStream(PreCommitHook.NAME, hookStdErr);
+ setHookErrorStream(CommitMsgHook.NAME, hookStdErr);
+ setHookErrorStream(PostCommitHook.NAME, hookStdErr);
+ return this;
+ }
+
+ /**
* Set the output stream for a selected hook script executed by this command
* (pre-commit, commit-msg, post-commit). If not set it defaults to
* {@code System.out}.
@@ -916,6 +938,30 @@ public class CommitCommand extends GitCommand<RevCommit> {
}
/**
+ * Set the error stream for a selected hook script executed by this command
+ * (pre-commit, commit-msg, post-commit). If not set it defaults to
+ * {@code System.err}.
+ *
+ * @param hookName
+ * name of the hook to set the output stream for
+ * @param hookStdErr
+ * the output stream to use for the selected hook
+ * @return {@code this}
+ * @since 5.6
+ */
+ public CommitCommand setHookErrorStream(String hookName,
+ PrintStream hookStdErr) {
+ if (!(PreCommitHook.NAME.equals(hookName)
+ || CommitMsgHook.NAME.equals(hookName)
+ || PostCommitHook.NAME.equals(hookName))) {
+ throw new IllegalArgumentException(MessageFormat
+ .format(JGitText.get().illegalHookName, hookName));
+ }
+ hookErrRedirect.put(hookName, hookStdErr);
+ return this;
+ }
+
+ /**
* Sets the signing key
* <p>
* Per spec of user.signingKey: this will be sent to the GPG program as is,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
index 66de8ae131..5ea6015afa 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
@@ -64,10 +64,7 @@ import org.eclipse.jgit.revwalk.filter.AndRevFilter;
import org.eclipse.jgit.revwalk.filter.MaxCountRevFilter;
import org.eclipse.jgit.revwalk.filter.RevFilter;
import org.eclipse.jgit.revwalk.filter.SkipRevFilter;
-import org.eclipse.jgit.treewalk.filter.AndTreeFilter;
-import org.eclipse.jgit.treewalk.filter.PathFilter;
-import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
-import org.eclipse.jgit.treewalk.filter.TreeFilter;
+import org.eclipse.jgit.treewalk.filter.*;
/**
* A class used to execute a {@code Log} command. It has setters for all
@@ -105,6 +102,7 @@ public class LogCommand extends GitCommand<Iterable<RevCommit>> {
private RevFilter revFilter;
private final List<PathFilter> pathFilters = new ArrayList<>();
+ private final List<TreeFilter> excludeTreeFilters = new ArrayList<>();
private int maxCount = -1;
@@ -133,9 +131,22 @@ public class LogCommand extends GitCommand<Iterable<RevCommit>> {
@Override
public Iterable<RevCommit> call() throws GitAPIException, NoHeadException {
checkCallable();
- if (!pathFilters.isEmpty())
- walk.setTreeFilter(AndTreeFilter.create(
- PathFilterGroup.create(pathFilters), TreeFilter.ANY_DIFF));
+ List<TreeFilter> filters = new ArrayList<>();
+ if (!pathFilters.isEmpty()) {
+ filters.add(AndTreeFilter.create(PathFilterGroup.create(pathFilters), TreeFilter.ANY_DIFF));
+ }
+ if (!excludeTreeFilters.isEmpty()) {
+ for (TreeFilter f : excludeTreeFilters) {
+ filters.add(AndTreeFilter.create(f, TreeFilter.ANY_DIFF));
+ }
+ }
+ if (!filters.isEmpty()) {
+ if (filters.size() == 1) {
+ filters.add(TreeFilter.ANY_DIFF);
+ }
+ walk.setTreeFilter(AndTreeFilter.create(filters));
+
+ }
if (skip > -1 && maxCount > -1)
walk.setRevFilter(AndRevFilter.create(SkipRevFilter.create(skip),
MaxCountRevFilter.create(maxCount)));
@@ -310,6 +321,24 @@ public class LogCommand extends GitCommand<Iterable<RevCommit>> {
}
/**
+ * Show all commits that are not within any of the specified paths. The path
+ * must either name a file or a directory exactly and use <code>/</code>
+ * (slash) as separator. Note that regular expressions or wildcards are not
+ * yet supported. If a path is both added and excluded from the search, then
+ * the exclusion wins.
+ *
+ * @param path
+ * a repository-relative path (with <code>/</code> as separator)
+ * @return {@code this}
+ * @since 5.6
+ */
+ public LogCommand excludePath(String path) {
+ checkCallable();
+ excludeTreeFilters.add(PathFilter.create(path).negate());
+ return this;
+ }
+
+ /**
* Skip the number of commits before starting to show the commit output.
*
* @param skip
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java
index db6440b55f..30a2d622a7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java
@@ -67,19 +67,26 @@ public class AbortedByHookException extends GitAPIException {
private final int returnCode;
/**
+ * The stderr output of the hook.
+ */
+ private final String hookStdErr;
+
+ /**
* Constructor for AbortedByHookException
*
- * @param message
- * The error details.
+ * @param hookStdErr
+ * The error details from the stderr output of the hook
* @param hookName
* The name of the hook that interrupted the command, must not be
* null.
* @param returnCode
* The return code of the hook process that has been run.
*/
- public AbortedByHookException(String message, String hookName,
+ public AbortedByHookException(String hookStdErr, String hookName,
int returnCode) {
- super(message);
+ super(MessageFormat.format(JGitText.get().commandRejectedByHook,
+ hookName, hookStdErr));
+ this.hookStdErr = hookStdErr;
this.hookName = hookName;
this.returnCode = returnCode;
}
@@ -102,10 +109,13 @@ public class AbortedByHookException extends GitAPIException {
return returnCode;
}
- /** {@inheritDoc} */
- @Override
- public String getMessage() {
- return MessageFormat.format(JGitText.get().commandRejectedByHook,
- hookName, super.getMessage());
+ /**
+ * Get the stderr output of the hook.
+ *
+ * @return A string containing the complete stderr output of the hook.
+ * @since 5.6
+ */
+ public String getHookStdErr() {
+ return hookStdErr;
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
index 9cec645679..d0aa292df4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, Google Inc.
+ * Copyright (C) 2011, 2019 Google Inc.
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@@ -48,11 +48,17 @@ import static org.eclipse.jgit.lib.FileMode.TYPE_FILE;
import static org.eclipse.jgit.lib.FileMode.TYPE_MASK;
import java.io.IOException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.List;
import org.eclipse.jgit.annotations.Nullable;
+import org.eclipse.jgit.api.errors.NoHeadException;
import org.eclipse.jgit.blame.Candidate.BlobCandidate;
+import org.eclipse.jgit.blame.Candidate.HeadCandidate;
import org.eclipse.jgit.blame.Candidate.ReverseCandidate;
import org.eclipse.jgit.blame.ReverseWalk.ReverseCommit;
import org.eclipse.jgit.diff.DiffAlgorithm;
@@ -63,8 +69,13 @@ import org.eclipse.jgit.diff.HistogramDiff;
import org.eclipse.jgit.diff.RawText;
import org.eclipse.jgit.diff.RawTextComparator;
import org.eclipse.jgit.diff.RenameDetector;
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheEntry;
+import org.eclipse.jgit.dircache.DirCacheIterator;
+import org.eclipse.jgit.errors.NoWorkTreeException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.MutableObjectId;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectLoader;
@@ -74,9 +85,12 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevFlag;
import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.jgit.treewalk.TreeWalk.OperationType;
import org.eclipse.jgit.treewalk.filter.PathFilter;
import org.eclipse.jgit.treewalk.filter.TreeFilter;
+import org.eclipse.jgit.util.IO;
/**
* Generate author information for lines based on a provided file.
@@ -313,6 +327,107 @@ public class BlameGenerator implements AutoCloseable {
}
/**
+ * Pushes HEAD, index, and working tree as appropriate for blaming the file
+ * given in the constructor {@link #BlameGenerator(Repository, String)}
+ * against HEAD. Includes special handling in case the file is in conflict
+ * state from an unresolved merge conflict.
+ *
+ * @return {@code this}
+ * @throws NoHeadException
+ * if the repository has no HEAD
+ * @throws IOException
+ * if an error occurs
+ * @since 5.6
+ */
+ public BlameGenerator prepareHead() throws NoHeadException, IOException {
+ Repository repo = getRepository();
+ ObjectId head = repo.resolve(Constants.HEAD);
+ if (head == null) {
+ throw new NoHeadException(MessageFormat
+ .format(JGitText.get().noSuchRefKnown, Constants.HEAD));
+ }
+ if (repo.isBare()) {
+ return push(null, head);
+ }
+ DirCache dc = repo.readDirCache();
+ try (TreeWalk walk = new TreeWalk(repo)) {
+ walk.setOperationType(OperationType.CHECKIN_OP);
+ FileTreeIterator iter = new FileTreeIterator(repo);
+ int fileTree = walk.addTree(iter);
+ int indexTree = walk.addTree(new DirCacheIterator(dc));
+ iter.setDirCacheIterator(walk, indexTree);
+ walk.setFilter(resultPath);
+ walk.setRecursive(true);
+ if (!walk.next()) {
+ return this;
+ }
+ DirCacheIterator dcIter = walk.getTree(indexTree,
+ DirCacheIterator.class);
+ if (dcIter == null) {
+ // Not found in index
+ return this;
+ }
+ iter = walk.getTree(fileTree, FileTreeIterator.class);
+ if (iter == null || !isFile(iter.getEntryRawMode())) {
+ return this;
+ }
+ RawText inTree;
+ long filteredLength = iter.getEntryContentLength();
+ try (InputStream stream = iter.openEntryStream()) {
+ inTree = new RawText(getBytes(iter.getEntryFile().getPath(),
+ stream, filteredLength));
+ }
+ DirCacheEntry indexEntry = dcIter.getDirCacheEntry();
+ if (indexEntry.getStage() == DirCacheEntry.STAGE_0) {
+ push(null, head);
+ push(null, indexEntry.getObjectId());
+ push(null, inTree);
+ } else {
+ // Create a special candidate using the working tree file as
+ // blob and HEAD and the MERGE_HEADs as parents.
+ HeadCandidate c = new HeadCandidate(getRepository(), resultPath,
+ getHeads(repo, head));
+ c.sourceText = inTree;
+ c.regionList = new Region(0, 0, inTree.size());
+ remaining = inTree.size();
+ push(c);
+ }
+ }
+ return this;
+ }
+
+ private List<RevCommit> getHeads(Repository repo, ObjectId head)
+ throws NoWorkTreeException, IOException {
+ List<ObjectId> mergeIds = repo.readMergeHeads();
+ if (mergeIds == null || mergeIds.isEmpty()) {
+ return Collections.singletonList(revPool.parseCommit(head));
+ }
+ List<RevCommit> heads = new ArrayList<>(mergeIds.size() + 1);
+ heads.add(revPool.parseCommit(head));
+ for (ObjectId id : mergeIds) {
+ heads.add(revPool.parseCommit(id));
+ }
+ return heads;
+ }
+
+ private static byte[] getBytes(String path, InputStream in, long maxLength)
+ throws IOException {
+ if (maxLength > Integer.MAX_VALUE) {
+ throw new IOException(
+ MessageFormat.format(JGitText.get().fileIsTooLarge, path));
+ }
+ int max = (int) maxLength;
+ byte[] buffer = new byte[max];
+ int read = IO.readFully(in, buffer, 0);
+ if (read == max) {
+ return buffer;
+ }
+ byte[] copy = new byte[read];
+ System.arraycopy(buffer, 0, copy, 0, read);
+ return copy;
+ }
+
+ /**
* Push a candidate object onto the generator's traversal stack.
* <p>
* Candidates should be pushed in history order from oldest-to-newest.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
index 457d1d2cea..3ef4943982 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, Google Inc.
+ * Copyright (C) 2011, 2019 Google Inc.
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@@ -44,12 +44,14 @@
package org.eclipse.jgit.blame;
import java.io.IOException;
+import java.util.List;
import org.eclipse.jgit.blame.ReverseWalk.ReverseCommit;
import org.eclipse.jgit.diff.Edit;
import org.eclipse.jgit.diff.EditList;
import org.eclipse.jgit.diff.RawText;
import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectLoader;
@@ -392,6 +394,66 @@ class Candidate {
}
/**
+ * A {@link Candidate} to blame a working tree file in conflict state.
+ * <p>
+ * Contrary to {@link BlobCandidate}, it expects to be given the parent
+ * commits (typically HEAD and the MERGE_HEADs) and behaves like a merge
+ * commit during blame. It does <em>not</em> consider a previously pushed
+ * Candidate as its parent.
+ * </p>
+ */
+ static final class HeadCandidate extends Candidate {
+
+ private List<RevCommit> parents;
+
+ HeadCandidate(Repository repo, PathFilter path,
+ List<RevCommit> parents) {
+ super(repo, null, path);
+ this.parents = parents;
+ }
+
+ @Override
+ void beginResult(RevWalk rw) {
+ // Blob candidates have nothing to prepare.
+ }
+
+ @Override
+ int getParentCount() {
+ return parents.size();
+ }
+
+ @Override
+ RevCommit getParent(int idx) {
+ return parents.get(idx);
+ }
+
+ @Override
+ boolean has(RevFlag flag) {
+ return true; // Pretend flag was added; sourceCommit is null.
+ }
+
+ @Override
+ void add(RevFlag flag) {
+ // Do nothing, sourceCommit is null.
+ }
+
+ @Override
+ void remove(RevFlag flag) {
+ // Do nothing, sourceCommit is null.
+ }
+
+ @Override
+ int getTime() {
+ return Integer.MAX_VALUE;
+ }
+
+ @Override
+ PersonIdent getAuthor() {
+ return new PersonIdent(JGitText.get().blameNotCommittedYet, ""); //$NON-NLS-1$
+ }
+ }
+
+ /**
* Candidate loaded from a file source, and not a commit.
* <p>
* The {@link Candidate#sourceCommit} field is always null on this type of
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java
index f33168d814..6dbe0a6609 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java
@@ -72,6 +72,9 @@ public class CommitMsgHook extends GitHook<String> {
/**
* Constructor for CommitMsgHook
+ * <p>
+ * This constructor will use the default error stream.
+ * </p>
*
* @param repo
* The repository
@@ -83,6 +86,24 @@ public class CommitMsgHook extends GitHook<String> {
super(repo, outputStream);
}
+ /**
+ * Constructor for CommitMsgHook
+ *
+ * @param repo
+ * The repository
+ * @param outputStream
+ * The output stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.out}.
+ * @param errorStream
+ * The error stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.err}.
+ * @since 5.6
+ */
+ protected CommitMsgHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ super(repo, outputStream, errorStream);
+ }
+
/** {@inheritDoc} */
@Override
public String call() throws IOException, AbortedByHookException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
index 6bb5bfc4c4..aa307c9378 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
@@ -50,6 +50,7 @@ import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.Callable;
+import org.bouncycastle.util.io.TeeOutputStream;
import org.eclipse.jgit.api.errors.AbortedByHookException;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.util.FS;
@@ -79,7 +80,15 @@ abstract class GitHook<T> implements Callable<T> {
protected final PrintStream outputStream;
/**
- * Constructor for GitHook
+ * The error stream to be used by the hook.
+ */
+ protected final PrintStream errorStream;
+
+ /**
+ * Constructor for GitHook.
+ * <p>
+ * This constructor will use stderr for the error stream.
+ * </p>
*
* @param repo
* a {@link org.eclipse.jgit.lib.Repository} object.
@@ -88,8 +97,26 @@ abstract class GitHook<T> implements Callable<T> {
* in which case the hook will use {@code System.out}.
*/
protected GitHook(Repository repo, PrintStream outputStream) {
+ this(repo, outputStream, null);
+ }
+
+ /**
+ * Constructor for GitHook
+ *
+ * @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
+ * @param outputStream
+ * The output stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.out}.
+ * @param errorStream
+ * The error stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.err}.
+ */
+ protected GitHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
this.repo = repo;
this.outputStream = outputStream;
+ this.errorStream = errorStream;
}
/**
@@ -148,6 +175,16 @@ abstract class GitHook<T> implements Callable<T> {
}
/**
+ * Get error stream
+ *
+ * @return The error stream the hook must use. Never {@code null},
+ * {@code System.err} is returned by default.
+ */
+ protected PrintStream getErrorStream() {
+ return errorStream == null ? System.err : errorStream;
+ }
+
+ /**
* Runs the hook, without performing any validity checks.
*
* @throws org.eclipse.jgit.api.errors.AbortedByHookException
@@ -155,9 +192,11 @@ abstract class GitHook<T> implements Callable<T> {
*/
protected void doRun() throws AbortedByHookException {
final ByteArrayOutputStream errorByteArray = new ByteArrayOutputStream();
+ final TeeOutputStream stderrStream = new TeeOutputStream(errorByteArray,
+ getErrorStream());
PrintStream hookErrRedirect = null;
try {
- hookErrRedirect = new PrintStream(errorByteArray, false,
+ hookErrRedirect = new PrintStream(stderrStream, false,
UTF_8.name());
} catch (UnsupportedEncodingException e) {
// UTF-8 is guaranteed to be available
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/Hooks.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/Hooks.java
index b801d6872b..f29dcd178b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/Hooks.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/Hooks.java
@@ -57,7 +57,8 @@ import org.eclipse.jgit.util.LfsFactory;
public class Hooks {
/**
- * Create pre-commit hook for the given repository
+ * Create pre-commit hook for the given repository with the default error
+ * stream
*
* @param repo
* a {@link org.eclipse.jgit.lib.Repository} object.
@@ -71,7 +72,25 @@ public class Hooks {
}
/**
- * Create post-commit hook for the given repository
+ * Create pre-commit hook for the given repository
+ *
+ * @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
+ * @param outputStream
+ * The output stream, or {@code null} to use {@code System.out}
+ * @param errorStream
+ * The error stream, or {@code null} to use {@code System.err}
+ * @return The pre-commit hook for the given repository.
+ * @since 5.6
+ */
+ public static PreCommitHook preCommit(Repository repo,
+ PrintStream outputStream, PrintStream errorStream) {
+ return new PreCommitHook(repo, outputStream, errorStream);
+ }
+
+ /**
+ * Create post-commit hook for the given repository with the default error
+ * stream
*
* @param repo
* a {@link org.eclipse.jgit.lib.Repository} object.
@@ -86,7 +105,25 @@ public class Hooks {
}
/**
- * Create commit-msg hook for the given repository
+ * Create post-commit hook for the given repository
+ *
+ * @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
+ * @param outputStream
+ * The output stream, or {@code null} to use {@code System.out}
+ * @param errorStream
+ * The error stream, or {@code null} to use {@code System.err}
+ * @return The pre-commit hook for the given repository.
+ * @since 5.6
+ */
+ public static PostCommitHook postCommit(Repository repo,
+ PrintStream outputStream, PrintStream errorStream) {
+ return new PostCommitHook(repo, outputStream, errorStream);
+ }
+
+ /**
+ * Create commit-msg hook for the given repository with the default error
+ * stream
*
* @param repo
* a {@link org.eclipse.jgit.lib.Repository} object.
@@ -100,7 +137,25 @@ public class Hooks {
}
/**
- * Create pre-push hook for the given repository
+ * Create commit-msg hook for the given repository
+ *
+ * @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
+ * @param outputStream
+ * The output stream, or {@code null} to use {@code System.out}
+ * @param errorStream
+ * The error stream, or {@code null} to use {@code System.err}
+ * @return The pre-commit hook for the given repository.
+ * @since 5.6
+ */
+ public static CommitMsgHook commitMsg(Repository repo,
+ PrintStream outputStream, PrintStream errorStream) {
+ return new CommitMsgHook(repo, outputStream, errorStream);
+ }
+
+ /**
+ * Create pre-push hook for the given repository with the default error
+ * stream
*
* @param repo
* a {@link org.eclipse.jgit.lib.Repository} object.
@@ -127,4 +182,36 @@ public class Hooks {
}
return new PrePushHook(repo, outputStream);
}
+
+ /**
+ * Create pre-push hook for the given repository
+ *
+ * @param repo
+ * a {@link org.eclipse.jgit.lib.Repository} object.
+ * @param outputStream
+ * The output stream, or {@code null} to use {@code System.out}
+ * @param errorStream
+ * The error stream, or {@code null} to use {@code System.err}
+ * @return The pre-push hook for the given repository.
+ * @since 5.6
+ */
+ public static PrePushHook prePush(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ if (LfsFactory.getInstance().isAvailable()) {
+ PrePushHook hook = LfsFactory.getInstance().getPrePushHook(repo,
+ outputStream, errorStream);
+ if (hook != null) {
+ if (hook.isNativeHookPresent()) {
+ PrintStream ps = outputStream;
+ if (ps == null) {
+ ps = System.out;
+ }
+ ps.println(MessageFormat
+ .format(JGitText.get().lfsHookConflict, repo));
+ }
+ return hook;
+ }
+ }
+ return new PrePushHook(repo, outputStream, errorStream);
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java
index 24bad16ecb..b6e576fc23 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java
@@ -61,6 +61,9 @@ public class PostCommitHook extends GitHook<Void> {
/**
* Constructor for PostCommitHook
+ * <p>
+ * This constructor will use the default error stream.
+ * </p>
*
* @param repo
* The repository
@@ -72,6 +75,24 @@ public class PostCommitHook extends GitHook<Void> {
super(repo, outputStream);
}
+ /**
+ * Constructor for PostCommitHook
+ *
+ * @param repo
+ * The repository
+ * @param outputStream
+ * The output stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.out}.
+ * @param errorStream
+ * The error stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.err}.
+ * @since 5.6
+ */
+ protected PostCommitHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ super(repo, outputStream, errorStream);
+ }
+
/** {@inheritDoc} */
@Override
public Void call() throws IOException, AbortedByHookException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java
index 0d9290da3e..dbdaf8669c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java
@@ -61,6 +61,9 @@ public class PreCommitHook extends GitHook<Void> {
/**
* Constructor for PreCommitHook
+ * <p>
+ * This constructor will use the default error stream.
+ * </p>
*
* @param repo
* The repository
@@ -72,6 +75,24 @@ public class PreCommitHook extends GitHook<Void> {
super(repo, outputStream);
}
+ /**
+ * Constructor for PreCommitHook
+ *
+ * @param repo
+ * The repository
+ * @param outputStream
+ * The output stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.out}.
+ * @param errorStream
+ * The error stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.err}.
+ * @since 5.6
+ */
+ protected PreCommitHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ super(repo, outputStream, errorStream);
+ }
+
/** {@inheritDoc} */
@Override
public Void call() throws IOException, AbortedByHookException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java
index 431944f9d4..61180fd021 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java
@@ -73,6 +73,9 @@ public class PrePushHook extends GitHook<String> {
/**
* Constructor for PrePushHook
+ * <p>
+ * This constructor will use the default error stream.
+ * </p>
*
* @param repo
* The repository
@@ -84,6 +87,24 @@ public class PrePushHook extends GitHook<String> {
super(repo, outputStream);
}
+ /**
+ * Constructor for PrePushHook
+ *
+ * @param repo
+ * The repository
+ * @param outputStream
+ * The output stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.out}.
+ * @param errorStream
+ * The error stream the hook must use. {@code null} is allowed,
+ * in which case the hook will use {@code System.err}.
+ * @since 5.6
+ */
+ protected PrePushHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ super(repo, outputStream, errorStream);
+ }
+
/** {@inheritDoc} */
@Override
protected String getStdinArgs() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index 65c9629461..0cea60fd95 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -518,6 +518,7 @@ public class JGitText extends TranslationBundle {
/***/ public String nonCommitToHeads;
/***/ public String noPathAttributesFound;
/***/ public String noSuchRef;
+ /***/ public String noSuchRefKnown;
/***/ public String noSuchSubmodule;
/***/ public String notABoolean;
/***/ public String notABundle;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java
index 2ad3ae7e62..124131d1d3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java
@@ -218,6 +218,12 @@ public class DfsReftableDatabase extends DfsRefDatabase {
/** {@inheritDoc} */
@Override
+ public boolean hasFastTipsWithSha1() throws IOException {
+ return reftableDatabase.hasFastTipsWithSha1();
+ }
+
+ /** {@inheritDoc} */
+ @Override
public Ref peel(Ref ref) throws IOException {
Ref oldLeaf = ref.getLeaf();
if (oldLeaf.isPeeled() || oldLeaf.getObjectId() == null) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java
index b06fd30b34..fd80ad9ec0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java
@@ -125,6 +125,12 @@ public class FileReftableDatabase extends RefDatabase {
&& new File(repoDir, Constants.REFTABLE).isDirectory();
}
+ /** {@inheritDoc} */
+ @Override
+ public boolean hasFastTipsWithSha1() throws IOException {
+ return reftableDatabase.hasFastTipsWithSha1();
+ }
+
/**
* Runs a full compaction for GC purposes.
* @throws IOException on I/O errors
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
index cb00fc4ef5..2f6ef51133 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
@@ -46,6 +46,8 @@
package org.eclipse.jgit.internal.storage.file;
+import static java.util.stream.Collectors.toList;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@@ -740,6 +742,10 @@ public class FileRepository extends Repository {
File packedRefs = new File(getDirectory(), Constants.PACKED_REFS);
File logsDir = new File(getDirectory(), Constants.LOGS);
+
+ List<String> additional = getRefDatabase().getAdditionalRefs().stream()
+ .map(Ref::getName).collect(toList());
+ additional.add(Constants.HEAD);
if (backup) {
FileUtils.rename(refsFile, new File(getDirectory(), "refs.old"));
if (packedRefs.exists()) {
@@ -750,10 +756,17 @@ public class FileRepository extends Repository {
FileUtils.rename(logsDir,
new File(getDirectory(), Constants.LOGS + ".old"));
}
+ for (String r : additional) {
+ FileUtils.rename(new File(getDirectory(), r),
+ new File(getDirectory(), r + ".old"));
+ }
} else {
packedRefs.delete(); // ignore return value.
FileUtils.delete(logsDir, FileUtils.RECURSIVE);
FileUtils.delete(refsFile, FileUtils.RECURSIVE);
+ for (String r : additional) {
+ new File(getDirectory(), r).delete();
+ }
}
// Put new data.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java
index 4de5e392f9..0144453cd7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java
@@ -100,6 +100,16 @@ public class MergedReftable extends Reftable {
/** {@inheritDoc} */
@Override
+ public boolean hasObjectMap() throws IOException {
+ boolean has = true;
+ for (int i = 0; has && i < tables.length; i++) {
+ has = has && tables[i].hasObjectMap();
+ }
+ return has;
+ }
+
+ /** {@inheritDoc} */
+ @Override
public RefCursor allRefs() throws IOException {
MergedRefCursor m = new MergedRefCursor();
for (int i = 0; i < tables.length; i++) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java
index 8f64261766..8a8a14375a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java
@@ -162,6 +162,12 @@ public abstract class Reftable {
public abstract RefCursor byObjectId(AnyObjectId id) throws IOException;
/**
+ * @return whether this reftable can do a fast SHA1 => ref lookup.
+ * @throws IOException on I/O problems.
+ */
+ public abstract boolean hasObjectMap() throws IOException;
+
+ /**
* Seek reader to read log records.
*
* @return cursor to iterate; empty cursor if no logs are present.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java
index 2753c02800..c08f1814dc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java
@@ -1,3 +1,46 @@
+/*
+ * Copyright (C) 2017, 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.reftable;
import java.io.IOException;
@@ -256,6 +299,19 @@ public abstract class ReftableDatabase {
}
/**
+ * @return whether there is a fast SHA1 to ref map.
+ * @throws IOException in case of I/O problems.
+ */
+ public boolean hasFastTipsWithSha1() throws IOException {
+ lock.lock();
+ try {
+ return reader().hasObjectMap();
+ } finally {
+ lock.unlock();
+ }
+ }
+
+ /**
* Returns all refs that resolve directly to the given {@link ObjectId}.
* Includes peeled {@linkObjectId}s.
*
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java
index c5e667449a..14b821a1ed 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java
@@ -128,6 +128,16 @@ public class ReftableReader extends Reftable implements AutoCloseable {
return blockSize;
}
+ @Override
+ public boolean hasObjectMap() throws IOException {
+ if (objIndexPosition == -1) {
+ readFileFooter();
+ }
+
+ // We have the map, we have no refs, or the table is small.
+ return (objPosition > 0 || refEnd == 24 || refIndexPosition == 0);
+ }
+
/**
* Get the minimum update index for log entries that appear in this
* reftable.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
index 4d9450e758..9b5a1fdc22 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
@@ -497,6 +497,20 @@ public abstract class RefDatabase {
}
/**
+ * If the ref database does not support fast inverse queries, it may
+ * be advantageous to build a complete SHA1 to ref map in advance for
+ * multiple uses. To let applications decide on this decision,
+ * this function indicates whether the inverse map is available.
+ *
+ * @return whether this RefDatabase supports fast inverse ref queries.
+ * @throws IOException on I/O problems.
+ * @since 5.6
+ */
+ public boolean hasFastTipsWithSha1() throws IOException {
+ return false;
+ }
+
+ /**
* Check if any refs exist in the ref database.
* <p>
* This uses the same definition of refs as {@link #getRefs()}. In
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java
index fa113bfc6b..fc74f5324f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java
@@ -476,7 +476,8 @@ public class RepositoryCache {
public static boolean isGitRepository(File dir, FS fs) {
return fs.resolve(dir, Constants.OBJECTS).exists()
&& fs.resolve(dir, "refs").exists() //$NON-NLS-1$
- && isValidHead(new File(dir, Constants.HEAD));
+ && (fs.resolve(dir, Constants.REFTABLE).exists()
+ || isValidHead(new File(dir, Constants.HEAD)));
}
private static boolean isValidHead(File head) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapCalculator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapCalculator.java
deleted file mode 100644
index 14e95670aa..0000000000
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapCalculator.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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 java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-
-import org.eclipse.jgit.errors.IncorrectObjectTypeException;
-import org.eclipse.jgit.errors.MissingObjectException;
-import org.eclipse.jgit.internal.revwalk.AddToBitmapFilter;
-import org.eclipse.jgit.lib.BitmapIndex;
-import org.eclipse.jgit.lib.BitmapIndex.Bitmap;
-import org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder;
-import org.eclipse.jgit.lib.ProgressMonitor;
-
-/**
- * Calculate the bitmap indicating what other commits are reachable from certain
- * commit.
- * <p>
- * This bitmap refers only to commits. For a bitmap with ALL objects reachable
- * from certain object, see {@code BitmapWalker}.
- */
-class BitmapCalculator {
-
- private final RevWalk walk;
- private final BitmapIndex bitmapIndex;
-
- BitmapCalculator(RevWalk walk) throws IOException {
- this.walk = walk;
- this.bitmapIndex = requireNonNull(
- walk.getObjectReader().getBitmapIndex());
- }
-
- /**
- * Get the reachability bitmap from certain commit to other commits.
- * <p>
- * This will return a precalculated bitmap if available or walk building one
- * until finding a precalculated bitmap (and returning the union).
- * <p>
- * Beware that the returned bitmap it is guaranteed to include ONLY the
- * commits reachable from the initial commit. It COULD include other objects
- * (because precalculated bitmaps have them) but caller shouldn't count on
- * that. See {@link BitmapWalker} for a full reachability bitmap.
- *
- * @param start
- * the commit. Use {@code walk.parseCommit(objectId)} to get this
- * object from the id.
- * @param pm
- * progress monitor. Updated by one per commit browsed in the
- * graph
- * @return the bitmap of reachable commits (and maybe some extra objects)
- * for the commit
- * @throws MissingObjectException
- * the supplied id doesn't exist
- * @throws IncorrectObjectTypeException
- * the supplied id doesn't refer to a commit or a tag
- * @throws IOException
- * if the walk cannot open a packfile or loose object
- */
- BitmapBuilder getBitmap(RevCommit start, ProgressMonitor pm)
- throws MissingObjectException,
- IncorrectObjectTypeException, IOException {
- Bitmap precalculatedBitmap = bitmapIndex.getBitmap(start);
- if (precalculatedBitmap != null) {
- return asBitmapBuilder(precalculatedBitmap);
- }
-
- walk.reset();
- walk.sort(RevSort.TOPO);
- walk.markStart(start);
- // Unbounded walk. If the repo has bitmaps, it should bump into one at
- // some point.
-
- BitmapBuilder bitmapResult = bitmapIndex.newBitmapBuilder();
- walk.setRevFilter(new AddToBitmapFilter(bitmapResult));
- while (walk.next() != null) {
- // Iterate through all of the commits. The BitmapRevFilter does
- // the work.
- //
- // filter.include returns true for commits that do not have
- // a bitmap in bitmapIndex and are not reachable from a
- // bitmap in bitmapIndex encountered earlier in the walk.
- // Thus the number of commits returned by next() measures how
- // much history was traversed without being able to make use
- // of bitmaps.
- pm.update(1);
- }
-
- return bitmapResult;
- }
-
- private BitmapBuilder asBitmapBuilder(Bitmap bitmap) {
- return bitmapIndex.newBitmapBuilder().or(bitmap);
- }
-}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmappedReachabilityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmappedReachabilityChecker.java
index 6e510f677b..bf831e3313 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmappedReachabilityChecker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmappedReachabilityChecker.java
@@ -45,13 +45,18 @@ package org.eclipse.jgit.revwalk;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Iterator;
import java.util.List;
import java.util.Optional;
+import java.util.stream.Stream;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.lib.BitmapIndex;
+import org.eclipse.jgit.lib.BitmapIndex.Bitmap;
import org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder;
-import org.eclipse.jgit.lib.NullProgressMonitor;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.revwalk.filter.RevFilter;
/**
* Checks the reachability using bitmaps.
@@ -84,37 +89,108 @@ class BitmappedReachabilityChecker implements ReachabilityChecker {
* Check all targets are reachable from the starters.
* <p>
* In this implementation, it is recommended to put the most popular
- * starters (e.g. refs/heads tips) at the beginning of the collection
+ * starters (e.g. refs/heads tips) at the beginning.
*/
@Override
public Optional<RevCommit> areAllReachable(Collection<RevCommit> targets,
- Collection<RevCommit> starters) throws MissingObjectException,
+ Stream<RevCommit> starters) throws MissingObjectException,
IncorrectObjectTypeException, IOException {
- BitmapCalculator calculator = new BitmapCalculator(walk);
- /**
- * Iterate over starters bitmaps and remove targets as they become
- * reachable.
- *
- * Building the total starters bitmap has the same cost (iterating over
- * all starters adding the bitmaps) and this gives us the chance to
- * shorcut the loop.
- *
- * This is based on the assuption that most of the starters will have
- * the reachability bitmap precalculated. If many require a walk, the
- * walk.reset() could start to take too much time.
- */
List<RevCommit> remainingTargets = new ArrayList<>(targets);
- for (RevCommit starter : starters) {
- BitmapBuilder starterBitmap = calculator.getBitmap(starter,
- NullProgressMonitor.INSTANCE);
- remainingTargets.removeIf(starterBitmap::contains);
- if (remainingTargets.isEmpty()) {
- return Optional.empty();
+
+ walk.reset();
+ walk.sort(RevSort.TOPO);
+
+ // Filter emits only commits that are unreachable from previously
+ // visited commits. Internally it keeps a bitmap of everything
+ // reachable so far, which we use to discard reachable targets.
+ BitmapIndex repoBitmaps = walk.getObjectReader().getBitmapIndex();
+ ReachedFilter reachedFilter = new ReachedFilter(repoBitmaps);
+ walk.setRevFilter(reachedFilter);
+
+ Iterator<RevCommit> startersIter = starters.iterator();
+ while (startersIter.hasNext()) {
+ walk.markStart(startersIter.next());
+ while (walk.next() != null) {
+ remainingTargets.removeIf(reachedFilter::isReachable);
+
+ if (remainingTargets.isEmpty()) {
+ return Optional.empty();
+ }
}
+ walk.reset();
}
return Optional.of(remainingTargets.get(0));
}
+ /**
+ * This filter emits commits that were not bitmap-reachable from anything
+ * visited before. Or in other words, commits that add something (themselves
+ * or their bitmap) to the "reached" bitmap.
+ *
+ * Current progress can be queried via {@link #isReachable(RevCommit)}.
+ */
+ private static class ReachedFilter extends RevFilter {
+
+ private final BitmapIndex repoBitmaps;
+ private final BitmapBuilder reached;
+
+ /**
+ * Create a filter that emits only previously unreachable commits.
+ *
+ * @param repoBitmaps
+ * bitmap index of the repo
+ */
+ public ReachedFilter(BitmapIndex repoBitmaps) {
+ this.repoBitmaps = repoBitmaps;
+ this.reached = repoBitmaps.newBitmapBuilder();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final boolean include(RevWalk walker, RevCommit cmit) {
+ Bitmap commitBitmap;
+
+ if (reached.contains(cmit)) {
+ // already seen or included
+ dontFollow(cmit);
+ return false;
+ }
+
+ if ((commitBitmap = repoBitmaps.getBitmap(cmit)) != null) {
+ reached.or(commitBitmap);
+ // Emit the commit because there are new contents in the bitmap
+ // but don't follow parents (they are already in the bitmap)
+ dontFollow(cmit);
+ return true;
+ }
+
+ // No bitmaps, keep going
+ reached.addObject(cmit, Constants.OBJ_COMMIT);
+ return true;
+ }
+
+ private static final void dontFollow(RevCommit cmit) {
+ for (RevCommit p : cmit.getParents()) {
+ p.add(RevFlag.SEEN);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final RevFilter clone() {
+ throw new UnsupportedOperationException();
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public final boolean requiresCommitBody() {
+ return false;
+ }
+
+ boolean isReachable(RevCommit commit) {
+ return reached.contains(commit);
+ }
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PedestrianReachabilityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PedestrianReachabilityChecker.java
index bba3c5cff3..da9e75992f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PedestrianReachabilityChecker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PedestrianReachabilityChecker.java
@@ -44,7 +44,9 @@ package org.eclipse.jgit.revwalk;
import java.io.IOException;
import java.util.Collection;
+import java.util.Iterator;
import java.util.Optional;
+import java.util.stream.Stream;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
@@ -75,7 +77,7 @@ class PedestrianReachabilityChecker implements ReachabilityChecker {
@Override
public Optional<RevCommit> areAllReachable(Collection<RevCommit> targets,
- Collection<RevCommit> starters)
+ Stream<RevCommit> starters)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
walk.reset();
@@ -87,8 +89,9 @@ class PedestrianReachabilityChecker implements ReachabilityChecker {
walk.markStart(target);
}
- for (RevCommit starter : starters) {
- walk.markUninteresting(starter);
+ Iterator<RevCommit> iterator = starters.iterator();
+ while (iterator.hasNext()) {
+ walk.markUninteresting(iterator.next());
}
return Optional.ofNullable(walk.next());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ReachabilityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ReachabilityChecker.java
index 2ed06d1769..6a9c641318 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ReachabilityChecker.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ReachabilityChecker.java
@@ -45,6 +45,7 @@ package org.eclipse.jgit.revwalk;
import java.io.IOException;
import java.util.Collection;
import java.util.Optional;
+import java.util.stream.Stream;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
@@ -82,9 +83,43 @@ public interface ReachabilityChecker {
* @throws IOException
* if any of the underlying indexes or readers can not be
* opened.
+ *
+ * @deprecated see {{@link #areAllReachable(Collection, Stream)}
+ */
+ @Deprecated
+ default Optional<RevCommit> areAllReachable(Collection<RevCommit> targets,
+ Collection<RevCommit> starters) throws MissingObjectException,
+ IncorrectObjectTypeException, IOException {
+ return areAllReachable(targets, starters.stream());
+ }
+
+ /**
+ * Check if all targets are reachable from the {@code starter} commits.
+ * <p>
+ * Caller should parse the objectIds (preferably with
+ * {@code walk.parseCommit()} and handle missing/incorrect type objects
+ * before calling this method.
+ *
+ * @param targets
+ * commits to reach.
+ * @param starters
+ * known starting points.
+ * @return An unreachable target if at least one of the targets is
+ * unreachable. An empty optional if all targets are reachable from
+ * the starters.
+ *
+ * @throws MissingObjectException
+ * if any of the incoming objects doesn't exist in the
+ * repository.
+ * @throws IncorrectObjectTypeException
+ * if any of the incoming objects is not a commit or a tag.
+ * @throws IOException
+ * if any of the underlying indexes or readers can not be
+ * opened.
+ * @since 5.6
*/
Optional<RevCommit> areAllReachable(Collection<RevCommit> targets,
- Collection<RevCommit> starters)
+ Stream<RevCommit> starters)
throws MissingObjectException, IncorrectObjectTypeException,
IOException;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommandErrorHandler.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommandErrorHandler.java
new file mode 100644
index 0000000000..d9a148622b
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommandErrorHandler.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2019, Google LLC and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.transport;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.transport.ReceiveCommand.Result;
+
+/**
+ * Exception handler for processing {@link ReceiveCommand}.
+ *
+ * @since 5.7
+ */
+public interface ReceiveCommandErrorHandler {
+ /**
+ * Handle an exception thrown while validating the new commit ID.
+ *
+ * @param cmd
+ * offending command
+ * @param e
+ * exception thrown
+ */
+ default void handleNewIdValidationException(ReceiveCommand cmd,
+ IOException e) {
+ cmd.setResult(Result.REJECTED_MISSING_OBJECT, cmd.getNewId().name());
+ }
+
+ /**
+ * Handle an exception thrown while validating the old commit ID.
+ *
+ * @param cmd
+ * offending command
+ * @param e
+ * exception thrown
+ */
+ default void handleOldIdValidationException(ReceiveCommand cmd,
+ IOException e) {
+ cmd.setResult(Result.REJECTED_MISSING_OBJECT, cmd.getOldId().name());
+ }
+
+ /**
+ * Handle an exception thrown while checking if the update is fast-forward.
+ *
+ * @param cmd
+ * offending command
+ * @param e
+ * exception thrown
+ */
+ default void handleFastForwardCheckException(ReceiveCommand cmd,
+ IOException e) {
+ if (e instanceof MissingObjectException) {
+ cmd.setResult(Result.REJECTED_MISSING_OBJECT, e.getMessage());
+ } else {
+ cmd.setResult(Result.REJECTED_OTHER_REASON);
+ }
+ }
+
+ /**
+ * Handle an exception thrown while checking if the update is fast-forward.
+ *
+ * @param cmds
+ * commands being processed
+ * @param e
+ * exception thrown
+ */
+ default void handleBatchRefUpdateException(List<ReceiveCommand> cmds,
+ IOException e) {
+ for (ReceiveCommand cmd : cmds) {
+ if (cmd.getResult() == Result.NOT_ATTEMPTED) {
+ cmd.reject(e);
+ }
+ }
+ }
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
index 820cdb6bad..69e647150f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -74,7 +74,6 @@ import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.errors.InvalidObjectIdException;
import org.eclipse.jgit.errors.LargeObjectException;
-import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.errors.PackProtocolException;
import org.eclipse.jgit.errors.TooLargePackException;
import org.eclipse.jgit.errors.UnpackException;
@@ -93,24 +92,21 @@ import org.eclipse.jgit.lib.NullProgressMonitor;
import org.eclipse.jgit.lib.ObjectChecker;
import org.eclipse.jgit.lib.ObjectDatabase;
import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.ObjectIdSubclassMap;
import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.ObjectLoader;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.ProgressMonitor;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.revwalk.ObjectWalk;
-import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.revwalk.RevFlag;
import org.eclipse.jgit.revwalk.RevObject;
-import org.eclipse.jgit.revwalk.RevSort;
-import org.eclipse.jgit.revwalk.RevTree;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.transport.PacketLineIn.InputOverLimitIOException;
import org.eclipse.jgit.transport.ReceiveCommand.Result;
import org.eclipse.jgit.transport.RefAdvertiser.PacketLineOutRefAdvertiser;
+import org.eclipse.jgit.transport.internal.ConnectivityChecker.ConnectivityCheckInfo;
+import org.eclipse.jgit.transport.internal.ConnectivityChecker;
+import org.eclipse.jgit.transport.internal.FullConnectivityChecker;
import org.eclipse.jgit.util.io.InterruptTimer;
import org.eclipse.jgit.util.io.LimitedInputStream;
import org.eclipse.jgit.util.io.TimeoutInputStream;
@@ -273,7 +269,7 @@ public class ReceivePack {
/** Lock around the received pack file, while updating refs. */
private PackLock packLock;
- private boolean checkReferencedIsReachable;
+ private boolean checkReferencedAreReachable;
/** Git object size limit */
private long maxObjectSizeLimit;
@@ -292,9 +288,21 @@ public class ReceivePack {
private ReceivedPackStatistics stats;
+ /**
+ * Connectivity checker to use.
+ * @since 5.7
+ */
+ protected ConnectivityChecker connectivityChecker = new FullConnectivityChecker();
+
/** Hook to validate the update commands before execution. */
private PreReceiveHook preReceive;
+ private ReceiveCommandErrorHandler receiveCommandErrorHandler = new ReceiveCommandErrorHandler() {
+ // Use the default implementation.
+ };
+
+ private UnpackErrorHandler unpackErrorHandler = new DefaultUnpackErrorHandler();
+
/** Hook to report on the commands after execution. */
private PostReceiveHook postReceive;
@@ -508,7 +516,7 @@ public class ReceivePack {
* reference.
*/
public boolean isCheckReferencedObjectsAreReachable() {
- return checkReferencedIsReachable;
+ return checkReferencedAreReachable;
}
/**
@@ -533,7 +541,7 @@ public class ReceivePack {
* {@code true} to enable the additional check.
*/
public void setCheckReferencedObjectsAreReachable(boolean b) {
- this.checkReferencedIsReachable = b;
+ this.checkReferencedAreReachable = b;
}
/**
@@ -1021,6 +1029,17 @@ public class ReceivePack {
}
/**
+ * Set an error handler for {@link ReceiveCommand}.
+ *
+ * @param receiveCommandErrorHandler
+ * @since 5.7
+ */
+ public void setReceiveCommandErrorHandler(
+ ReceiveCommandErrorHandler receiveCommandErrorHandler) {
+ this.receiveCommandErrorHandler = receiveCommandErrorHandler;
+ }
+
+ /**
* Send an error message to the client.
* <p>
* If any error messages are sent before the references are advertised to
@@ -1153,6 +1172,9 @@ public class ReceivePack {
/**
* Initialize the instance with the given streams.
*
+ * Visible for out-of-tree subclasses (e.g. tests that need to set the
+ * streams without going through the {@link #service()} method).
+ *
* @param input
* raw input to read client commands and pack data from. Caller
* must ensure the input is buffered, otherwise read performance
@@ -1167,7 +1189,7 @@ public class ReceivePack {
* standard error channel of the command execution. For most
* other network connections this should be null.
*/
- private void init(final InputStream input, final OutputStream output,
+ protected void init(final InputStream input, final OutputStream output,
final OutputStream messages) {
origOut = output;
rawIn = input;
@@ -1207,10 +1229,20 @@ public class ReceivePack {
/**
* Receive a pack from the stream and check connectivity if necessary.
*
+ * Visible for out-of-tree subclasses. Subclasses overriding this method
+ * should invoke this implementation, as it alters the instance state (e.g.
+ * it reads the pack from the input and parses it before running the
+ * connectivity checks).
+ *
* @throws java.io.IOException
* an error occurred during unpacking or connectivity checking.
+ * @throws LargeObjectException
+ * an large object needs to be opened for the check.
+ * @throws SubmoduleValidationException
+ * fails to validate the submodule.
*/
- private void receivePackAndCheckConnectivity() throws IOException {
+ protected void receivePackAndCheckConnectivity() throws IOException,
+ LargeObjectException, SubmoduleValidationException {
receivePack();
if (needCheckConnectivity()) {
checkSubmodules();
@@ -1360,15 +1392,9 @@ public class ReceivePack {
if (hasCommands()) {
readPostCommands(pck);
}
- } catch (PackProtocolException e) {
- discardCommands();
- fatalError(e.getMessage());
- throw e;
- } catch (InputOverLimitIOException e) {
- String msg = JGitText.get().tooManyCommands;
+ } catch (Throwable t) {
discardCommands();
- fatalError(msg);
- throw new PackProtocolException(msg);
+ throw t;
}
}
@@ -1490,10 +1516,10 @@ public class ReceivePack {
parser = ins.newPackParser(packInputStream());
parser.setAllowThin(true);
- parser.setNeedNewObjectIds(checkReferencedIsReachable);
- parser.setNeedBaseObjectIds(checkReferencedIsReachable);
- parser.setCheckEofAfterPackFooter(
- !biDirectionalPipe && !isExpectDataAfterPackFooter());
+ parser.setNeedNewObjectIds(checkReferencedAreReachable);
+ parser.setNeedBaseObjectIds(checkReferencedAreReachable);
+ parser.setCheckEofAfterPackFooter(!biDirectionalPipe
+ && !isExpectDataAfterPackFooter());
parser.setExpectDataAfterPackFooter(isExpectDataAfterPackFooter());
parser.setObjectChecker(objectChecker);
parser.setLockMessage(lockMsg);
@@ -1527,7 +1553,8 @@ public class ReceivePack {
|| !getClientShallowCommits().isEmpty();
}
- private void checkSubmodules() throws IOException {
+ private void checkSubmodules() throws IOException, LargeObjectException,
+ SubmoduleValidationException {
ObjectDatabase odb = db.getObjectDatabase();
if (objectChecker == null) {
return;
@@ -1536,18 +1563,12 @@ public class ReceivePack {
AnyObjectId blobId = entry.getBlobId();
ObjectLoader blob = odb.open(blobId, Constants.OBJ_BLOB);
- try {
- SubmoduleValidator.assertValidGitModulesFile(
- new String(blob.getBytes(), UTF_8));
- } catch (LargeObjectException | SubmoduleValidationException e) {
- throw new IOException(e);
- }
+ SubmoduleValidator.assertValidGitModulesFile(
+ new String(blob.getBytes(), UTF_8));
}
}
private void checkConnectivity() throws IOException {
- ObjectIdSubclassMap<ObjectId> baseObjects = null;
- ObjectIdSubclassMap<ObjectId> providedObjects = null;
ProgressMonitor checking = NullProgressMonitor.INSTANCE;
if (sideBand && !quiet) {
SideBandProgressMonitor m = new SideBandProgressMonitor(msgOut);
@@ -1555,76 +1576,18 @@ public class ReceivePack {
checking = m;
}
- if (checkReferencedIsReachable) {
- baseObjects = parser.getBaseObjectIds();
- providedObjects = parser.getNewObjectIds();
- }
- parser = null;
-
- try (ObjectWalk ow = new ObjectWalk(db)) {
- if (baseObjects != null) {
- ow.sort(RevSort.TOPO);
- if (!baseObjects.isEmpty())
- ow.sort(RevSort.BOUNDARY, true);
- }
-
- for (ReceiveCommand cmd : commands) {
- if (cmd.getResult() != Result.NOT_ATTEMPTED)
- continue;
- if (cmd.getType() == ReceiveCommand.Type.DELETE)
- continue;
- ow.markStart(ow.parseAny(cmd.getNewId()));
- }
- for (ObjectId have : advertisedHaves) {
- RevObject o = ow.parseAny(have);
- ow.markUninteresting(o);
-
- if (baseObjects != null && !baseObjects.isEmpty()) {
- o = ow.peel(o);
- if (o instanceof RevCommit)
- o = ((RevCommit) o).getTree();
- if (o instanceof RevTree)
- ow.markUninteresting(o);
- }
- }
-
- checking.beginTask(JGitText.get().countingObjects,
- ProgressMonitor.UNKNOWN);
- RevCommit c;
- while ((c = ow.next()) != null) {
- checking.update(1);
- if (providedObjects != null //
- && !c.has(RevFlag.UNINTERESTING) //
- && !providedObjects.contains(c))
- throw new MissingObjectException(c, Constants.TYPE_COMMIT);
- }
-
- RevObject o;
- while ((o = ow.nextObject()) != null) {
- checking.update(1);
- if (o.has(RevFlag.UNINTERESTING))
- continue;
-
- if (providedObjects != null) {
- if (providedObjects.contains(o))
- continue;
- else
- throw new MissingObjectException(o, o.getType());
- }
-
- if (o instanceof RevBlob && !db.getObjectDatabase().has(o))
- throw new MissingObjectException(o, Constants.TYPE_BLOB);
- }
- checking.endTask();
+ connectivityChecker.checkConnectivity(createConnectivityCheckInfo(),
+ advertisedHaves, checking);
+ }
- if (baseObjects != null) {
- for (ObjectId id : baseObjects) {
- o = ow.parseAny(id);
- if (!o.has(RevFlag.UNINTERESTING))
- throw new MissingObjectException(o, o.getType());
- }
- }
- }
+ private ConnectivityCheckInfo createConnectivityCheckInfo() {
+ ConnectivityCheckInfo info = new ConnectivityCheckInfo();
+ info.setCheckObjects(checkReferencedAreReachable);
+ info.setCommands(getAllCommands());
+ info.setRepository(db);
+ info.setParser(parser);
+ info.setWalk(walk);
+ return info;
}
/**
@@ -1722,16 +1685,16 @@ public class ReceivePack {
try {
oldObj = walk.parseAny(cmd.getOldId());
} catch (IOException e) {
- cmd.setResult(Result.REJECTED_MISSING_OBJECT,
- cmd.getOldId().name());
+ receiveCommandErrorHandler
+ .handleOldIdValidationException(cmd, e);
continue;
}
try {
newObj = walk.parseAny(cmd.getNewId());
} catch (IOException e) {
- cmd.setResult(Result.REJECTED_MISSING_OBJECT,
- cmd.getNewId().name());
+ receiveCommandErrorHandler
+ .handleNewIdValidationException(cmd, e);
continue;
}
@@ -1739,16 +1702,14 @@ public class ReceivePack {
&& newObj instanceof RevCommit) {
try {
if (walk.isMergedInto((RevCommit) oldObj,
- (RevCommit) newObj))
+ (RevCommit) newObj)) {
cmd.setTypeFastForwardUpdate();
- else
- cmd.setType(
- ReceiveCommand.Type.UPDATE_NONFASTFORWARD);
- } catch (MissingObjectException e) {
- cmd.setResult(Result.REJECTED_MISSING_OBJECT,
- e.getMessage());
+ } else {
+ cmd.setType(ReceiveCommand.Type.UPDATE_NONFASTFORWARD);
+ }
} catch (IOException e) {
- cmd.setResult(Result.REJECTED_OTHER_REASON);
+ receiveCommandErrorHandler
+ .handleFastForwardCheckException(cmd, e);
}
} else {
cmd.setType(ReceiveCommand.Type.UPDATE_NONFASTFORWARD);
@@ -1827,109 +1788,122 @@ public class ReceivePack {
try {
batch.setPushCertificate(getPushCertificate());
batch.execute(walk, updating);
- } catch (IOException err) {
- for (ReceiveCommand cmd : toApply) {
- if (cmd.getResult() == Result.NOT_ATTEMPTED)
- cmd.reject(err);
- }
+ } catch (IOException e) {
+ receiveCommandErrorHandler.handleBatchRefUpdateException(toApply,
+ e);
}
}
/**
* Send a status report.
*
- * @param forClient
- * true if this report is for a Git client, false if it is for an
- * end-user.
* @param unpackError
* an error that occurred during unpacking, or {@code null}
- * @param out
- * the reporter for sending the status strings.
* @throws java.io.IOException
* an error occurred writing the status report.
* @since 5.6
*/
- private void sendStatusReport(final boolean forClient,
- final Throwable unpackError, final Reporter out)
- throws IOException {
- if (unpackError != null) {
- out.sendString("unpack error " + unpackError.getMessage()); //$NON-NLS-1$
- if (forClient) {
- for (ReceiveCommand cmd : commands) {
- out.sendString("ng " + cmd.getRefName() //$NON-NLS-1$
- + " n/a (unpacker error)"); //$NON-NLS-1$
+ private void sendStatusReport(Throwable unpackError) throws IOException {
+ Reporter out = new Reporter() {
+ @Override
+ void sendString(String s) throws IOException {
+ if (reportStatus) {
+ pckOut.writeString(s + "\n"); //$NON-NLS-1$
+ } else if (msgOut != null) {
+ msgOut.write(Constants.encode(s + "\n")); //$NON-NLS-1$
}
}
- return;
- }
+ };
- if (forClient)
- out.sendString("unpack ok"); //$NON-NLS-1$
- for (ReceiveCommand cmd : commands) {
- if (cmd.getResult() == Result.OK) {
- if (forClient)
- out.sendString("ok " + cmd.getRefName()); //$NON-NLS-1$
- continue;
+ try {
+ if (unpackError != null) {
+ out.sendString("unpack error " + unpackError.getMessage()); //$NON-NLS-1$
+ if (reportStatus) {
+ for (ReceiveCommand cmd : commands) {
+ out.sendString("ng " + cmd.getRefName() //$NON-NLS-1$
+ + " n/a (unpacker error)"); //$NON-NLS-1$
+ }
+ }
+ return;
}
- final StringBuilder r = new StringBuilder();
- if (forClient)
- r.append("ng ").append(cmd.getRefName()).append(" "); //$NON-NLS-1$ //$NON-NLS-2$
- else
- r.append(" ! [rejected] ").append(cmd.getRefName()) //$NON-NLS-1$
- .append(" ("); //$NON-NLS-1$
-
- switch (cmd.getResult()) {
- case NOT_ATTEMPTED:
- r.append("server bug; ref not processed"); //$NON-NLS-1$
- break;
-
- case REJECTED_NOCREATE:
- r.append("creation prohibited"); //$NON-NLS-1$
- break;
-
- case REJECTED_NODELETE:
- r.append("deletion prohibited"); //$NON-NLS-1$
- break;
-
- case REJECTED_NONFASTFORWARD:
- r.append("non-fast forward"); //$NON-NLS-1$
- break;
-
- case REJECTED_CURRENT_BRANCH:
- r.append("branch is currently checked out"); //$NON-NLS-1$
- break;
-
- case REJECTED_MISSING_OBJECT:
- if (cmd.getMessage() == null)
- r.append("missing object(s)"); //$NON-NLS-1$
- else if (cmd.getMessage()
- .length() == Constants.OBJECT_ID_STRING_LENGTH) {
- r.append("object "); //$NON-NLS-1$
- r.append(cmd.getMessage());
- r.append(" missing"); //$NON-NLS-1$
- } else
- r.append(cmd.getMessage());
- break;
-
- case REJECTED_OTHER_REASON:
- if (cmd.getMessage() == null)
- r.append("unspecified reason"); //$NON-NLS-1$
- else
- r.append(cmd.getMessage());
- break;
-
- case LOCK_FAILURE:
- r.append("failed to lock"); //$NON-NLS-1$
- break;
-
- case OK:
- // We shouldn't have reached this case (see 'ok' case above).
- continue;
+ if (reportStatus) {
+ out.sendString("unpack ok"); //$NON-NLS-1$
+ }
+ for (ReceiveCommand cmd : commands) {
+ if (cmd.getResult() == Result.OK) {
+ if (reportStatus) {
+ out.sendString("ok " + cmd.getRefName()); //$NON-NLS-1$
+ }
+ continue;
+ }
+
+ final StringBuilder r = new StringBuilder();
+ if (reportStatus) {
+ r.append("ng ").append(cmd.getRefName()).append(" "); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ r.append(" ! [rejected] ").append(cmd.getRefName()) //$NON-NLS-1$
+ .append(" ("); //$NON-NLS-1$
+ }
+
+ switch (cmd.getResult()) {
+ case NOT_ATTEMPTED:
+ r.append("server bug; ref not processed"); //$NON-NLS-1$
+ break;
+
+ case REJECTED_NOCREATE:
+ r.append("creation prohibited"); //$NON-NLS-1$
+ break;
+
+ case REJECTED_NODELETE:
+ r.append("deletion prohibited"); //$NON-NLS-1$
+ break;
+
+ case REJECTED_NONFASTFORWARD:
+ r.append("non-fast forward"); //$NON-NLS-1$
+ break;
+
+ case REJECTED_CURRENT_BRANCH:
+ r.append("branch is currently checked out"); //$NON-NLS-1$
+ break;
+
+ case REJECTED_MISSING_OBJECT:
+ if (cmd.getMessage() == null)
+ r.append("missing object(s)"); //$NON-NLS-1$
+ else if (cmd.getMessage()
+ .length() == Constants.OBJECT_ID_STRING_LENGTH) {
+ r.append("object "); //$NON-NLS-1$
+ r.append(cmd.getMessage());
+ r.append(" missing"); //$NON-NLS-1$
+ } else
+ r.append(cmd.getMessage());
+ break;
+
+ case REJECTED_OTHER_REASON:
+ if (cmd.getMessage() == null)
+ r.append("unspecified reason"); //$NON-NLS-1$
+ else
+ r.append(cmd.getMessage());
+ break;
+
+ case LOCK_FAILURE:
+ r.append("failed to lock"); //$NON-NLS-1$
+ break;
+
+ case OK:
+ // We shouldn't have reached this case (see 'ok' case
+ // above).
+ continue;
+ }
+ if (!reportStatus) {
+ r.append(")"); //$NON-NLS-1$
+ }
+ out.sendString(r.toString());
+ }
+ } finally {
+ if (reportStatus) {
+ pckOut.end();
}
- if (!forClient)
- r.append(")"); //$NON-NLS-1$
- out.sendString(r.toString());
}
}
@@ -2115,6 +2089,15 @@ public class ReceivePack {
}
/**
+ * @param unpackErrorHandler
+ * the unpackErrorHandler to set
+ * @since 5.7
+ */
+ public void setUnpackErrorHandler(UnpackErrorHandler unpackErrorHandler) {
+ this.unpackErrorHandler = unpackErrorHandler;
+ }
+
+ /**
* Set whether this class will report command failures as warning messages
* before sending the command results.
*
@@ -2153,6 +2136,50 @@ public class ReceivePack {
init(input, output, messages);
try {
service();
+ } catch (PackProtocolException e) {
+ fatalError(e.getMessage());
+ throw e;
+ } catch (InputOverLimitIOException e) {
+ String msg = JGitText.get().tooManyCommands;
+ fatalError(msg);
+ throw new PackProtocolException(msg);
+ } finally {
+ try {
+ close();
+ } finally {
+ release();
+ }
+ }
+ }
+
+ /**
+ * Execute the receive task on the socket.
+ *
+ * <p>
+ * Same as {@link #receive}, but the exceptions are not reported to the
+ * client yet.
+ *
+ * @param input
+ * raw input to read client commands and pack data from. Caller
+ * must ensure the input is buffered, otherwise read performance
+ * may suffer.
+ * @param output
+ * response back to the Git network client. Caller must ensure
+ * the output is buffered, otherwise write performance may
+ * suffer.
+ * @param messages
+ * secondary "notice" channel to send additional messages out
+ * through. When run over SSH this should be tied back to the
+ * standard error channel of the command execution. For most
+ * other network connections this should be null.
+ * @throws java.io.IOException
+ * @since 5.7
+ */
+ public void receiveWithExceptionPropagation(InputStream input,
+ OutputStream output, OutputStream messages) throws IOException {
+ init(input, output, messages);
+ try {
+ service();
} finally {
try {
close();
@@ -2170,21 +2197,24 @@ public class ReceivePack {
getAdvertisedOrDefaultRefs();
if (hasError())
return;
+
recvCommands();
+
if (hasCommands()) {
- Throwable unpackError = null;
- if (needPack()) {
- try {
- receivePackAndCheckConnectivity();
- } catch (IOException | RuntimeException | Error err) {
- unpackError = err;
+ try (PostReceiveExecutor e = new PostReceiveExecutor()) {
+ if (needPack()) {
+ try {
+ receivePackAndCheckConnectivity();
+ } catch (IOException | RuntimeException
+ | SubmoduleValidationException | Error err) {
+ unlockPack();
+ unpackErrorHandler.handleUnpackException(err);
+ throw new UnpackException(err);
+ }
}
- }
- try {
- if (unpackError == null) {
- boolean atomic = isCapabilityEnabled(CAPABILITY_ATOMIC);
- setAtomic(atomic);
+ try {
+ setAtomic(isCapabilityEnabled(CAPABILITY_ATOMIC));
validateCommands();
if (atomic && anyRejects()) {
@@ -2197,39 +2227,12 @@ public class ReceivePack {
failPendingCommands();
}
executeCommands();
+ } finally {
+ unlockPack();
}
- } finally {
- unlockPack();
- }
-
- if (reportStatus) {
- sendStatusReport(true, unpackError, new Reporter() {
- @Override
- void sendString(String s) throws IOException {
- pckOut.writeString(s + "\n"); //$NON-NLS-1$
- }
- });
- pckOut.end();
- } else if (msgOut != null) {
- sendStatusReport(false, unpackError, new Reporter() {
- @Override
- void sendString(String s) throws IOException {
- msgOut.write(Constants.encode(s + "\n")); //$NON-NLS-1$
- }
- });
- }
- if (unpackError != null) {
- // we already know which exception to throw. Ignore
- // potential additional exceptions raised in postReceiveHooks
- try {
- postReceive.onPostReceive(this, filterCommands(Result.OK));
- } catch (Throwable e) {
- // empty
- }
- throw new UnpackException(unpackError);
+ sendStatusReport(null);
}
- postReceive.onPostReceive(this, filterCommands(Result.OK));
autoGc();
}
}
@@ -2266,4 +2269,19 @@ public class ReceivePack {
}
return new ReceiveCommand(oldId, newId, name);
}
+
+ private class PostReceiveExecutor implements AutoCloseable {
+ @Override
+ public void close() {
+ postReceive.onPostReceive(ReceivePack.this,
+ filterCommands(Result.OK));
+ }
+ }
+
+ private class DefaultUnpackErrorHandler implements UnpackErrorHandler {
+ @Override
+ public void handleUnpackException(Throwable t) throws IOException {
+ sendStatusReport(t);
+ }
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UnpackErrorHandler.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UnpackErrorHandler.java
new file mode 100644
index 0000000000..12c9a76214
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UnpackErrorHandler.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2019, Google LLC and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.transport;
+
+import java.io.IOException;
+
+/**
+ * Exception handler for processing an incoming pack file.
+ *
+ * @since 5.7
+ */
+public interface UnpackErrorHandler {
+ /**
+ * Handle an exception thrown while unpacking the pack file.
+ *
+ * @param t
+ * exception thrown
+ * @throws IOException
+ * thrown when failed to write an error back to the client.
+ */
+ void handleUnpackException(Throwable t) throws IOException;
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index 5bee1ce9a7..6ee280b81e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -85,7 +85,9 @@ import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.TreeMap;
+import java.util.function.Predicate;
import java.util.stream.Collectors;
+import java.util.stream.Stream;
import org.eclipse.jgit.annotations.NonNull;
import org.eclipse.jgit.annotations.Nullable;
@@ -1873,8 +1875,7 @@ public class UploadPack {
@Override
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
- checkNotAdvertisedWants(up, wants,
- refIdSet(up.getAdvertisedRefs().values()));
+ checkNotAdvertisedWants(up, wants, up.getAdvertisedRefs().values());
}
}
@@ -1911,7 +1912,7 @@ public class UploadPack {
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
checkNotAdvertisedWants(up, wants,
- refIdSet(up.getRepository().getRefDatabase().getRefs()));
+ up.getRepository().getRefDatabase().getRefs());
}
}
@@ -1971,12 +1972,14 @@ public class UploadPack {
}
private static void checkNotAdvertisedWants(UploadPack up,
- List<ObjectId> notAdvertisedWants, Set<ObjectId> reachableFrom)
+ List<ObjectId> notAdvertisedWants, Collection<Ref> visibleRefs)
throws IOException {
ObjectReader reader = up.getRevWalk().getObjectReader();
+
try (RevWalk walk = new RevWalk(reader)) {
walk.setRetainBody(false);
+ Set<ObjectId> reachableFrom = refIdSet(visibleRefs);
// Missing "wants" throw exception here
List<RevObject> wantsAsObjs = objectIdsToRevObjects(walk,
notAdvertisedWants);
@@ -2023,10 +2026,13 @@ public class UploadPack {
ReachabilityChecker reachabilityChecker = walk
.createReachabilityChecker();
- List<RevCommit> starters = objectIdsToRevCommits(walk,
- reachableFrom);
+ Stream<RevCommit> reachableCommits = importantRefsFirst(visibleRefs)
+ .map(UploadPack::refToObjectId)
+ .map(objId -> objectIdToRevCommit(walk, objId))
+ .filter(Objects::nonNull); // Ignore missing tips
+
Optional<RevCommit> unreachable = reachabilityChecker
- .areAllReachable(wantsAsCommits, starters);
+ .areAllReachable(wantsAsCommits, reachableCommits);
if (unreachable.isPresent()) {
throw new WantNotValidException(unreachable.get());
}
@@ -2036,6 +2042,50 @@ public class UploadPack {
}
}
+ static Stream<Ref> importantRefsFirst(
+ Collection<Ref> visibleRefs) {
+ Predicate<Ref> startsWithRefsHeads = ref -> ref.getName()
+ .startsWith(Constants.R_HEADS);
+ Predicate<Ref> startsWithRefsTags = ref -> ref.getName()
+ .startsWith(Constants.R_TAGS);
+ Predicate<Ref> allOther = ref -> !startsWithRefsHeads.test(ref)
+ && !startsWithRefsTags.test(ref);
+
+ return Stream.concat(
+ visibleRefs.stream().filter(startsWithRefsHeads),
+ Stream.concat(
+ visibleRefs.stream().filter(startsWithRefsTags),
+ visibleRefs.stream().filter(allOther)));
+ }
+
+ private static ObjectId refToObjectId(Ref ref) {
+ return ref.getObjectId() != null ? ref.getObjectId()
+ : ref.getPeeledObjectId();
+ }
+
+ /**
+ * Translate an object id to a RevCommit.
+ *
+ * @param walk
+ * walk on the relevant object storae
+ * @param objectId
+ * Object Id
+ * @return RevCommit instance or null if the object is missing
+ */
+ @Nullable
+ private static RevCommit objectIdToRevCommit(RevWalk walk,
+ ObjectId objectId) {
+ if (objectId == null) {
+ return null;
+ }
+
+ try {
+ return walk.parseCommit(objectId);
+ } catch (IOException e) {
+ return null;
+ }
+ }
+
// Resolve the ObjectIds into RevObjects. Any missing object raises an
// exception
private static List<RevObject> objectIdsToRevObjects(RevWalk walk,
@@ -2048,23 +2098,6 @@ public class UploadPack {
return result;
}
- // Get commits from object ids. If the id is not a commit, ignore it. If the
- // id doesn't exist, report the missing object in a exception.
- private static List<RevCommit> objectIdsToRevCommits(RevWalk walk,
- Iterable<ObjectId> objectIds)
- throws MissingObjectException, IOException {
- List<RevCommit> result = new ArrayList<>();
- for (ObjectId objectId : objectIds) {
- try {
- result.add(walk.parseCommit(objectId));
- } catch (IncorrectObjectTypeException e) {
- continue;
- }
- }
- return result;
- }
-
-
private void addCommonBase(RevObject o) {
if (!o.has(COMMON)) {
o.add(COMMON);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java
new file mode 100644
index 0000000000..d6efada65b
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/ConnectivityChecker.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2019, Google LLC and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.transport.internal;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.transport.PackParser;
+import org.eclipse.jgit.transport.ReceiveCommand;
+
+/**
+ * Checks that a received pack only depends on objects which are reachable from
+ * a defined set of references.
+ */
+public interface ConnectivityChecker {
+
+ /**
+ * Checks connectivity of the commit graph after pack uploading.
+ *
+ * @param connectivityCheckInfo
+ * Input for the connectivity check.
+ * @param haves
+ * Set of references known for client.
+ * @param pm
+ * Monitor to publish progress to.
+ * @throws IOException
+ * an error occurred during connectivity checking.
+ *
+ */
+ void checkConnectivity(ConnectivityCheckInfo connectivityCheckInfo,
+ Set<ObjectId> haves, ProgressMonitor pm)
+ throws IOException;
+
+ /**
+ * POJO which is used to pass all information which is needed to perform
+ * connectivity check.
+ */
+ public static class ConnectivityCheckInfo {
+ private Repository repository;
+
+ private PackParser parser;
+
+ private boolean checkObjects;
+
+ private List<ReceiveCommand> commands;
+
+ private RevWalk walk;
+
+ /**
+ * @return database we write the stored objects into.
+ */
+ public Repository getRepository() {
+ return repository;
+ }
+
+ /**
+ * @param repository
+ * set database we write the stored objects into.
+ */
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+ /**
+ * @return the parser used to parse pack.
+ */
+ public PackParser getParser() {
+ return parser;
+ }
+
+ /**
+ * @param parser
+ * the parser to set
+ */
+ public void setParser(PackParser parser) {
+ this.parser = parser;
+ }
+
+ /**
+ * @return if checker should check objects.
+ */
+ public boolean isCheckObjects() {
+ return checkObjects;
+ }
+
+ /**
+ * @param checkObjects
+ * set if checker should check referenced objects outside of
+ * the received pack are reachable.
+ */
+ public void setCheckObjects(boolean checkObjects) {
+ this.checkObjects = checkObjects;
+ }
+
+ /**
+ * @return command received by the current request.
+ */
+ public List<ReceiveCommand> getCommands() {
+ return commands;
+ }
+
+ /**
+ * @param commands
+ * set command received by the current request.
+ */
+ public void setCommands(List<ReceiveCommand> commands) {
+ this.commands = commands;
+ }
+
+ /**
+ * @param walk
+ * the walk to parse commits
+ */
+ public void setWalk(RevWalk walk) {
+ this.walk = walk;
+ }
+
+ /**
+ * @return the walk to parse commits
+ */
+ public RevWalk getWalk() {
+ return walk;
+ }
+ }
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java
new file mode 100644
index 0000000000..4adddf0879
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2019, Google LLC and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.transport.internal;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectIdSubclassMap;
+import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.revwalk.ObjectWalk;
+import org.eclipse.jgit.revwalk.RevBlob;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevFlag;
+import org.eclipse.jgit.revwalk.RevObject;
+import org.eclipse.jgit.revwalk.RevSort;
+import org.eclipse.jgit.revwalk.RevTree;
+import org.eclipse.jgit.transport.ReceiveCommand;
+import org.eclipse.jgit.transport.ReceiveCommand.Result;
+
+/**
+ * A connectivity checker that uses the entire reference database to perform
+ * reachability checks when checking the connectivity of objects. If
+ * info.isCheckObjects() is set it will also check that objects referenced by
+ * deltas are either provided or reachable as well.
+ */
+public final class FullConnectivityChecker implements ConnectivityChecker {
+ @Override
+ public void checkConnectivity(ConnectivityCheckInfo connectivityCheckInfo,
+ Set<ObjectId> haves, ProgressMonitor pm)
+ throws MissingObjectException, IOException {
+ pm.beginTask(JGitText.get().countingObjects,
+ ProgressMonitor.UNKNOWN);
+ try (ObjectWalk ow = new ObjectWalk(connectivityCheckInfo.getRepository())) {
+ if (!markStartAndKnownNodes(connectivityCheckInfo, ow, haves,
+ pm)) {
+ return;
+ }
+ checkCommitTree(connectivityCheckInfo, ow, pm);
+ checkObjects(connectivityCheckInfo, ow, pm);
+ } finally {
+ pm.endTask();
+ }
+ }
+
+ /**
+ * @param connectivityCheckInfo
+ * Source for connectivity check.
+ * @param ow
+ * Walk which can also check blobs.
+ * @param haves
+ * Set of references known for client.
+ * @param pm
+ * Monitor to publish progress to.
+ * @return true if at least one new node was marked.
+ * @throws IOException
+ * an error occurred during connectivity checking.
+ */
+ private boolean markStartAndKnownNodes(
+ ConnectivityCheckInfo connectivityCheckInfo,
+ ObjectWalk ow,
+ Set<ObjectId> haves, ProgressMonitor pm)
+ throws IOException {
+ boolean markTrees = connectivityCheckInfo
+ .isCheckObjects()
+ && !connectivityCheckInfo.getParser().getBaseObjectIds()
+ .isEmpty();
+ if (connectivityCheckInfo.isCheckObjects()) {
+ ow.sort(RevSort.TOPO);
+ if (!connectivityCheckInfo.getParser().getBaseObjectIds()
+ .isEmpty()) {
+ ow.sort(RevSort.BOUNDARY, true);
+ }
+ }
+ boolean hasInteresting = false;
+
+ for (ReceiveCommand cmd : connectivityCheckInfo.getCommands()) {
+ if (cmd.getResult() != Result.NOT_ATTEMPTED) {
+ continue;
+ }
+ if (cmd.getType() == ReceiveCommand.Type.DELETE) {
+ continue;
+ }
+ if (haves.contains(cmd.getNewId())) {
+ continue;
+ }
+ ow.markStart(ow.parseAny(cmd.getNewId()));
+ pm.update(1);
+ hasInteresting = true;
+ }
+ if (!hasInteresting) {
+ return false;
+ }
+ for (ObjectId have : haves) {
+ RevObject o = ow.parseAny(have);
+ ow.markUninteresting(o);
+ pm.update(1);
+
+ if (markTrees) {
+ o = ow.peel(o);
+ if (o instanceof RevCommit) {
+ o = ((RevCommit) o).getTree();
+ }
+ if (o instanceof RevTree) {
+ ow.markUninteresting(o);
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @param connectivityCheckInfo
+ * Source for connectivity check.
+ * @param ow
+ * Walk which can also check blobs.
+ * @param pm
+ * Monitor to publish progress to.
+ * @throws IOException
+ * an error occurred during connectivity checking.
+ */
+ private void checkCommitTree(ConnectivityCheckInfo connectivityCheckInfo,
+ ObjectWalk ow,
+ ProgressMonitor pm) throws IOException {
+ RevCommit c;
+ ObjectIdSubclassMap<ObjectId> newObjectIds = connectivityCheckInfo
+ .getParser()
+ .getNewObjectIds();
+ while ((c = ow.next()) != null) {
+ pm.update(1);
+ if (connectivityCheckInfo.isCheckObjects()
+ && !c.has(RevFlag.UNINTERESTING)
+ && !newObjectIds.contains(c)) {
+ throw new MissingObjectException(c, Constants.TYPE_COMMIT);
+ }
+ }
+ }
+
+ /**
+ * @param connectivityCheckInfo
+ * Source for connectivity check.
+ * @param ow
+ * Walk which can also check blobs.
+ * @param pm
+ * Monitor to publish progress to.
+ * @throws IOException
+ * an error occurred during connectivity checking.
+ *
+ */
+ private void checkObjects(ConnectivityCheckInfo connectivityCheckInfo,
+ ObjectWalk ow,
+ ProgressMonitor pm) throws IOException {
+ RevObject o;
+ ObjectIdSubclassMap<ObjectId> newObjectIds = connectivityCheckInfo
+ .getParser()
+ .getNewObjectIds();
+
+ while ((o = ow.nextObject()) != null) {
+ pm.update(1);
+ if (o.has(RevFlag.UNINTERESTING)) {
+ continue;
+ }
+
+ if (connectivityCheckInfo.isCheckObjects()) {
+ if (newObjectIds.contains(o)) {
+ continue;
+ }
+ throw new MissingObjectException(o, o.getType());
+
+ }
+
+ if (o instanceof RevBlob
+ && !connectivityCheckInfo.getRepository().getObjectDatabase()
+ .has(o)) {
+ throw new MissingObjectException(o, Constants.TYPE_BLOB);
+ }
+ }
+
+ if (connectivityCheckInfo.isCheckObjects()) {
+ for (ObjectId id : connectivityCheckInfo.getParser()
+ .getBaseObjectIds()) {
+ o = ow.parseAny(id);
+ if (!o.has(RevFlag.UNINTERESTING)) {
+ throw new MissingObjectException(o, o.getType());
+ }
+ }
+ }
+ }
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java
index 96636b7994..85ee095013 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java
@@ -145,7 +145,7 @@ public class LfsFactory {
}
/**
- * Retrieve a pre-push hook to be applied.
+ * Retrieve a pre-push hook to be applied using the default error stream.
*
* @param repo
* the {@link Repository} the hook is applied to.
@@ -159,6 +159,22 @@ public class LfsFactory {
}
/**
+ * Retrieve a pre-push hook to be applied.
+ *
+ * @param repo
+ * the {@link Repository} the hook is applied to.
+ * @param outputStream
+ * @param errorStream
+ * @return a {@link PrePushHook} implementation or <code>null</code>
+ * @since 5.6
+ */
+ @Nullable
+ public PrePushHook getPrePushHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ return getPrePushHook(repo, outputStream);
+ }
+
+ /**
* Retrieve an {@link LfsInstallCommand} which can be used to enable LFS
* support (if available) either per repository or for the user.
*
diff --git a/pom.xml b/pom.xml
index e5a6fee363..15a4225708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,7 +51,7 @@
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<packaging>pom</packaging>
- <version>5.6.0-SNAPSHOT</version>
+ <version>5.7.0-SNAPSHOT</version>
<name>JGit - Parent</name>
<url>${jgit-url}</url>
@@ -430,7 +430,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
- <version>3.0.0-M2</version>
+ <version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-maven</id>
@@ -890,7 +890,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
- <version>2.3.3</version>
+ <version>2.3.4</version>
</dependency>
</dependencies>
</plugin>
diff --git a/tools/bzl/jmh.bzl b/tools/bzl/jmh.bzl
index eee9ed02c6..a51a42cf33 100644
--- a/tools/bzl/jmh.bzl
+++ b/tools/bzl/jmh.bzl
@@ -41,6 +41,8 @@
# Definitions to run jmh microbenchmarks
+load("@rules_java//java:defs.bzl", "java_binary", "java_plugin")
+
def jmh_java_benchmarks(name, srcs, deps = [], tags = [], plugins = [], **kwargs):
"""Builds runnable JMH benchmarks.
This rule builds a runnable target for one or more JMH benchmarks
@@ -48,14 +50,14 @@ def jmh_java_benchmarks(name, srcs, deps = [], tags = [], plugins = [], **kwargs
except for main_class.
"""
plugin_name = "_{}_jmh_annotation_processor".format(name)
- native.java_plugin(
+ java_plugin(
name = plugin_name,
deps = ["//lib/jmh:jmh"],
processor_class = "org.openjdk.jmh.generators.BenchmarkProcessor",
visibility = ["//visibility:private"],
tags = tags,
)
- native.java_binary(
+ java_binary(
name = name,
srcs = srcs,
main_class = "org.openjdk.jmh.Main",
@@ -63,4 +65,4 @@ def jmh_java_benchmarks(name, srcs, deps = [], tags = [], plugins = [], **kwargs
plugins = plugins + [plugin_name],
tags = tags,
**kwargs
- ) \ No newline at end of file
+ )

Back to the top