summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Documentation/config-options.md24
-rw-r--r--WORKSPACE6
-rw-r--r--org.eclipse.jgit.ant/pom.xml3
-rw-r--r--org.eclipse.jgit.archive/pom.xml2
-rw-r--r--org.eclipse.jgit.benchmarks/.classpath15
-rw-r--r--org.eclipse.jgit.benchmarks/.settings/org.eclipse.jdt.core.prefs4
-rw-r--r--org.eclipse.jgit.benchmarks/pom.xml32
-rw-r--r--org.eclipse.jgit.gpg.bc/pom.xml2
-rw-r--r--org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java6
-rw-r--r--org.eclipse.jgit.http.apache/pom.xml2
-rw-r--r--org.eclipse.jgit.http.server/pom.xml2
-rw-r--r--org.eclipse.jgit.junit.http/pom.xml2
-rw-r--r--org.eclipse.jgit.junit.ssh/pom.xml2
-rw-r--r--org.eclipse.jgit.junit/pom.xml2
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java11
-rw-r--r--org.eclipse.jgit.lfs.server/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs/pom.xml2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target26
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.tpd2
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target272
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.tpd8
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd6
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/orbit-4.30.tpd27
-rw-r--r--org.eclipse.jgit.packaging/pom.xml106
-rw-r--r--org.eclipse.jgit.pgm/pom.xml2
-rw-r--r--org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java7
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/bin/.project28
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/pom.xml2
-rw-r--r--org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.jgit.ssh.apache/pom.xml2
-rw-r--r--org.eclipse.jgit.ssh.apache/src/sun/security/x509/README.md3
-rw-r--r--org.eclipse.jgit.ssh.jsch/pom.xml2
-rw-r--r--org.eclipse.jgit.test/pom.xml1
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java53
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java55
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java156
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java13
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java40
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java132
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java19
-rw-r--r--org.eclipse.jgit.ui/pom.xml2
-rw-r--r--org.eclipse.jgit/.settings/.api_filters51
-rw-r--r--org.eclipse.jgit/pom.xml2
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java219
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java19
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java31
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java37
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexLoader.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java42
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java26
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java140
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UserConfigFile.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java51
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java64
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java23
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java39
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java38
-rw-r--r--pom.xml215
92 files changed, 2021 insertions, 485 deletions
diff --git a/.gitignore b/.gitignore
index 5306e41984..1671449eb1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
/.project
/org.eclipse.jgit.benchmarks/dependency-reduced-pom.xml
-/target
+target/
infer-out
bazel-*
diff --git a/Documentation/config-options.md b/Documentation/config-options.md
index 9022e21af4..84c4f5a664 100644
--- a/Documentation/config-options.md
+++ b/Documentation/config-options.md
@@ -68,7 +68,6 @@ For details on native git options see also the official [git config documentatio
| option | default | git option | description |
|---------|---------|------------|-------------|
-| `gc.writeChangedPaths` | `false`| ⃞ | Whether bloom filter should be written to commit-graph during a gc operation. |
| `gc.aggressiveDepth` | `50` | ✅ | The depth parameter used in the delta compression algorithm used by aggressive garbage collection. |
| `gc.aggressiveWindow` | `250` | ✅ | The window size parameter used in the delta compression algorithm used by aggressive garbage collection. |
| `gc.auto` | `6700` | ✅ | Number of loose objects until auto gc combines all loose objects into a pack and consolidates all existing packs into one. Setting to 0 disables automatic packing of loose objects. |
@@ -77,6 +76,7 @@ For details on native git options see also the official [git config documentatio
| `gc.logExpiry` | `1.day.ago` | ✅ | If the file `gc.log` exists, then auto gc will print its content and exit successfully instead of running unless that file is more than `gc.logExpiry` old. |
| `gc.pruneExpire` | `2.weeks.ago` | ✅ | Grace period after which unreachable objects will be pruned. |
| `gc.prunePackExpire` | `1.hour.ago` | ⃞ | Grace period after which packfiles only containing unreachable objects will be pruned. |
+| `gc.writeChangedPaths` | `false`| ⃞ | Whether bloom filter should be written to commit-graph during a gc operation. |
## __http__ options
@@ -127,3 +127,25 @@ Proxy configuration uses the standard Java mechanisms via class `java.net.ProxyS
| `pack.waitPreventRacyPack` | `false` | ⃞ | Whether we wait before opening a newly written pack to prevent its lastModified timestamp could be racy. |
| `pack.window` | `10` | ✅ | Number of objects to try when looking for a delta base per thread searching for deltas. |
| `pack.windowMemory` | `0` (unlimited) | ✅ | Maximum number of bytes to put into the delta search window. |
+
+## __repack__ options
+
+| option | default | git option | description |
+|---------|---------|------------|-------------|
+| `repack.packKeptObjects` | `true` when `pack.buildBitmaps` is set, `false` otherwise | ✅ | Include objects in packs locked by a `.keep` file when repacking. |
+
+## Tracing
+
+**GIT_TRACE_PERFORMANCE**: set this to `true` as a Java system property or environment variable to trace timings from the progress monitor. The system property takes
+precedence. Defaults to `false`. Can also be set programmatically via `ProgressMonitor#showDuration`.
+
+*Example using JGit CLI:*
+
+```bash
+$ GIT_TRACE_PERFORMANCE=true jgit clone https://foo.bar/foobar
+Cloning into 'foobar'...
+remote: Counting objects: 1 [0.002s]
+remote: Finding sources: 100% (15531/15531) [0.006s]
+Receiving objects: 100% (169737/169737) [13.045s]
+Resolving deltas: 100% (67579/67579) [1.842s]
+```
diff --git a/WORKSPACE b/WORKSPACE
index 4787f61923..5698c83833 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,7 +3,7 @@ workspace(name = "jgit")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//tools:bazlets.bzl", "load_bazlets")
-load_bazlets(commit = "f30a992da9fc855dce819875afb59f9dd6f860cd")
+load_bazlets(commit = "f9c119e45d9a241bee720b7fbd6c7fdbc952da5f")
load(
"@com_googlesource_gerrit_bazlets//tools:maven_jar.bzl",
@@ -178,8 +178,8 @@ maven_jar(
maven_jar(
name = "mockito",
- artifact = "org.mockito:mockito-core:5.5.0",
- sha1 = "1660ec3ce0af7f713af923817b225a37cc5cf965",
+ artifact = "org.mockito:mockito-core:5.7.0",
+ sha1 = "a1c258331ab91d66863c983aff7136357e9de056",
)
maven_jar(
diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml
index 0697784a30..b6250c6165 100644
--- a/org.eclipse.jgit.ant/pom.xml
+++ b/org.eclipse.jgit.ant/pom.xml
@@ -38,7 +38,6 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
- <version>1.10.12</version>
</dependency>
</dependencies>
@@ -70,7 +69,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml
index 9a9734f034..dbfd6eebdb 100644
--- a/org.eclipse.jgit.archive/pom.xml
+++ b/org.eclipse.jgit.archive/pom.xml
@@ -77,7 +77,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.benchmarks/.classpath b/org.eclipse.jgit.benchmarks/.classpath
index 8dcf94ed9c..01d71610e6 100644
--- a/org.eclipse.jgit.benchmarks/.classpath
+++ b/org.eclipse.jgit.benchmarks/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src">
+ <classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@@ -19,18 +19,7 @@
<classpathentry kind="src" path=".apt_generated">
<attributes>
<attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="ignore_optional_problems" value="true"/>
- <attribute name="m2e-apt" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="ignore_optional_problems" value="true"/>
- <attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
-</classpath> \ No newline at end of file
+</classpath>
diff --git a/org.eclipse.jgit.benchmarks/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.benchmarks/.settings/org.eclipse.jdt.core.prefs
index 81fed25f9b..c7a99857e0 100644
--- a/org.eclipse.jgit.benchmarks/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jgit.benchmarks/.settings/org.eclipse.jdt.core.prefs
@@ -42,7 +42,7 @@ org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
@@ -57,7 +57,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
diff --git a/org.eclipse.jgit.benchmarks/pom.xml b/org.eclipse.jgit.benchmarks/pom.xml
index b82618b74d..659046e2ab 100644
--- a/org.eclipse.jgit.benchmarks/pom.xml
+++ b/org.eclipse.jgit.benchmarks/pom.xml
@@ -13,8 +13,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.jgit</groupId>
- <version>6.8.0-SNAPSHOT</version>
+ <parent>
+ <groupId>org.eclipse.jgit</groupId>
+ <artifactId>org.eclipse.jgit-parent</artifactId>
+ <version>6.8.0-SNAPSHOT</version>
+ </parent>
+
<artifactId>org.eclipse.jgit.benchmarks</artifactId>
<packaging>jar</packaging>
@@ -143,6 +147,30 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <!-- We check javadoc when compiling with ecj (option -Pecj) and configurations
+ set in .settings/org.eclipse.jdt.core.prefs. This allows more fine grained
+ configuration and fails the build on missing javadoc for protected and
+ public but not for private classes, methods and fields. We don't want
+ to check javadoc on tests. We can reconsider to configure this on javadoc
+ when it starts supporting access specifiers so that we can set
+ -Xdoclint:all,-missing/private -->
+ <additionalJOption>-Xdoclint:none</additionalJOption>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ <quiet>true</quiet>
+ <failOnWarnings>false</failOnWarnings>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<pluginManagement>
<plugins>
diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml
index c81be61c6c..41a3d1ffe6 100644
--- a/org.eclipse.jgit.gpg.bc/pom.xml
+++ b/org.eclipse.jgit.gpg.bc/pom.xml
@@ -93,7 +93,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true" />
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}" />
+ <replacefilter token=".qualifier" value=".${commit.time.version}" />
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
index d7bf34e3ac..e9032a81fd 100644
--- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java
@@ -551,7 +551,7 @@ public class BouncyCastleGpgKeyLocator {
* Return the first suitable key for signing in the key ring collection. For
* this case we only expect there to be one key available for signing.
*
- * @param signingkey
+ * @param signingKeyName
* the signing key
* @param secringFile
* the secring file
@@ -562,7 +562,7 @@ public class BouncyCastleGpgKeyLocator {
* @throws PGPException
* on BouncyCastle errors
*/
- private PGPSecretKey findSecretKeyInLegacySecring(String signingkey,
+ private PGPSecretKey findSecretKeyInLegacySecring(String signingKeyName,
Path secringFile) throws IOException, PGPException {
try (InputStream in = newInputStream(secringFile)) {
@@ -570,7 +570,7 @@ public class BouncyCastleGpgKeyLocator {
PGPUtil.getDecoderStream(new BufferedInputStream(in)),
new JcaKeyFingerprintCalculator());
- String keyId = toFingerprint(signingkey).toLowerCase(Locale.ROOT);
+ String keyId = toFingerprint(signingKeyName).toLowerCase(Locale.ROOT);
Iterator<PGPSecretKeyRing> keyrings = pgpSec.getKeyRings();
while (keyrings.hasNext()) {
PGPSecretKeyRing keyRing = keyrings.next();
diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml
index a1c942ce42..5e67eda461 100644
--- a/org.eclipse.jgit.http.apache/pom.xml
+++ b/org.eclipse.jgit.http.apache/pom.xml
@@ -74,7 +74,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml
index b54836cf55..d35ea7f53e 100644
--- a/org.eclipse.jgit.http.server/pom.xml
+++ b/org.eclipse.jgit.http.server/pom.xml
@@ -76,7 +76,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml
index 048dc13488..46c88bb007 100644
--- a/org.eclipse.jgit.junit.http/pom.xml
+++ b/org.eclipse.jgit.junit.http/pom.xml
@@ -87,7 +87,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml
index 2409ea1bab..0b26edf742 100644
--- a/org.eclipse.jgit.junit.ssh/pom.xml
+++ b/org.eclipse.jgit.junit.ssh/pom.xml
@@ -101,7 +101,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml
index 3bce4808d1..091db6b3da 100644
--- a/org.eclipse.jgit.junit/pom.xml
+++ b/org.eclipse.jgit.junit/pom.xml
@@ -72,7 +72,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index 671abaec95..a2e0a571eb 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -20,6 +20,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.security.MessageDigest;
+import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -202,6 +203,16 @@ public class TestRepository<R extends Repository> implements AutoCloseable {
}
/**
+ * Get instant
+ *
+ * @return current instant.
+ * @since 6.8
+ */
+ public Instant getInstant() {
+ return Instant.ofEpochMilli(mockSystemReader.getCurrentTime());
+ }
+
+ /**
* Get timezone
*
* @return timezone used for default identities.
diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml
index fcb91be646..8e8aedffd9 100644
--- a/org.eclipse.jgit.lfs.server/pom.xml
+++ b/org.eclipse.jgit.lfs.server/pom.xml
@@ -91,7 +91,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index 888076634d..6cddb81bc5 100644
--- a/org.eclipse.jgit.lfs/pom.xml
+++ b/org.eclipse.jgit.lfs/pom.xml
@@ -71,7 +71,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
index 3211b6eb12..fb0baa659f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.17" sequenceNumber="1694733565">
+<target name="jgit-4.17" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
index 074ba5c444..b3ff2050b7 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
@@ -1,6 +1,6 @@
target "jgit-4.17" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2020-09/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
index ebd6421950..e2939ff99a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.18" sequenceNumber="1694733565">
+<target name="jgit-4.18" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
index 79028fe0e1..719476a829 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
@@ -1,6 +1,6 @@
target "jgit-4.18" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2020-12/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
index 168d5f8cd9..4e1916ad1c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.19-staging" sequenceNumber="1694733565">
+<target name="jgit-4.19-staging" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
index 3fb1e19268..9eb4436772 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
@@ -1,6 +1,6 @@
target "jgit-4.19-staging" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2021-03/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
index ac6135eb27..1ffa01420c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.20" sequenceNumber="1694733565">
+<target name="jgit-4.20" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
index ebc785730b..264c040313 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd
@@ -1,6 +1,6 @@
target "jgit-4.20" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2021-06/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
index 26c8ee2908..0603842cb2 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.21" sequenceNumber="1694733565">
+<target name="jgit-4.21" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
index 126438d9bd..5c7a112075 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd
@@ -1,6 +1,6 @@
target "jgit-4.21" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2021-09/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
index 438fc5633f..f3e10bccf8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.22" sequenceNumber="1694733565">
+<target name="jgit-4.22" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd
index f258eeeca3..ecc776e34c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd
@@ -1,6 +1,6 @@
target "jgit-4.22" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2021-12/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target
index bedc91ef1c..162eeff649 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.23" sequenceNumber="1694733565">
+<target name="jgit-4.23" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd
index 5bdffaeaaa..16efb408fb 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd
@@ -1,6 +1,6 @@
target "jgit-4.23" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2022-03/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target
index 412bd076c4..b0c996d0b4 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.24" sequenceNumber="1694733565">
+<target name="jgit-4.24" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd
index cd61ee0223..d0f8e8d0b5 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd
@@ -1,6 +1,6 @@
target "jgit-4.24" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2022-06/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target
index ee9c590b9f..260c50c3e8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.25" sequenceNumber="1694733565">
+<target name="jgit-4.25" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd
index c7f1591804..be37c10223 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd
@@ -1,6 +1,6 @@
target "jgit-4.25" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2022-09/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target
index 7da3627562..8abc1f1a38 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.26" sequenceNumber="1694733565">
+<target name="jgit-4.26" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd
index 6d2fea173a..e269919d49 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd
@@ -1,6 +1,6 @@
target "jgit-4.26" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2022-12/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target
index 6754402fa2..6c8b1c0416 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.27" sequenceNumber="1694733565">
+<target name="jgit-4.27" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd
index c359ccd10a..b67718a7c7 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd
@@ -1,6 +1,6 @@
target "jgit-4.27" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2023-03/" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target
index c9621ba899..bde048c0f3 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.28" sequenceNumber="1694733565">
+<target name="jgit-4.28" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd
index 814b1219c3..1a9a22a5aa 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd
@@ -1,6 +1,6 @@
target "jgit-4.28" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2023-06" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target
index 9559a1b7fb..d180721ed5 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.29" sequenceNumber="1694733565">
+<target name="jgit-4.29" sequenceNumber="1699482561">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
- <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/>
- <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/>
- <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/>
- <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
- <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
@@ -26,7 +26,7 @@
<unit id="org.objenesis.source" version="3.3.0"/>
<unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
<unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
- <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.29.0"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
+ <version>5.7.0</version>
<type>jar</type>
</dependency>
</dependencies>
@@ -187,13 +187,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
- <version>1.14.8</version>
+ <version>1.14.9</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.tpd
index 3318e4f2e5..4e34280ec2 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.tpd
@@ -1,6 +1,6 @@
target "jgit-4.29" with source configurePhase
-include "orbit/orbit-4.29.tpd"
+include "orbit/orbit-4.30.tpd"
include "maven/dependencies.tpd"
location "https://download.eclipse.org/releases/2023-09" {
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target
new file mode 100644
index 0000000000..c567787975
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
+<target name="jgit-4.30" sequenceNumber="1699482561">
+ <locations>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jsch.source" version="0.1.55.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib" version="1.1.3.v20230916-1400"/>
+ <unit id="com.jcraft.jzlib.source" version="1.1.3.v20230916-1400"/>
+ <unit id="net.i2p.crypto.eddsa" version="0.3.0"/>
+ <unit id="net.i2p.crypto.eddsa.source" version="0.3.0"/>
+ <unit id="org.apache.ant" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.ant.source" version="1.10.14.v20230922-1200"/>
+ <unit id="org.apache.httpcomponents.httpclient" version="4.5.14"/>
+ <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14"/>
+ <unit id="org.apache.httpcomponents.httpcore" version="4.4.16"/>
+ <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16"/>
+ <unit id="org.hamcrest.core" version="1.3.0.v20230809-1000"/>
+ <unit id="org.hamcrest.core.source" version="1.3.0.v20230809-1000"/>
+ <unit id="org.hamcrest.library" version="1.3.0.v20230809-1000"/>
+ <unit id="org.hamcrest.library.source" version="1.3.0.v20230809-1000"/>
+ <unit id="org.junit" version="4.13.2.v20230809-1000"/>
+ <unit id="org.junit.source" version="4.13.2.v20230809-1000"/>
+ <unit id="org.objenesis" version="3.3.0"/>
+ <unit id="org.objenesis.source" version="3.3.0"/>
+ <unit id="org.osgi.service.cm" version="1.6.1.202109301733"/>
+ <unit id="org.osgi.service.cm.source" version="1.6.1.202109301733"/>
+ <repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest"/>
+ </location>
+ <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
+ <unit id="org.eclipse.osgi" version="0.0.0"/>
+ <repository location="https://download.eclipse.org/staging/2023-12/"/>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz">
+ <dependencies>
+ <dependency>
+ <groupId>org.tukaani</groupId>
+ <artifactId>xz</artifactId>
+ <version>1.9</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j">
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.36</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.7.36</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd">
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.sshd</groupId>
+ <artifactId>sshd-osgi</artifactId>
+ <version>2.10.0</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sshd</groupId>
+ <artifactId>sshd-sftp</artifactId>
+ <version>2.10.0</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="mockito">
+ <dependencies>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>5.7.0</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna">
+ <dependencies>
+ <dependency>
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna</artifactId>
+ <version>5.13.0</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna-platform</artifactId>
+ <version>5.13.0</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty">
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-http</artifactId>
+ <version>10.0.16</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-io</artifactId>
+ <version>10.0.16</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ <version>10.0.16</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>10.0.16</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <version>10.0.16</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>10.0.16</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util-ajax</artifactId>
+ <version>10.0.16</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
+ <version>4.0.4</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah">
+ <dependencies>
+ <dependency>
+ <groupId>com.googlecode.javaewah</groupId>
+ <artifactId>JavaEWAH</artifactId>
+ <version>1.2.3</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest">
+ <dependencies>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest</artifactId>
+ <version>2.2</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson">
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.10.1</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy">
+ <dependencies>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ <version>1.14.9</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy-agent</artifactId>
+ <version>1.14.9</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle">
+ <dependencies>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg-jdk18on</artifactId>
+ <version>1.76</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk18on</artifactId>
+ <version>1.76</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk18on</artifactId>
+ <version>1.76</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcutil-jdk18on</artifactId>
+ <version>1.76</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj">
+ <dependencies>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <version>3.24.2</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j">
+ <dependencies>
+ <dependency>
+ <groupId>args4j</groupId>
+ <artifactId>args4j</artifactId>
+ <version>2.33</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache">
+ <dependencies>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.16.0</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.24.0</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.2</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </location>
+ </locations>
+</target>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.tpd
new file mode 100644
index 0000000000..dfb44741e3
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.30" with source configurePhase
+
+include "orbit/orbit-4.30.tpd"
+include "maven/dependencies.tpd"
+
+location "https://download.eclipse.org/staging/2023-12/" {
+ org.eclipse.osgi lazy
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd
index 45be4def8a..b5c3b1ae48 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd
@@ -87,12 +87,12 @@ maven bytebuddy
dependency {
groupId = "net.bytebuddy"
artifactId = "byte-buddy"
- version = "1.14.8"
+ version = "1.14.9"
}
dependency {
groupId = "net.bytebuddy"
artifactId = "byte-buddy-agent"
- version = "1.14.8"
+ version = "1.14.9"
}
}
@@ -210,7 +210,7 @@ maven mockito
dependency {
groupId = "org.mockito"
artifactId = "mockito-core"
- version = "5.5.0"
+ version = "5.7.0"
}
}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/orbit-4.30.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/orbit-4.30.tpd
new file mode 100644
index 0000000000..e68c578341
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/orbit-4.30.tpd
@@ -0,0 +1,27 @@
+target "orbit-4.30" with source configurePhase
+// see https://download.eclipse.org/tools/orbit/downloads/
+
+location "https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/milestone/latest" {
+ com.jcraft.jsch [0.1.55.v20230916-1400,0.1.55.v20230916-1400]
+ com.jcraft.jsch.source [0.1.55.v20230916-1400,0.1.55.v20230916-1400]
+ com.jcraft.jzlib [1.1.3.v20230916-1400,1.1.3.v20230916-1400]
+ com.jcraft.jzlib.source [1.1.3.v20230916-1400,1.1.3.v20230916-1400]
+ net.i2p.crypto.eddsa [0.3.0,0.3.0]
+ net.i2p.crypto.eddsa.source [0.3.0,0.3.0]
+ org.apache.ant [1.10.14.v20230922-1200,1.10.14.v20230922-1200]
+ org.apache.ant.source [1.10.14.v20230922-1200,1.10.14.v20230922-1200]
+ org.apache.httpcomponents.httpclient [4.5.14,4.5.14]
+ org.apache.httpcomponents.httpclient.source [4.5.14,4.5.14]
+ org.apache.httpcomponents.httpcore [4.4.16,4.4.16]
+ org.apache.httpcomponents.httpcore.source [4.4.16,4.4.16]
+ org.hamcrest.core [1.3.0.v20230809-1000,1.3.0.v20230809-1000]
+ org.hamcrest.core.source [1.3.0.v20230809-1000,1.3.0.v20230809-1000]
+ org.hamcrest.library [1.3.0.v20230809-1000,1.3.0.v20230809-1000]
+ org.hamcrest.library.source [1.3.0.v20230809-1000,1.3.0.v20230809-1000]
+ org.junit [4.13.2.v20230809-1000,4.13.2.v20230809-1000]
+ org.junit.source [4.13.2.v20230809-1000,4.13.2.v20230809-1000]
+ org.objenesis [3.3,3.3]
+ org.objenesis.source [3.3,3.3]
+ org.osgi.service.cm [1.6.1.202109301733,1.6.1.202109301733]
+ org.osgi.service.cm.source [1.6.1.202109301733,1.6.1.202109301733]
+}
diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml
index 696dc5e90b..715491d472 100644
--- a/org.eclipse.jgit.packaging/pom.xml
+++ b/org.eclipse.jgit.packaging/pom.xml
@@ -21,10 +21,18 @@
<name>JGit Tycho Parent</name>
+ <licenses>
+ <license>
+ <name>BSD-3-Clause</name>
+ <url>https://www.eclipse.org/org/documents/edl-v10.php</url>
+ </license>
+ </licenses>
+
<properties>
<java.version>11</java.version>
<tycho-version>4.0.2</tycho-version>
<target-platform>jgit-4.17</target-platform>
+ <project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
</properties>
<pluginRepositories>
@@ -198,6 +206,55 @@
<resolver>p2</resolver>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.cyclonedx</groupId>
+ <artifactId>cyclonedx-maven-plugin</artifactId>
+ <version>2.7.9</version>
+ <configuration>
+ <projectType>library</projectType>
+ <schemaVersion>1.4</schemaVersion>
+ <includeBomSerialNumber>false</includeBomSerialNumber>
+ <includeCompileScope>true</includeCompileScope>
+ <includeProvidedScope>true</includeProvidedScope>
+ <includeRuntimeScope>true</includeRuntimeScope>
+ <includeSystemScope>true</includeSystemScope>
+ <includeTestScope>false</includeTestScope>
+ <includeLicenseText>false</includeLicenseText>
+ <outputReactorProjects>true</outputReactorProjects>
+ <outputFormat>json</outputFormat>
+ <outputName>cyclonedx</outputName>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <verbose>false</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>makeAggregateBom</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>io.github.git-commit-id</groupId>
+ <artifactId>git-commit-id-maven-plugin</artifactId>
+ <version>6.0.0</version>
+ <executions>
+ <execution>
+ <id>get-the-git-infos</id>
+ <goals>
+ <goal>revision</goal>
+ </goals>
+ <phase>initialize</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <generateGitPropertiesFile>false</generateGitPropertiesFile>
+ <injectAllReactorProjects>true</injectAllReactorProjects>
+ <dateFormat>yyyy-MM-dd'T'HH:mm:ss'Z'</dateFormat>
+ <dateFormatTimeZone>UTC</dateFormatTimeZone>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
<plugins>
@@ -219,6 +276,30 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.3.0</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Implementation-Title>JGit ${project.artifactId}</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-Vendor>Eclipse.org - JGit</Implementation-Vendor>
+ <Implementation-Vendor-Id>org.eclipse.jgit</Implementation-Vendor-Id>
+ <Implementation-Vendor-URL>${jgit-url}</Implementation-Vendor-URL>
+ <git-describe>${git.commit.id.describe}</git-describe>
+ <git-commit-id>${git.commit.id}</git-commit-id>
+ <git-commit-time>${git.commit.time}</git-commit-time>
+ <git-tags>${git.tags}</git-tags>
+ <git-remote-origin-url>${git.remote.origin.url}</git-remote-origin-url>
+ </manifestEntries>
+ </archive>
+ <!-- TODO: uncomment this in order to skip empty artifact of test modules as soon as bug 416299 is fixed
+ <skipIfEmpty>true</skipIfEmpty>
+ -->
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
@@ -281,6 +362,22 @@
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-buildtimestamp-jgit</artifactId>
+ <version>${tycho-version}</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <timestampProvider>jgit</timestampProvider>
+ <jgit.ignore>
+ pom.xml
+ .polyglot.build.properties
+ target/
+ </jgit.ignore>
+ <format>yyyyMMddHHmm</format>
+ </configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
@@ -316,6 +413,15 @@
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-artifact-plugin</artifactId>
+ <version>3.5.0</version>
+ <configuration>
+ <ignore>**/*cyclonedx.json</ignore>
+ <reproducible>true</reproducible>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
</build>
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index de0548d5c8..776207f866 100644
--- a/org.eclipse.jgit.pgm/pom.xml
+++ b/org.eclipse.jgit.pgm/pom.xml
@@ -205,7 +205,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
index 9e82c82137..50ee809b98 100644
--- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
+++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
@@ -299,6 +299,7 @@ usage_MakeCacheTree=Show the current cache tree structure
usage_Match=Only consider tags matching the given glob(7) pattern or patterns, excluding the "refs/tags/" prefix.
usage_MergeBase=Find as good common ancestors as possible for a merge
usage_MergesTwoDevelopmentHistories=Merges two development histories
+usage_PackKeptObjects=Include objects in packs locked by a ".keep" file when repacking
usage_PreserveOldPacks=Preserve old pack files by moving them into the preserved subdirectory instead of deleting them after repacking
usage_PrunePreserved=Remove the preserved subdirectory containing previously preserved old pack files before repacking, and before preserving more old pack files
usage_ReadDirCache= Read the DirCache 100 times
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
index 2796b9115f..35ac7a162a 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
@@ -27,6 +27,10 @@ class Gc extends TextBuiltin {
@Option(name = "--prune-preserved", usage = "usage_PrunePreserved")
private Boolean prunePreserved;
+ @Option(name = "--pack-kept-objects", usage = "usage_PackKeptObjects")
+ private Boolean packKeptObjects;
+
+ /** {@inheritDoc} */
@Override
protected void run() {
Git git = Git.wrap(db);
@@ -39,6 +43,9 @@ class Gc extends TextBuiltin {
if (prunePreserved != null) {
command.setPrunePreserved(prunePreserved.booleanValue());
}
+ if (packKeptObjects != null) {
+ command.setPackKeptObjects(packKeptObjects.booleanValue());
+ }
command.call();
} catch (GitAPIException e) {
throw die(e.getMessage(), e);
diff --git a/org.eclipse.jgit.ssh.apache.agent/bin/.project b/org.eclipse.jgit.ssh.apache.agent/bin/.project
new file mode 100644
index 0000000000..73358f4a6b
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache.agent/bin/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jgit.ssh.apache.agent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jgit.ssh.apache.agent/pom.xml b/org.eclipse.jgit.ssh.apache.agent/pom.xml
index 5e47633099..ebf23743d6 100644
--- a/org.eclipse.jgit.ssh.apache.agent/pom.xml
+++ b/org.eclipse.jgit.ssh.apache.agent/pom.xml
@@ -89,7 +89,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true" />
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}" />
+ <replacefilter token=".qualifier" value=".${commit.time.version}" />
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
index e7f817bf45..4316e31a9e 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
@@ -34,7 +34,8 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.8.0";x-inter
org.eclipse.jgit.util,
org.apache.sshd.client.session,
org.apache.sshd.client.keyverifier",
- org.eclipse.jgit.transport.sshd.agent;version="6.8.0"
+ org.eclipse.jgit.transport.sshd.agent;version="6.8.0",
+ sun.security.x509
Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)",
org.apache.sshd.agent;version="[2.10.0,2.11.0)",
org.apache.sshd.client;version="[2.10.0,2.11.0)",
diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml
index f0ea60d5e4..4dafa75c62 100644
--- a/org.eclipse.jgit.ssh.apache/pom.xml
+++ b/org.eclipse.jgit.ssh.apache/pom.xml
@@ -102,7 +102,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true" />
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}" />
+ <replacefilter token=".qualifier" value=".${commit.time.version}" />
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.ssh.apache/src/sun/security/x509/README.md b/org.eclipse.jgit.ssh.apache/src/sun/security/x509/README.md
new file mode 100644
index 0000000000..a84ee37ffb
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/sun/security/x509/README.md
@@ -0,0 +1,3 @@
+This dummy package is used to fix the error
+"Missing requirement: net.i2p.crypto.eddsa 0.3.0 requires 'java.package; sun.security.x509 0.0.0'"
+raised since eddsa falsely requires this import \ No newline at end of file
diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml
index 7237099e9f..a794f627d4 100644
--- a/org.eclipse.jgit.ssh.jsch/pom.xml
+++ b/org.eclipse.jgit.ssh.jsch/pom.xml
@@ -83,7 +83,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true" />
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}" />
+ <replacefilter token=".qualifier" value=".${commit.time.version}" />
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml
index 80b8ac80dc..d760128ff4 100644
--- a/org.eclipse.jgit.test/pom.xml
+++ b/org.eclipse.jgit.test/pom.xml
@@ -73,7 +73,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>5.5.0</version>
</dependency>
<dependency>
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
index 7f820b0433..16f7cd1eb0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
@@ -2221,7 +2221,7 @@ public class RebaseCommandTest extends RepositoryTestCase {
checkoutBranch("refs/heads/master");
writeTrashFile(FILE1, "modified file1");
git.add().addFilepattern(FILE1).call();
- git.commit().setMessage("commit3").call();
+ git.commit().setMessage("commit2").call();
// checkout topic branch / modify file0
checkoutBranch("refs/heads/topic");
@@ -2240,6 +2240,57 @@ public class RebaseCommandTest extends RepositoryTestCase {
assertEquals(RepositoryState.SAFE, db.getRepositoryState());
}
+ @Test
+ public void testFastForwardRebaseWithAutoStashConflict() throws Exception {
+ // create file0, add and commit
+ db.getConfig().setBoolean(ConfigConstants.CONFIG_REBASE_SECTION, null,
+ ConfigConstants.CONFIG_KEY_AUTOSTASH, true);
+ writeTrashFile("file0", "file0");
+ git.add().addFilepattern("file0").call();
+ git.commit().setMessage("commit0").call();
+ // create file1, add and commit
+ writeTrashFile(FILE1, "file1");
+ git.add().addFilepattern(FILE1).call();
+ RevCommit commit = git.commit().setMessage("commit1").call();
+
+ // create topic branch
+ createBranch(commit, "refs/heads/topic");
+
+ // checkout master branch / modify file1, add and commit
+ checkoutBranch("refs/heads/master");
+ writeTrashFile(FILE1, "modified file1");
+ git.add().addFilepattern(FILE1).call();
+ RevCommit master = git.commit().setMessage("commit2").call();
+
+ // checkout topic branch / modify file0 and file1
+ checkoutBranch("refs/heads/topic");
+ writeTrashFile("file0", "unstaged modified file0");
+ writeTrashFile(FILE1, "unstaged modified file1");
+
+ // rebase
+ assertEquals(Status.STASH_APPLY_CONFLICTS,
+ git.rebase().setUpstream("refs/heads/master").call()
+ .getStatus());
+ checkFile(new File(db.getWorkTree(), "file0"),
+ "unstaged modified file0");
+ checkFile(new File(db.getWorkTree(), FILE1),
+ "<<<<<<< HEAD\n"
+ + "modified file1\n"
+ + "=======\n"
+ + "unstaged modified file1\n"
+ + ">>>>>>> stash\n");
+ // If there is a merge conflict, the index is not reset, and thus file0
+ // is staged here. This is the same behavior as in C git.
+ String expected = "[file0, mode:100644, content:unstaged modified file0]"
+ + "[file1, mode:100644, stage:1, content:file1]"
+ + "[file1, mode:100644, stage:2, content:modified file1]"
+ + "[file1, mode:100644, stage:3, content:unstaged modified file1]";
+ assertEquals(expected, indexState(CONTENT));
+ assertEquals(RepositoryState.SAFE, db.getRepositoryState());
+ assertEquals(master, db.resolve(Constants.HEAD));
+ assertEquals(master, db.resolve("refs/heads/topic"));
+ }
+
private List<DiffEntry> getStashedDiff() throws AmbiguousObjectException,
IncorrectObjectTypeException, IOException, MissingObjectException {
ObjectId stashId = db.resolve("stash@{0}");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java
index 5040a3b6ad..9f65ee2074 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java
@@ -14,6 +14,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
@@ -31,6 +32,7 @@ import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.NullProgressMonitor;
import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ProgressMonitor;
import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
@@ -135,6 +137,59 @@ public class CommitGraphWriterTest extends RepositoryTestCase {
NB.decodeInt32(data, 56));
}
+ @Test
+ public void testProgressMonitor() throws Exception {
+ RevCommit root = commit();
+ RevCommit a = commit(root);
+ RevCommit b = commit(root);
+ RevCommit tip = commit(a, b);
+ Set<ObjectId> wants = Collections.singleton(tip);
+
+ NonNestedTasksProgressMonitor nonNested = new NonNestedTasksProgressMonitor();
+ GraphCommits graphCommits = GraphCommits.fromWalk(nonNested, wants,
+ walk);
+ writer = new CommitGraphWriter(graphCommits, true);
+ writer.write(nonNested, os);
+ }
+
+ private static class NonNestedTasksProgressMonitor
+ implements ProgressMonitor {
+
+ boolean inTask;
+
+ @Override
+ public void start(int totalTasks) {
+ // empty
+ }
+
+ @Override
+ public void beginTask(String title, int totalWork) {
+ assertFalse("Previous monitoring task is not closed", inTask);
+ inTask = true;
+ }
+
+ @Override
+ public void update(int completed) {
+ // empty
+ }
+
+ @Override
+ public void endTask() {
+ assertTrue("Closing task that wasn't started", inTask);
+ inTask = false;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return false;
+ }
+
+ @Override
+ public void showDuration(boolean enabled) {
+ // empty
+ }
+ }
+
static HashSet<String> changedPathStrings(byte[] data) {
int oidf_offset = -1;
int bidx_offset = -1;
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java
index 571f2613e3..9a2935f136 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java
@@ -10,8 +10,13 @@
package org.eclipse.jgit.internal.storage.file;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_BUILD_BITMAPS;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACK_KEPT_OBJECTS;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_PACK_SECTION;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_REPACK_SECTION;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Iterator;
@@ -19,9 +24,14 @@ import java.util.Iterator;
import org.eclipse.jgit.internal.storage.file.PackIndex.MutableEntry;
import org.eclipse.jgit.internal.storage.pack.PackExt;
import org.eclipse.jgit.junit.TestRepository.BranchBuilder;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.storage.pack.PackConfig;
import org.junit.Test;
public class GcKeepFilesTest extends GcTestCase {
+ private static final int COMMIT_AND_TREE_OBJECTS = 2;
+
@Test
public void testKeepFiles() throws Exception {
BranchBuilder bb = tr.branch("refs/heads/master");
@@ -51,6 +61,7 @@ public class GcKeepFilesTest extends GcTestCase {
PackFile bitmapFile = singlePack.getPackFile().create(PackExt.BITMAP_INDEX);
assertTrue(keepFile.exists());
assertTrue(bitmapFile.delete());
+ gc.setPackKeptObjects(false);
gc.gc().get();
stats = gc.getStatistics();
assertEquals(0, stats.numberOfLooseObjects);
@@ -72,4 +83,149 @@ public class GcKeepFilesTest extends GcTestCase {
+ e.toObjectId(),
ind2.hasObject(e.toObjectId()));
}
+
+ @Test
+ public void testKeptObjectsAreIncludedByDefault() throws Exception {
+ testKeptObjectsAreIncluded();
+ }
+
+ @Test
+ public void testKeptObjectsAreIncludedByDefaultWhenBuildBitmapsIsTrue()
+ throws Exception {
+ PackConfig packConfig = new PackConfig();
+ Config repoConfig = repo.getObjectDatabase().getConfig();
+ repoConfig.setBoolean(CONFIG_PACK_SECTION, null,
+ CONFIG_KEY_BUILD_BITMAPS, true);
+ packConfig.fromConfig(repoConfig);
+ gc.setPackConfig(packConfig);
+
+ testKeptObjectsAreIncluded();
+ }
+
+ @Test
+ public void testKeptObjectsAreIncludedWhenPackKeptObjectsIsFalseButOverriddenViaCommandLine()
+ throws Exception {
+ PackConfig packConfig = new PackConfig();
+ packConfig.setPackKeptObjects(false);
+ gc.setPackConfig(packConfig);
+ gc.setPackKeptObjects(true);
+
+ testKeptObjectsAreIncluded();
+ }
+
+ @Test
+ public void testKeptObjectsAreNotIncludedByDefaultWhenBuildBitmapsIsFalse()
+ throws Exception {
+ PackConfig packConfig = new PackConfig();
+ packConfig.setBuildBitmaps(false);
+ gc.setPackConfig(packConfig);
+
+ testKeptObjectsAreNotIncluded();
+ }
+
+ @Test
+ public void testKeptObjectsAreIncludedWhenBuildBitmapsIsFalseButPackKeptObjectsIsTrue()
+ throws Exception {
+ PackConfig packConfig = new PackConfig();
+ Config repoConfig = repo.getObjectDatabase().getConfig();
+ repoConfig.setBoolean(CONFIG_PACK_SECTION, null,
+ CONFIG_KEY_BUILD_BITMAPS, false);
+ repoConfig.setBoolean(CONFIG_REPACK_SECTION, null,
+ CONFIG_KEY_PACK_KEPT_OBJECTS, true);
+ packConfig.fromConfig(repoConfig);
+ gc.setPackConfig(packConfig);
+
+ testKeptObjectsAreIncluded();
+ }
+
+ @Test
+ public void testKeptObjectsAreNotIncludedWhenPackKeptObjectsIsTrueButOverriddenViaCommandLine()
+ throws Exception {
+ PackConfig packConfig = new PackConfig();
+ packConfig.setPackKeptObjects(true);
+ gc.setPackConfig(packConfig);
+ gc.setPackKeptObjects(false);
+
+ testKeptObjectsAreNotIncluded();
+ }
+
+ @Test
+ public void testKeptObjectsAreNotIncludedWhenPackKeptObjectsConfigIsFalse()
+ throws Exception {
+ PackConfig packConfig = new PackConfig();
+ packConfig.setPackKeptObjects(false);
+ gc.setPackConfig(packConfig);
+
+ testKeptObjectsAreNotIncluded();
+ }
+
+ private void testKeptObjectsAreIncluded() throws Exception {
+ BranchBuilder bb = tr.branch("refs/heads/master");
+ ObjectId commitObjectInLockedPack = bb.commit().create().toObjectId();
+ gc.gc();
+ stats = gc.getStatistics();
+ assertEquals(COMMIT_AND_TREE_OBJECTS, stats.numberOfPackedObjects);
+ assertEquals(1, stats.numberOfPackFiles);
+ assertTrue(getSinglePack().getPackFile().create(PackExt.KEEP)
+ .createNewFile());
+
+ bb.commit().create();
+ gc.gc();
+ stats = gc.getStatistics();
+ assertEquals(2 * COMMIT_AND_TREE_OBJECTS + 1,
+ stats.numberOfPackedObjects);
+ assertEquals(2, stats.numberOfPackFiles);
+
+ PackIndex lockedPackIdx = null;
+ PackIndex newPackIdx = null;
+ for (Pack pack : repo.getObjectDatabase().getPacks()) {
+ if (pack.getObjectCount() == COMMIT_AND_TREE_OBJECTS) {
+ lockedPackIdx = pack.getIndex();
+ } else {
+ newPackIdx = pack.getIndex();
+ }
+ }
+ assertNotNull(lockedPackIdx);
+ assertTrue(lockedPackIdx.hasObject(commitObjectInLockedPack));
+ assertNotNull(newPackIdx);
+ assertTrue(newPackIdx.hasObject(commitObjectInLockedPack));
+ }
+
+ private void testKeptObjectsAreNotIncluded() throws Exception {
+ BranchBuilder bb = tr.branch("refs/heads/master");
+ ObjectId commitObjectInLockedPack = bb.commit().create().toObjectId();
+ gc.gc();
+ stats = gc.getStatistics();
+ assertEquals(COMMIT_AND_TREE_OBJECTS, stats.numberOfPackedObjects);
+ assertEquals(1, stats.numberOfPackFiles);
+ assertTrue(getSinglePack().getPackFile().create(PackExt.KEEP)
+ .createNewFile());
+
+ bb.commit().create();
+ gc.gc();
+ stats = gc.getStatistics();
+ assertEquals(COMMIT_AND_TREE_OBJECTS + 1, stats.numberOfPackedObjects);
+ assertEquals(2, stats.numberOfPackFiles);
+
+ PackIndex lockedPackIdx = null;
+ PackIndex newPackIdx = null;
+ for (Pack pack : repo.getObjectDatabase().getPacks()) {
+ if (pack.getObjectCount() == COMMIT_AND_TREE_OBJECTS) {
+ lockedPackIdx = pack.getIndex();
+ } else {
+ newPackIdx = pack.getIndex();
+ }
+ }
+ assertNotNull(lockedPackIdx);
+ assertTrue(lockedPackIdx.hasObject(commitObjectInLockedPack));
+ assertNotNull(newPackIdx);
+ assertFalse(newPackIdx.hasObject(commitObjectInLockedPack));
+ }
+
+ private Pack getSinglePack() {
+ Iterator<Pack> packIt = repo.getObjectDatabase().getPacks().iterator();
+ Pack singlePack = packIt.next();
+ assertFalse(packIt.hasNext());
+ return singlePack;
+ }
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
index 619e585a90..2bafde65d3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
@@ -51,6 +51,7 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevTag;
import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.StringUtils;
import org.junit.Before;
import org.junit.Test;
@@ -1349,6 +1350,18 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase {
assertEquals(Storage.LOOSE, ref.getStorage());
}
+ @Test
+ public void testCommonRefPrefix() {
+ assertEquals("", StringUtils.commonPrefix());
+ assertEquals("HEAD", StringUtils.commonPrefix("HEAD"));
+ assertEquals("", StringUtils.commonPrefix("HEAD", ""));
+ assertEquals("", StringUtils.commonPrefix("HEAD", "refs/heads/"));
+ assertEquals("refs/heads/",
+ StringUtils.commonPrefix("refs/heads/master", "refs/heads/"));
+ assertEquals("refs/heads/",
+ StringUtils.commonPrefix("refs/heads/", "refs/heads/main"));
+ }
+
void writePackedRef(String name, AnyObjectId id) throws IOException {
writePackedRefs(id.name() + " " + name + "\n");
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
index 36cf77bb01..0c0257df90 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
@@ -507,6 +507,35 @@ public class ConfigTest {
}
@Test
+ public void testRemoveBranchSection() throws ConfigInvalidException {
+ Config c = parse("" //
+ + "[branch \"keep\"]\n"
+ + " merge = master.branch.to.keep.in.the.file\n"
+ + "\n"
+ + "[branch \"remove\"]\n"
+ + " merge = this.will.get.deleted\n"
+ + " remote = origin-for-some-long-gone-place\n"
+ + "\n"
+ + "\n"
+ + "[core-section-not-to-remove-in-test]\n"
+ + " packedGitLimit = 14\n"
+ + "\n"
+ + "[other]\n"
+ + " foo = bar\n");
+ assertFalse(c.removeSection("branch", "does.not.exist"));
+ assertTrue(c.removeSection("branch", "remove"));
+ assertEquals("" //
+ + "[branch \"keep\"]\n"
+ + " merge = master.branch.to.keep.in.the.file\n"
+ + "\n"
+ + "[core-section-not-to-remove-in-test]\n"
+ + " packedGitLimit = 14\n"
+ + "\n"
+ + "[other]\n"
+ + " foo = bar\n", c.toText());
+ }
+
+ @Test
public void testUnsetBranchSection() throws ConfigInvalidException {
Config c = parse("" //
+ "[branch \"keep\"]\n"
@@ -516,8 +545,12 @@ public class ConfigTest {
+ " merge = this.will.get.deleted\n"
+ " remote = origin-for-some-long-gone-place\n"
+ "\n"
+ + "\n"
+ "[core-section-not-to-remove-in-test]\n"
- + " packedGitLimit = 14\n");
+ + " packedGitLimit = 14\n"
+ + "\n"
+ + "[other]\n"
+ + " foo = bar\n");
c.unsetSection("branch", "does.not.exist");
c.unsetSection("branch", "remove");
assertEquals("" //
@@ -525,7 +558,10 @@ public class ConfigTest {
+ " merge = master.branch.to.keep.in.the.file\n"
+ "\n"
+ "[core-section-not-to-remove-in-test]\n"
- + " packedGitLimit = 14\n", c.toText());
+ + " packedGitLimit = 14\n"
+ + "\n"
+ + "[other]\n"
+ + " foo = bar\n", c.toText());
}
@Test
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 f9687f9f82..026492f7b6 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
@@ -2215,7 +2215,8 @@ public class UploadPackTest {
uri = testProtocol.register(ctx, server);
- TestProtocol.setFetchConfig(new FetchConfig(true, MAX_HAVES, true));
+ TestProtocol.setFetchConfig(new FetchConfig(true, MAX_HAVES,
+ /* useNegotiationTip= */true));
try (Transport tn = testProtocol.open(uri,
clientRepo.getRepository(), "server")) {
@@ -2335,7 +2336,8 @@ public class UploadPackTest {
}, null);
uri = testProtocol.register(ctx, server);
- TestProtocol.setFetchConfig(new FetchConfig(true, MAX_HAVES, true));
+ TestProtocol.setFetchConfig(new FetchConfig(true, MAX_HAVES,
+ /* useNegotiationTip= */true));
try (Transport tn = testProtocol.open(uri,
clientRepo.getRepository(), "server")) {
@@ -2362,6 +2364,67 @@ public class UploadPackTest {
}
}
+ /**
+ * <pre>
+ * remote:
+ * foo &lt;- foofoo &lt;-- branchFoo
+ * bar &lt;- barbar &lt;-- branchBar
+ *
+ * client:
+ * none
+ *
+ * fetch(branchFoo) should not send have and should get only branchFoo back
+ * </pre>
+ */
+ @Test
+ public void testNegotiationTipDoesNotDoFullClone() throws Exception {
+ RevCommit fooParent = remote.commit().message("foo").create();
+ RevCommit fooChild = remote.commit().message("foofoo").parent(fooParent)
+ .create();
+ RevCommit barParent = remote.commit().message("bar").create();
+ RevCommit barChild = remote.commit().message("barbar").parent(barParent)
+ .create();
+
+ // Remote has branchFoo at fooChild and branchBar at barChild
+ remote.update("branchFoo", fooChild);
+ remote.update("branchBar", barChild);
+
+ AtomicReference<UploadPack> uploadPack = new AtomicReference<>();
+ CountHavesPreUploadHook countHavesHook = new CountHavesPreUploadHook();
+
+ // Client does not have branchFoo & branchBar
+ try (TestRepository<InMemoryRepository> clientRepo = new TestRepository<>(
+ client)) {
+ testProtocol = new TestProtocol<>((Object req, Repository db) -> {
+ UploadPack up = new UploadPack(db);
+ up.setPreUploadHook(countHavesHook);
+ uploadPack.set(up);
+ return up;
+ }, null);
+
+ uri = testProtocol.register(ctx, server);
+
+ TestProtocol.setFetchConfig(new FetchConfig(true, MAX_HAVES,
+ /* useNegotiationTip= */true));
+ try (Transport tn = testProtocol.open(uri,
+ clientRepo.getRepository(), "server")) {
+
+ tn.fetch(NullProgressMonitor.INSTANCE,
+ Collections.singletonList(
+ new RefSpec("refs/heads/branchFoo")),
+ "branchFoo");
+ }
+ }
+
+ assertTrue(client.getObjectDatabase().has(fooParent.toObjectId()));
+ assertTrue(client.getObjectDatabase().has(fooChild.toObjectId()));
+ assertFalse(client.getObjectDatabase().has(barParent.toObjectId()));
+ assertFalse(client.getObjectDatabase().has(barChild.toObjectId()));
+
+ assertEquals(0, uploadPack.get().getStatistics().getHaves());
+ assertTrue(countHavesHook.havesSentDuringNegotiation.isEmpty());
+ }
+
private static class CountHavesPreUploadHook implements PreUploadHook {
Set<ObjectId> havesSentDuringNegotiation = new HashSet<>();
@@ -2937,7 +3000,70 @@ public class UploadPackTest {
assertThat(pckIn.readString(), is("packfile"));
parsePack(recvStream);
assertTrue(client.getObjectDatabase().has(one.toObjectId()));
- assertEquals(1, ((RefCallsCountingRepository)server).numRefCalls());
+ assertEquals(0, ((RefCallsCountingRepository)server).numRefCalls());
+ }
+
+ /*
+ * Invokes UploadPack with specified protocol version and sends it the given
+ * lines, and returns UploadPack statistics (use uploadPackSetup to get the
+ * output stream)
+ */
+ private PackStatistics uploadPackV2SetupStats(String... inputLines)
+ throws Exception {
+
+ ByteArrayInputStream send = linesAsInputStream(inputLines);
+ String version = TransferConfig.ProtocolVersion.V2.version();
+ server.getConfig().setString(ConfigConstants.CONFIG_PROTOCOL_SECTION,
+ null, ConfigConstants.CONFIG_KEY_VERSION, version);
+ try (UploadPack up = new UploadPack(server)) {
+ up.setExtraParameters(Sets.of("version=".concat(version)));
+
+ ByteArrayOutputStream recv = new ByteArrayOutputStream();
+ up.upload(send, recv, null);
+ return up.getStatistics();
+ }
+ }
+
+ @Test
+ public void testUseWantedRefsAsAdvertisedSetV2_onlyWantedRefs()
+ throws Exception {
+ server = new RefCallsCountingRepository(
+ new DfsRepositoryDescription("server"));
+ remote = new TestRepository<>(server);
+ RevCommit one = remote.commit().message("1").create();
+ RevCommit two = remote.commit().message("2").create();
+ RevCommit three = remote.commit().message("3").create();
+ remote.update("one", one);
+ remote.update("two", two);
+ remote.update("three", three);
+ server.getConfig().setBoolean("uploadpack", null, "allowrefinwant",
+ true);
+ PackStatistics packStats = uploadPackV2SetupStats("command=fetch\n",
+ PacketLineIn.delimiter(), "want-ref refs/heads/one\n",
+ "want-ref refs/heads/two\n", "done\n", PacketLineIn.end());
+ assertEquals("only wanted-refs", 2, packStats.getAdvertised());
+ assertEquals(0, ((RefCallsCountingRepository) server).numRefCalls());
+ }
+
+ @Test
+ public void testUseWantedRefsAsAdvertisedSetV2_withWantId()
+ throws Exception {
+ server = new RefCallsCountingRepository(
+ new DfsRepositoryDescription("server"));
+ remote = new TestRepository<>(server);
+ RevCommit one = remote.commit().message("1").create();
+ RevCommit two = remote.commit().message("2").create();
+ RevCommit three = remote.commit().message("3").create();
+ remote.update("one", one);
+ remote.update("two", two);
+ remote.update("three", three);
+ server.getConfig().setBoolean("uploadpack", null, "allowrefinwant",
+ true);
+ PackStatistics packStats = uploadPackV2SetupStats("command=fetch\n",
+ PacketLineIn.delimiter(), "want-ref refs/heads/one\n",
+ "want " + one.getName() + "\n", "done\n", PacketLineIn.end());
+ assertEquals("all refs", 3, packStats.getAdvertised());
+ assertEquals(1, ((RefCallsCountingRepository) server).numRefCalls());
}
@Test
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java
index aa7247e105..015da164c3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java
@@ -153,4 +153,23 @@ public class StringUtilsTest {
() -> StringUtils.parseLongWithSuffix("8000000000000000000G",
false));
}
+
+ @Test
+ public void testCommonPrefix() {
+ assertEquals("", StringUtils.commonPrefix((String[]) null));
+ assertEquals("", StringUtils.commonPrefix(new String[] {}));
+ assertEquals("", StringUtils.commonPrefix(new String[] { null }));
+ assertEquals("", StringUtils.commonPrefix(null, null));
+ assertEquals("", StringUtils.commonPrefix("", ""));
+ assertEquals("", StringUtils.commonPrefix(null, ""));
+ assertEquals("", StringUtils.commonPrefix("abcd", null, null));
+ assertEquals("", StringUtils.commonPrefix(null, null, "abcd"));
+ assertEquals("", StringUtils.commonPrefix("", "abcd"));
+ assertEquals("", StringUtils.commonPrefix("abcd", "efgh"));
+ assertEquals("abcd", StringUtils.commonPrefix("abcd"));
+ assertEquals("ab", StringUtils.commonPrefix("abcd", "ab"));
+ assertEquals("abcd", StringUtils.commonPrefix("abcd", "abcdefgh"));
+ assertEquals("foo bar ",
+ StringUtils.commonPrefix("foo bar 42", "foo bar 24"));
+ }
}
diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml
index 5dd17c6e65..ca19f2bec9 100644
--- a/org.eclipse.jgit.ui/pom.xml
+++ b/org.eclipse.jgit.ui/pom.xml
@@ -70,7 +70,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
new file mode 100644
index 0000000000..6e04eb8ec8
--- /dev/null
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.jgit" version="2">
+ <resource path="src/org/eclipse/jgit/api/GarbageCollectCommand.java" type="org.eclipse.jgit.api.GarbageCollectCommand">
+ <filter id="1142947843">
+ <message_arguments>
+ <message_argument value="5.13.3"/>
+ <message_argument value="setPackKeptObjects(boolean)"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/jgit/lib/ConfigConstants.java" type="org.eclipse.jgit.lib.ConfigConstants">
+ <filter id="1142947843">
+ <message_arguments>
+ <message_argument value="5.13.3"/>
+ <message_argument value="CONFIG_KEY_PACK_KEPT_OBJECTS"/>
+ </message_arguments>
+ </filter>
+ <filter id="1142947843">
+ <message_arguments>
+ <message_argument value="5.13.3"/>
+ <message_argument value="CONFIG_REPACK_SECTION"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/jgit/storage/pack/PackConfig.java" type="org.eclipse.jgit.storage.pack.PackConfig">
+ <filter id="336658481">
+ <message_arguments>
+ <message_argument value="org.eclipse.jgit.storage.pack.PackConfig"/>
+ <message_argument value="DEFAULT_PACK_KEPT_OBJECTS"/>
+ </message_arguments>
+ </filter>
+ <filter id="1142947843">
+ <message_arguments>
+ <message_argument value="5.13.3"/>
+ <message_argument value="DEFAULT_PACK_KEPT_OBJECTS"/>
+ </message_arguments>
+ </filter>
+ <filter id="1142947843">
+ <message_arguments>
+ <message_argument value="5.13.3"/>
+ <message_argument value="isPackKeptObjects()"/>
+ </message_arguments>
+ </filter>
+ <filter id="1142947843">
+ <message_arguments>
+ <message_argument value="5.13.3"/>
+ <message_argument value="setPackKeptObjects(boolean)"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml
index 28ba126414..32638d70fd 100644
--- a/org.eclipse.jgit/pom.xml
+++ b/org.eclipse.jgit/pom.xml
@@ -83,7 +83,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
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 6def50b17a..c8a3abf1c4 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -166,6 +166,7 @@ commitAmendOnInitialNotPossible=Amending is not possible on initial commit.
commitsHaveAlreadyBeenMarkedAsStart=Commits have already been marked as walk starts.
compressingObjects=Compressing objects
computingCommitGeneration=Computing commit-graph generation numbers
+computingPathBloomFilters=Computing commit-graph path bloom filters
configSubsectionContainsNewline=config subsection name contains newline
configSubsectionContainsNullByte=config subsection name contains byte 0x00
configValueContainsNullByte=config value contains byte 0x00
@@ -259,6 +260,7 @@ deleteFileFailed=Could not delete file {0}
deletedOrphanInPackDir=Deleted orphaned file {}
deleteRequiresZeroNewId=Delete requires new ID to be zero
deleteTagUnexpectedResult=Delete tag returned unexpected result {0}
+deletingBranches=Deleting branches...
deletingNotSupported=Deleting {0} not supported.
depthMustBeAt1=Depth must be >= 1
depthWithUnshallow=Depth and unshallow can\'t be used together
@@ -834,6 +836,7 @@ unmergedPath=Unmerged path: {0}
unmergedPaths=Repository contains unmerged paths
unpackException=Exception while parsing pack stream
unreadableCommitGraph=Unreadable commit-graph: {0}
+unreadableObjectSizeIndex=Unreadable object size index. First {0} bytes are ''{1}''
unreadablePackIndex=Unreadable pack index: {0}
unrecognizedPackExtension=Unrecognized pack extension: {0}
unrecognizedRef=Unrecognized ref: {0}
@@ -846,6 +849,7 @@ unsupportedEncryptionAlgorithm=Unsupported encryption algorithm: {0}
unsupportedEncryptionVersion=Unsupported encryption version: {0}
unsupportedGC=Unsupported garbage collector for repository type: {0}
unsupportedMark=Mark not supported
+unsupportedObjectSizeIndexVersion=Unsupported object size index version {0}
unsupportedOperationNotAddAtEnd=Not add-at-end: {0}
unsupportedPackIndexVersion=Unsupported pack index version {0}
unsupportedPackReverseIndexVersion=Unsupported pack reverse index version {0}
@@ -854,6 +858,7 @@ unsupportedReftableVersion=Unsupported reftable version {0}.
unsupportedRepositoryDescription=Repository description not supported
unsupportedSizesObjSizeIndex=Unsupported sizes in object-size-index
updateRequiresOldIdAndNewId=Update requires both old ID and new ID to be nonzero
+updatingConfig=Updating git config
updatingHeadFailed=Updating HEAD failed
updatingReferences=Updating references
updatingRefFailed=Updating the ref {0} to {1} failed. ReturnCode from RefUpdate.update() was {2}
@@ -882,7 +887,7 @@ writerAlreadyInitialized=Writer already initialized
writeTimedOut=Write timed out after {0} ms
writingNotPermitted=Writing not permitted
writingNotSupported=Writing {0} not supported.
-writingOutCommitGraph=Writing out commit-graph in {0} passes
+writingOutCommitGraph=Writing out commit-graph
writingObjects=Writing objects
wrongDecompressedLength=wrong decompressed length
wrongRepositoryState=Wrong Repository State: {0}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
index f1b5d62349..a5c535f772 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010, Mathias Kinzler <mathias.kinzler@sap.com>
- * Copyright (C) 2010, Chris Aniszczyk <caniszczyk@gmail.com> and others
+ * Copyright (C) 2010, 2023 Chris Aniszczyk <caniszczyk@gmail.com> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -14,6 +14,7 @@ import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -25,6 +26,8 @@ import org.eclipse.jgit.api.errors.NotMergedException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.NullProgressMonitor;
+import org.eclipse.jgit.lib.ProgressMonitor;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RefUpdate.Result;
@@ -47,8 +50,11 @@ import org.eclipse.jgit.revwalk.RevWalk;
* >Git documentation about Branch</a>
*/
public class DeleteBranchCommand extends GitCommand<List<String>> {
+
private final Set<String> branchNames = new HashSet<>();
+ private ProgressMonitor monitor = NullProgressMonitor.INSTANCE;
+
private boolean force;
/**
@@ -66,8 +72,29 @@ public class DeleteBranchCommand extends GitCommand<List<String>> {
NotMergedException, CannotDeleteCurrentBranchException {
checkCallable();
List<String> result = new ArrayList<>();
- if (branchNames.isEmpty())
+ Set<String> shortNames = new HashSet<>();
+ if (branchNames.isEmpty()) {
return result;
+ }
+ Exception error = null;
+ try {
+ deleteBranches(result, shortNames);
+ } catch (Exception e) {
+ error = e;
+ }
+ monitor.beginTask(JGitText.get().updatingConfig, 1);
+ try {
+ updateConfig(shortNames, error);
+ } finally {
+ monitor.update(1);
+ monitor.endTask();
+ }
+ return result;
+ }
+
+ private void deleteBranches(List<String> result,
+ Set<String> shortNames) throws GitAPIException, NotMergedException,
+ CannotDeleteCurrentBranchException {
try {
String currentBranch = repo.getFullBranch();
if (!force) {
@@ -77,12 +104,13 @@ public class DeleteBranchCommand extends GitCommand<List<String>> {
RevCommit tip = walk
.parseCommit(repo.resolve(Constants.HEAD));
for (String branchName : branchNames) {
- if (branchName == null)
+ if (branchName == null) {
continue;
+ }
Ref currentRef = repo.findRef(branchName);
- if (currentRef == null)
+ if (currentRef == null) {
continue;
-
+ }
RevCommit base = walk
.parseCommit(repo.resolve(branchName));
if (!walk.isMergedInto(base, tip)) {
@@ -92,58 +120,105 @@ public class DeleteBranchCommand extends GitCommand<List<String>> {
}
}
setCallable(false);
- for (String branchName : branchNames) {
- if (branchName == null)
- continue;
- Ref currentRef = repo.findRef(branchName);
- if (currentRef == null)
- continue;
- String fullName = currentRef.getName();
- if (fullName.equals(currentBranch))
- throw new CannotDeleteCurrentBranchException(
- MessageFormat
- .format(
- JGitText.get().cannotDeleteCheckedOutBranch,
- branchName));
- RefUpdate update = repo.updateRef(fullName);
- update.setRefLogMessage("branch deleted", false); //$NON-NLS-1$
- update.setForceUpdate(true);
- Result deleteResult = update.delete();
-
- boolean ok = true;
- switch (deleteResult) {
- case IO_FAILURE:
- case LOCK_FAILURE:
- case REJECTED:
- ok = false;
- break;
- default:
- break;
- }
+ monitor.start(2);
+ monitor.beginTask(JGitText.get().deletingBranches,
+ branchNames.size());
+ try {
+ for (String branchName : branchNames) {
+ if (branchName == null) {
+ monitor.update(1);
+ continue;
+ }
+ Ref currentRef = repo.findRef(branchName);
+ if (currentRef == null) {
+ monitor.update(1);
+ continue;
+ }
+ String fullName = currentRef.getName();
+ if (fullName.equals(currentBranch)) {
+ throw new CannotDeleteCurrentBranchException(
+ MessageFormat.format(JGitText
+ .get().cannotDeleteCheckedOutBranch,
+ branchName));
+ }
+ RefUpdate update = repo.updateRef(fullName);
+ update.setRefLogMessage("branch deleted", false); //$NON-NLS-1$
+ update.setForceUpdate(true);
+ Result deleteResult = update.delete();
- if (ok) {
- result.add(fullName);
- if (fullName.startsWith(Constants.R_HEADS)) {
- String shortenedName = fullName
- .substring(Constants.R_HEADS.length());
- // remove upstream configuration if any
- final StoredConfig cfg = repo.getConfig();
- cfg.unsetSection(
- ConfigConstants.CONFIG_BRANCH_SECTION,
- shortenedName);
- cfg.save();
+ switch (deleteResult) {
+ case IO_FAILURE:
+ case LOCK_FAILURE:
+ case REJECTED:
+ throw new JGitInternalException(MessageFormat.format(
+ JGitText.get().deleteBranchUnexpectedResult,
+ deleteResult.name()));
+ default:
+ result.add(fullName);
+ if (fullName.startsWith(Constants.R_HEADS)) {
+ shortNames.add(fullName
+ .substring(Constants.R_HEADS.length()));
+ }
+ break;
+ }
+ monitor.update(1);
+ if (monitor.isCancelled()) {
+ break;
}
- } else
- throw new JGitInternalException(MessageFormat.format(
- JGitText.get().deleteBranchUnexpectedResult,
- deleteResult.name()));
+ }
+ } finally {
+ monitor.endTask();
}
- return result;
} catch (IOException ioe) {
throw new JGitInternalException(ioe.getMessage(), ioe);
}
}
+ private void updateConfig(Set<String> shortNames, Exception error)
+ throws GitAPIException {
+ IOException configError = null;
+ if (!shortNames.isEmpty()) {
+ try {
+ // Remove upstream configurations if any
+ StoredConfig cfg = repo.getConfig();
+ boolean changed = false;
+ for (String branchName : shortNames) {
+ changed |= cfg.removeSection(
+ ConfigConstants.CONFIG_BRANCH_SECTION,
+ branchName);
+ }
+ if (changed) {
+ cfg.save();
+ }
+ } catch (IOException e) {
+ configError = e;
+ }
+ }
+ if (error == null) {
+ if (configError != null) {
+ throw new JGitInternalException(configError.getMessage(),
+ configError);
+ }
+ } else if (error instanceof GitAPIException) {
+ if (configError != null) {
+ error.addSuppressed(configError);
+ }
+ throw (GitAPIException) error;
+ } else if (error instanceof RuntimeException) {
+ if (configError != null) {
+ error.addSuppressed(configError);
+ }
+ throw (RuntimeException) error;
+ } else {
+ JGitInternalException internal = new JGitInternalException(
+ error.getMessage(), error);
+ if (configError != null) {
+ internal.addSuppressed(configError);
+ }
+ throw internal;
+ }
+ }
+
/**
* Set the names of the branches to delete
*
@@ -160,6 +235,22 @@ public class DeleteBranchCommand extends GitCommand<List<String>> {
}
/**
+ * Sets the names of the branches to delete
+ *
+ * @param branchNames
+ * the names of the branches to delete; if not set, this will do
+ * nothing; invalid branch names will simply be ignored
+ * @return {@code this}
+ * @since 6.8
+ */
+ public DeleteBranchCommand setBranchNames(Collection<String> branchNames) {
+ checkCallable();
+ this.branchNames.clear();
+ this.branchNames.addAll(branchNames);
+ return this;
+ }
+
+ /**
* Set whether to forcefully delete branches
*
* @param force
@@ -175,4 +266,34 @@ public class DeleteBranchCommand extends GitCommand<List<String>> {
this.force = force;
return this;
}
+
+ /**
+ * Retrieves the progress monitor.
+ *
+ * @return the {@link ProgressMonitor} for the delete operation
+ * @since 6.8
+ */
+ public ProgressMonitor getProgressMonitor() {
+ return monitor;
+ }
+
+ /**
+ * Sets the progress monitor associated with the delete operation. By
+ * default, this is set to <code>NullProgressMonitor</code>
+ *
+ * @see NullProgressMonitor
+ * @param monitor
+ * a {@link ProgressMonitor}
+ * @return {@code this}
+ * @since 6.8
+ */
+ public DeleteBranchCommand setProgressMonitor(ProgressMonitor monitor) {
+ checkCallable();
+ if (monitor == null) {
+ monitor = NullProgressMonitor.INSTANCE;
+ }
+ this.monitor = monitor;
+ return this;
+ }
+
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java
index 1196359c0f..88d7e91860 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java
@@ -63,6 +63,8 @@ public class GarbageCollectCommand extends GitCommand<Properties> {
private PackConfig pconfig;
+ private Boolean packKeptObjects;
+
/**
* Constructor for GarbageCollectCommand.
*
@@ -132,6 +134,19 @@ public class GarbageCollectCommand extends GitCommand<Properties> {
}
/**
+ * Whether to include objects in `.keep` packs when repacking.
+ *
+ * @param packKeptObjects
+ * whether to include objects in `.keep` files when repacking.
+ * @return this instance
+ * @since 5.13.3
+ */
+ public GarbageCollectCommand setPackKeptObjects(boolean packKeptObjects) {
+ this.packKeptObjects = Boolean.valueOf(packKeptObjects);
+ return this;
+ }
+
+ /**
* Whether to preserve old pack files instead of deleting them.
*
* @since 4.7
@@ -174,7 +189,9 @@ public class GarbageCollectCommand extends GitCommand<Properties> {
gc.setProgressMonitor(monitor);
if (this.expire != null)
gc.setExpire(expire);
-
+ if (this.packKeptObjects != null) {
+ gc.setPackKeptObjects(packKeptObjects.booleanValue());
+ }
try {
gc.gc().get();
return toProperties(gc.getStatistics());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index 859bf93841..0f7b8afe21 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -289,13 +289,17 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
}
}
RebaseResult res = initFilesAndRewind();
- if (stopAfterInitialization)
+ if (stopAfterInitialization) {
return RebaseResult.INTERACTIVE_PREPARED_RESULT;
+ }
if (res != null) {
- autoStashApply();
- if (rebaseState.getDir().exists())
+ if (!autoStashApply()) {
+ res = RebaseResult.STASH_APPLY_CONFLICTS_RESULT;
+ }
+ if (rebaseState.getDir().exists()) {
FileUtils.delete(rebaseState.getDir(),
FileUtils.RECURSIVE);
+ }
return res;
}
}
@@ -381,7 +385,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
}
private boolean autoStashApply() throws IOException, GitAPIException {
- boolean conflicts = false;
+ boolean success = true;
if (rebaseState.getFile(AUTOSTASH).exists()) {
String stash = rebaseState.readFile(AUTOSTASH);
try (Git git = Git.wrap(repo)) {
@@ -389,7 +393,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
.ignoreRepositoryState(true).setStrategy(strategy)
.call();
} catch (StashApplyFailureException e) {
- conflicts = true;
+ success = false;
try (RevWalk rw = new RevWalk(repo)) {
ObjectId stashId = repo.resolve(stash);
RevCommit commit = rw.parseCommit(stashId);
@@ -398,7 +402,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
}
}
}
- return conflicts;
+ return success;
}
private void updateStashRef(ObjectId commitId, PersonIdent refLogIdent,
@@ -723,13 +727,15 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
boolean lastStepIsForward) throws IOException, GitAPIException {
String headName = rebaseState.readFile(HEAD_NAME);
updateHead(headName, finalHead, upstreamCommit);
- boolean stashConflicts = autoStashApply();
+ boolean unstashSuccessful = autoStashApply();
getRepository().autoGC(monitor);
FileUtils.delete(rebaseState.getDir(), FileUtils.RECURSIVE);
- if (stashConflicts)
+ if (!unstashSuccessful) {
return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;
- if (lastStepIsForward || finalHead == null)
+ }
+ if (lastStepIsForward || finalHead == null) {
return RebaseResult.FAST_FORWARD_RESULT;
+ }
return RebaseResult.OK_RESULT;
}
@@ -1149,7 +1155,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
if (!isInteractive() && walk.isMergedInto(upstream, headCommit))
return RebaseResult.UP_TO_DATE_RESULT;
else if (!isInteractive() && walk.isMergedInto(headCommit, upstream)) {
- // head is already merged into upstream, fast-foward
+ // head is already merged into upstream, fast-forward
monitor.beginTask(MessageFormat.format(
JGitText.get().resettingHead,
upstreamCommit.getShortMessage()), ProgressMonitor.UNKNOWN);
@@ -1447,13 +1453,14 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
throw new JGitInternalException(
JGitText.get().abortingRebaseFailed);
}
- boolean stashConflicts = autoStashApply();
+ boolean unstashSuccessful = autoStashApply();
// cleanup the files
FileUtils.delete(rebaseState.getDir(), FileUtils.RECURSIVE);
repo.writeCherryPickHead(null);
repo.writeMergeHeads(null);
- if (stashConflicts)
+ if (!unstashSuccessful) {
return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;
+ }
return result;
} finally {
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 6c2c850d7a..15e7f0e565 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -196,6 +196,7 @@ public class JGitText extends TranslationBundle {
/***/ public String commitsHaveAlreadyBeenMarkedAsStart;
/***/ public String compressingObjects;
/***/ public String computingCommitGeneration;
+ /***/ public String computingPathBloomFilters;
/***/ public String configSubsectionContainsNewline;
/***/ public String configSubsectionContainsNullByte;
/***/ public String configValueContainsNullByte;
@@ -289,6 +290,7 @@ public class JGitText extends TranslationBundle {
/***/ public String deletedOrphanInPackDir;
/***/ public String deleteRequiresZeroNewId;
/***/ public String deleteTagUnexpectedResult;
+ /***/ public String deletingBranches;
/***/ public String deletingNotSupported;
/***/ public String depthMustBeAt1;
/***/ public String depthWithUnshallow;
@@ -863,6 +865,7 @@ public class JGitText extends TranslationBundle {
/***/ public String unmergedPaths;
/***/ public String unpackException;
/***/ public String unreadableCommitGraph;
+ /***/ public String unreadableObjectSizeIndex;
/***/ public String unreadablePackIndex;
/***/ public String unrecognizedPackExtension;
/***/ public String unrecognizedRef;
@@ -876,6 +879,7 @@ public class JGitText extends TranslationBundle {
/***/ public String unsupportedGC;
/***/ public String unsupportedMark;
/***/ public String unsupportedObjectIdVersion;
+ /***/ public String unsupportedObjectSizeIndexVersion;
/***/ public String unsupportedOperationNotAddAtEnd;
/***/ public String unsupportedPackIndexVersion;
/***/ public String unsupportedPackReverseIndexVersion;
@@ -884,6 +888,7 @@ public class JGitText extends TranslationBundle {
/***/ public String unsupportedRepositoryDescription;
/***/ public String unsupportedSizesObjSizeIndex;
/***/ public String updateRequiresOldIdAndNewId;
+ /***/ public String updatingConfig;
/***/ public String updatingHeadFailed;
/***/ public String updatingReferences;
/***/ public String updatingRefFailed;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java
index f72c1eaa8c..b697edb60e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java
@@ -31,7 +31,6 @@ import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
@@ -123,7 +122,7 @@ public class CommitGraphWriter {
}
BloomFilterChunks bloomFilterChunks = generateChangedPathFilters
- ? computeBloomFilterChunks()
+ ? computeBloomFilterChunks(monitor)
: null;
List<ChunkHeader> chunks = new ArrayList<>();
chunks.addAll(createCoreChunks(hashsz, graphCommits));
@@ -131,18 +130,11 @@ public class CommitGraphWriter {
chunks = Collections.unmodifiableList(chunks);
long expectedSize = calculateExpectedSize(chunks);
- long writeCount = 256L + 2 * graphCommits.size()
- + graphCommits.getExtraEdgeCnt();
- monitor.beginTask(
- MessageFormat.format(JGitText.get().writingOutCommitGraph,
- Integer.valueOf(chunks.size())),
- (int) writeCount);
-
try (CancellableDigestOutputStream out = new CancellableDigestOutputStream(
monitor, commitGraphStream)) {
writeHeader(out, chunks.size());
writeChunkLookup(out, chunks);
- writeChunks(monitor, out, chunks);
+ writeChunks(out, chunks);
writeCheckSum(out);
if (expectedSize != out.length()) {
throw new IllegalStateException(String.format(
@@ -153,8 +145,6 @@ public class CommitGraphWriter {
} catch (InterruptedIOException e) {
throw new IOException(JGitText.get().commitGraphWritingCancelled,
e);
- } finally {
- monitor.endTask();
}
return Stats.from(bloomFilterChunks);
}
@@ -219,9 +209,8 @@ public class CommitGraphWriter {
out.write(buffer);
}
- private void writeChunks(ProgressMonitor monitor,
- CancellableDigestOutputStream out, List<ChunkHeader> chunks)
- throws IOException {
+ private void writeChunks(CancellableDigestOutputStream out,
+ List<ChunkHeader> chunks) throws IOException {
for (ChunkHeader chunk : chunks) {
int chunkId = chunk.id;
@@ -233,7 +222,7 @@ public class CommitGraphWriter {
writeOidLookUp(out);
break;
case CHUNK_ID_COMMIT_DATA:
- writeCommitData(monitor, out);
+ writeCommitData(out);
break;
case CHUNK_ID_EXTRA_EDGE_LIST:
writeExtraEdges(out);
@@ -287,9 +276,12 @@ public class CommitGraphWriter {
}
}
- private void writeCommitData(ProgressMonitor monitor,
- CancellableDigestOutputStream out) throws IOException {
+ private void writeCommitData(CancellableDigestOutputStream out)
+ throws IOException {
+ ProgressMonitor monitor = out.getWriteMonitor();
int[] generations = computeGenerationNumbers(monitor);
+ monitor.beginTask(JGitText.get().writingOutCommitGraph,
+ graphCommits.size());
int num = 0;
byte[] tmp = new byte[hashsz + COMMIT_DATA_WIDTH];
int i = 0;
@@ -327,9 +319,10 @@ public class CommitGraphWriter {
NB.encodeInt32(tmp, hashsz + 12, packedDate[1]);
out.write(tmp);
- out.getWriteMonitor().update(1);
+ monitor.update(1);
i++;
}
+ monitor.endTask();
}
private int[] computeGenerationNumbers(ProgressMonitor monitor)
@@ -414,7 +407,7 @@ public class CommitGraphWriter {
return Optional.of(paths);
}
- private BloomFilterChunks computeBloomFilterChunks()
+ private BloomFilterChunks computeBloomFilterChunks(ProgressMonitor monitor)
throws MissingObjectException, IncorrectObjectTypeException,
CorruptObjectException, IOException {
@@ -436,6 +429,8 @@ public class CommitGraphWriter {
int dataHeaderSize = data.size();
try (RevWalk rw = new RevWalk(graphCommits.getObjectReader())) {
+ monitor.beginTask(JGitText.get().computingPathBloomFilters,
+ graphCommits.size());
for (RevCommit cmit : graphCommits) {
ChangedPathFilter cpf = cmit.getChangedPathFilter(rw);
if (cpf != null) {
@@ -453,7 +448,9 @@ public class CommitGraphWriter {
cpf.writeTo(data);
NB.encodeInt32(scratch, 0, data.size() - dataHeaderSize);
index.write(scratch);
+ monitor.update(1);
}
+ monitor.endTask();
return new BloomFilterChunks(index, data, filtersReused, filtersComputed);
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
index 8a2f4d3541..e0f0e13553 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
@@ -310,7 +310,8 @@ public final class DfsPackFile extends BlockBasedFile {
return objectSizeIndex;
}
- if (objectSizeIndexLoadAttempted) {
+ if (objectSizeIndexLoadAttempted
+ || !desc.hasFileExt(OBJECT_SIZE_INDEX)) {
// Pack doesn't have object size index
return null;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java
index 146f76167d..f2ac461deb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java
@@ -14,7 +14,7 @@ import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_CORE_SECTION;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_DFS_SECTION;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_DELTA_BASE_CACHE_LIMIT;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_STREAM_BUFFER;
-import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_STREAM_FILE_TRESHOLD;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_STREAM_FILE_THRESHOLD;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.storage.pack.PackConfig;
@@ -157,7 +157,7 @@ public class DfsReaderOptions {
long sft = rc.getLong(
CONFIG_CORE_SECTION,
CONFIG_DFS_SECTION,
- CONFIG_KEY_STREAM_FILE_TRESHOLD,
+ CONFIG_KEY_STREAM_FILE_THRESHOLD,
getStreamFileThreshold());
sft = Math.min(sft, maxMem / 4); // don't use more than 1/4 of the heap
sft = Math.min(sft, Integer.MAX_VALUE); // cannot exceed array length
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
index 55c05ef78d..8d8c6a0455 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
@@ -86,6 +86,11 @@ public class BitmapIndexImpl implements BitmapIndex {
return position;
}
+ /**
+ * A bitset for representing small changes (set/remove individual bits)
+ * relative to an existing EWAH bitmap. Executing bit-vector operations will
+ * materialize the changes into a fresh EWAH bitmap
+ */
private static final class ComboBitset {
private InflatingBitSet inflatingBitmap;
@@ -121,18 +126,21 @@ public class BitmapIndexImpl implements BitmapIndex {
return inflatingBitmap.getBitmap();
}
+ /* In-place or operation */
void or(EWAHCompressedBitmap inbits) {
if (toRemove != null)
combine();
inflatingBitmap = inflatingBitmap.or(inbits);
}
+ /* In-place andNot operation */
void andNot(EWAHCompressedBitmap inbits) {
if (toAdd != null || toRemove != null)
combine();
inflatingBitmap = inflatingBitmap.andNot(inbits);
}
+ /* In-place xor operation. */
void xor(EWAHCompressedBitmap inbits) {
if (toAdd != null || toRemove != null)
combine();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 32d85f3326..5409c4fca7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -165,6 +165,8 @@ public class GC {
private Date packExpire;
+ private Boolean packKeptObjects;
+
private PackConfig pconfig;
/**
@@ -867,8 +869,9 @@ public class GC {
List<ObjectIdSet> excluded = new LinkedList<>();
for (Pack p : repo.getObjectDatabase().getPacks()) {
checkCancelled();
- if (p.shouldBeKept())
+ if (!shouldPackKeptObjects() && p.shouldBeKept()) {
excluded.add(p.getIndex());
+ }
}
// Don't exclude tags that are also branch tips
@@ -1475,6 +1478,21 @@ public class GC {
}
/**
+ * Define whether to include objects in `.keep` files when repacking.
+ *
+ * @param packKeptObjects Whether to include objects in `.keep` files when repacking.
+ */
+ public void setPackKeptObjects(boolean packKeptObjects) {
+ this.packKeptObjects = Boolean.valueOf(packKeptObjects);
+ }
+
+ @SuppressWarnings("boxing")
+ private boolean shouldPackKeptObjects() {
+ return Optional.ofNullable(packKeptObjects)
+ .orElse(pconfig.isPackKeptObjects());
+ }
+
+ /**
* A class holding statistical data for a FileRepository regarding how many
* objects are stored as loose or packed objects
*/
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexLoader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexLoader.java
index 9d6941823a..dff9fa52c8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexLoader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexLoader.java
@@ -11,7 +11,9 @@ package org.eclipse.jgit.internal.storage.file;
import java.io.IOException;
import java.io.InputStream;
+import java.text.MessageFormat;
import java.util.Arrays;
+import org.eclipse.jgit.internal.JGitText;
/**
* Chooses the specific implementation of the object-size index based on the
@@ -26,17 +28,23 @@ public class PackObjectSizeIndexLoader {
* input stream at the beginning of the object size data
* @return an implementation of the object size index
* @throws IOException
- * error reading the streams
+ * error reading the stream, empty stream or content is not an
+ * object size index
*/
public static PackObjectSizeIndex load(InputStream in) throws IOException {
byte[] header = in.readNBytes(4);
if (!Arrays.equals(header, PackObjectSizeIndexWriter.HEADER)) {
- throw new IOException("Stream is not an object index"); //$NON-NLS-1$
+ throw new IOException(MessageFormat.format(
+ JGitText.get().unreadableObjectSizeIndex,
+ Integer.valueOf(header.length),
+ Arrays.toString(header)));
}
int version = in.readNBytes(1)[0];
if (version != 1) {
- throw new IOException("Unknown object size version: " + version); //$NON-NLS-1$
+ throw new IOException(MessageFormat.format(
+ JGitText.get().unsupportedObjectSizeIndexVersion,
+ Integer.valueOf(version)));
}
return PackObjectSizeIndexV1.parse(in);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
index 88d5d652e0..a00b80bb7d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
@@ -50,6 +50,7 @@ import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantLock;
+import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.jgit.annotations.NonNull;
@@ -81,6 +82,7 @@ import org.eclipse.jgit.util.IO;
import org.eclipse.jgit.util.RawParseUtils;
import org.eclipse.jgit.util.RefList;
import org.eclipse.jgit.util.RefMap;
+import org.eclipse.jgit.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -392,6 +394,15 @@ public class RefDirectory extends RefDatabase {
}
@Override
+ public List<Ref> getRefsByPrefix(String... prefixes) throws IOException {
+ return getRefsByPrefix(StringUtils.commonPrefix(prefixes))
+ .parallelStream()
+ .filter(ref -> Stream.of(prefixes)
+ .anyMatch(ref.getName()::startsWith))
+ .collect(Collectors.toUnmodifiableList());
+ }
+
+ @Override
public List<Ref> getAdditionalRefs() throws IOException {
List<Ref> ret = new LinkedList<>();
for (String name : additionalRefsNames) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
index 7e2c5b5ad0..07c5fa4500 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -30,6 +30,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jgit.annotations.NonNull;
@@ -921,29 +922,52 @@ public class Config {
* optional subsection value, e.g. a branch name
*/
public void unsetSection(String section, String subsection) {
+ removeSection(section, subsection);
+ }
+
+ /**
+ * Removes all configuration values under a single section.
+ *
+ * @param section
+ * section name, e.g "branch"
+ * @param subsection
+ * optional subsection value, e.g. a branch name
+ * @return {@code true} if a section was present and was removed;
+ * {@code false} if the config was not changed (i.e., no such
+ * section was present)
+ * @since 6.8
+ */
+ public boolean removeSection(String section, String subsection) {
ConfigSnapshot src, res;
+ AtomicBoolean changed = new AtomicBoolean();
do {
src = state.get();
- res = unsetSection(src, section, subsection);
+ changed.set(false);
+ res = unsetSection(src, section, subsection, changed);
} while (!state.compareAndSet(src, res));
+ return changed.get();
}
- private ConfigSnapshot unsetSection(final ConfigSnapshot srcState,
- final String section,
- final String subsection) {
+ private ConfigSnapshot unsetSection(ConfigSnapshot srcState, String section,
+ String subsection, AtomicBoolean changed) {
final int max = srcState.entryList.size();
final ArrayList<ConfigLine> r = new ArrayList<>(max);
boolean lastWasMatch = false;
for (ConfigLine e : srcState.entryList) {
- if (e.includedFrom == null && e.match(section, subsection)) {
- // Skip this record, it's for the section we are removing.
- lastWasMatch = true;
+ if (e.includedFrom != null) {
+ r.add(e);
continue;
}
-
- if (lastWasMatch && e.section == null && e.subsection == null)
+ if (lastWasMatch && e.section == null && e.subsection == null) {
continue; // skip this padding line in the section.
+ }
+ lastWasMatch = e.match(section, subsection);
+ if (lastWasMatch) {
+ // Skip this record, it's for the section we are removing.
+ changed.set(true);
+ continue;
+ }
r.add(e);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
index d812eacb6b..aad1342fe2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
@@ -104,6 +104,12 @@ public final class ConfigConstants {
/** The "gc" section */
public static final String CONFIG_GC_SECTION = "gc";
+ /**
+ * The "repack" section
+ * @since 5.13.3
+ */
+ public static final String CONFIG_REPACK_SECTION = "repack";
+
/** The "pack" section */
public static final String CONFIG_PACK_SECTION = "pack";
@@ -331,8 +337,17 @@ public final class ConfigConstants {
*/
public static final String CONFIG_KEY_SYMLINKS = "symlinks";
- /** The "streamFileThreshold" key */
- public static final String CONFIG_KEY_STREAM_FILE_TRESHOLD = "streamFileThreshold";
+ /**
+ * The "streamFileThreshold" key
+ *
+ * @since 6.8
+ */
+ public static final String CONFIG_KEY_STREAM_FILE_THRESHOLD = "streamFileThreshold";
+
+ /**
+ * @Deprecated typo, use CONFIG_KEY_STREAM_FILE_THRESHOLD instead
+ */
+ public static final String CONFIG_KEY_STREAM_FILE_TRESHOLD = CONFIG_KEY_STREAM_FILE_THRESHOLD;
/**
* The "packedGitMmap" key
@@ -851,6 +866,13 @@ public final class ConfigConstants {
public static final String CONFIG_KEY_MIN_BYTES_OBJ_SIZE_INDEX = "minBytesForObjSizeIndex";
/**
+ * The "repack.packKeptObjects" key
+ *
+ * @since 5.13.3
+ */
+ public static final String CONFIG_KEY_PACK_KEPT_OBJECTS = "packkeptobjects";
+
+ /**
* The "feature" section
*
* @since 5.9
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java
index 7fdcc4d3ec..3b7c02eca9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java
@@ -5,7 +5,7 @@
* Copyright (C) 2009, JetBrains s.r.o.
* Copyright (C) 2008-2009, Robin Rosenberg <robin.rosenberg@dewire.com>
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2008, Thad Hughes <thadh@thad.corp.google.com> and others
+ * Copyright (C) 2008, 2023 Thad Hughes <thadh@thad.corp.google.com> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -20,10 +20,11 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.MessageFormat;
-import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.errors.LockFailedException;
@@ -48,6 +49,9 @@ public class FileBasedConfig extends StoredConfig {
private final FS fs;
+ // In-process synchronization between load() and save().
+ private final ReentrantReadWriteLock lock;
+
private boolean utf8Bom;
private volatile FileSnapshot snapshot;
@@ -56,6 +60,7 @@ public class FileBasedConfig extends StoredConfig {
private AtomicBoolean exists = new AtomicBoolean();
+
/**
* Create a configuration with no default fallback.
*
@@ -86,6 +91,7 @@ public class FileBasedConfig extends StoredConfig {
this.fs = fs;
this.snapshot = FileSnapshot.DIRTY;
this.hash = ObjectId.zeroId();
+ this.lock = new ReentrantReadWriteLock(false);
}
@Override
@@ -107,17 +113,6 @@ public class FileBasedConfig extends StoredConfig {
return exists.get();
}
- @Override
- public void setStringList(String section, String subsection, String name,
- List<String> values) {
- super.setStringList(section, subsection, name, values);
- }
-
- @Override
- public void unsetSection(String section, String subsection) {
- super.unsetSection(section, subsection);
- }
-
/**
* {@inheritDoc}
* <p>
@@ -128,40 +123,12 @@ public class FileBasedConfig extends StoredConfig {
*/
@Override
public void load() throws IOException, ConfigInvalidException {
+ lock.readLock().lock();
try {
- FileSnapshot[] lastSnapshot = { null };
- Boolean wasRead = FileUtils.readWithRetries(getFile(), f -> {
- final FileSnapshot oldSnapshot = snapshot;
- final FileSnapshot newSnapshot;
- // don't use config in this snapshot to avoid endless recursion
- newSnapshot = FileSnapshot.saveNoConfig(f);
- lastSnapshot[0] = newSnapshot;
- final byte[] in = IO.readFully(f);
- final ObjectId newHash = hash(in);
- if (hash.equals(newHash)) {
- if (oldSnapshot.equals(newSnapshot)) {
- oldSnapshot.setClean(newSnapshot);
- } else {
- snapshot = newSnapshot;
- }
- } else {
- final String decoded;
- if (isUtf8(in)) {
- decoded = RawParseUtils.decode(UTF_8,
- in, 3, in.length);
- utf8Bom = true;
- } else {
- decoded = RawParseUtils.decode(in);
- }
- fromText(decoded);
- snapshot = newSnapshot;
- hash = newHash;
- }
- return Boolean.TRUE;
- });
+ Boolean wasRead = FileUtils.readWithRetries(getFile(), this::load);
if (wasRead == null) {
clear();
- snapshot = lastSnapshot[0];
+ snapshot = FileSnapshot.MISSING_FILE;
}
exists.set(wasRead != null);
} catch (IOException e) {
@@ -169,7 +136,36 @@ public class FileBasedConfig extends StoredConfig {
} catch (Exception e) {
throw new ConfigInvalidException(MessageFormat
.format(JGitText.get().cannotReadFile, getFile()), e);
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+
+ private Boolean load(File f) throws Exception {
+ FileSnapshot oldSnapshot = snapshot;
+ // don't use config in this snapshot to avoid endless recursion
+ FileSnapshot newSnapshot = FileSnapshot.saveNoConfig(f);
+ byte[] in = IO.readFully(f);
+ ObjectId newHash = hash(in);
+ if (hash.equals(newHash)) {
+ if (oldSnapshot.equals(newSnapshot)) {
+ oldSnapshot.setClean(newSnapshot);
+ } else {
+ snapshot = newSnapshot;
+ }
+ } else {
+ String decoded;
+ if (isUtf8(in)) {
+ decoded = RawParseUtils.decode(UTF_8, in, 3, in.length);
+ utf8Bom = true;
+ } else {
+ decoded = RawParseUtils.decode(in);
+ }
+ fromText(decoded);
+ snapshot = newSnapshot;
+ hash = newHash;
}
+ return Boolean.TRUE;
}
/**
@@ -185,33 +181,41 @@ public class FileBasedConfig extends StoredConfig {
*/
@Override
public void save() throws IOException {
- final byte[] out;
- final String text = toText();
- if (utf8Bom) {
- final ByteArrayOutputStream bos = new ByteArrayOutputStream();
- bos.write(0xEF);
- bos.write(0xBB);
- bos.write(0xBF);
- bos.write(text.getBytes(UTF_8));
- out = bos.toByteArray();
- } else {
- out = Constants.encode(text);
- }
-
- final LockFile lf = new LockFile(getFile());
+ lock.writeLock().lock();
try {
- if (!lf.lock()) {
- throw new LockFailedException(getFile());
+ byte[] out;
+ String text = toText();
+ if (utf8Bom) {
+ final ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ bos.write(0xEF);
+ bos.write(0xBB);
+ bos.write(0xBF);
+ bos.write(text.getBytes(UTF_8));
+ out = bos.toByteArray();
+ } else {
+ out = Constants.encode(text);
+ }
+
+ LockFile lf = new LockFile(getFile());
+ try {
+ if (!lf.lock()) {
+ throw new LockFailedException(getFile());
+ }
+ lf.setNeedSnapshotNoConfig(true);
+ lf.write(out);
+ if (!lf.commit()) {
+ throw new IOException(MessageFormat.format(
+ JGitText.get().cannotCommitWriteTo, getFile()));
+ }
+ } finally {
+ lf.unlock();
}
- lf.setNeedSnapshotNoConfig(true);
- lf.write(out);
- if (!lf.commit())
- throw new IOException(MessageFormat.format(JGitText.get().cannotCommitWriteTo, getFile()));
+ snapshot = lf.getCommitSnapshot();
+ hash = hash(out);
+ exists.set(true);
} finally {
- lf.unlock();
+ lock.writeLock().unlock();
}
- snapshot = lf.getCommitSnapshot();
- hash = hash(out);
// notify the listeners
fireConfigChangedEvent();
}
@@ -263,6 +267,8 @@ public class FileBasedConfig extends StoredConfig {
try {
return IO.readFully(file);
+ } catch (FileNotFoundException e) {
+ return null;
} catch (IOException ioe) {
throw new ConfigInvalidException(MessageFormat
.format(JGitText.get().cannotReadFile, relPath), ioe);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UserConfigFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UserConfigFile.java
index 2ad74c23c7..c1eaac7b55 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UserConfigFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UserConfigFile.java
@@ -83,6 +83,14 @@ public class UserConfigFile extends FileBasedConfig {
}
@Override
+ public boolean removeSection(String section, String subsection) {
+ if (exists() || !parent.exists()) {
+ return super.removeSection(section, subsection);
+ }
+ return parent.removeSection(section, subsection);
+ }
+
+ @Override
public boolean isOutdated() {
return super.isOutdated() || parent.isOutdated();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
index 27795ab96b..571248eac6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java
@@ -16,7 +16,7 @@ import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACKED_GIT_LIMIT;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACKED_GIT_MMAP;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACKED_GIT_OPENFILES;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACKED_GIT_WINDOWSIZE;
-import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_STREAM_FILE_TRESHOLD;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_STREAM_FILE_THRESHOLD;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACKED_GIT_USE_STRONGREFS;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACKED_INDEX_GIT_USE_STRONGREFS;
@@ -314,7 +314,7 @@ public class WindowCacheConfig {
long maxMem = Runtime.getRuntime().maxMemory();
long sft = rc.getLong(CONFIG_CORE_SECTION, null,
- CONFIG_KEY_STREAM_FILE_TRESHOLD, getStreamFileThreshold());
+ CONFIG_KEY_STREAM_FILE_THRESHOLD, getStreamFileThreshold());
sft = Math.min(sft, maxMem / 4); // don't use more than 1/4 of the heap
sft = Math.min(sft, Integer.MAX_VALUE); // cannot exceed array length
setStreamFileThreshold((int) sft);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
index 95c001e8a3..d524524612 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
@@ -29,6 +29,7 @@ import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_DEPTH;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_INDEXVERSION;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_MIN_BYTES_OBJ_SIZE_INDEX;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_MIN_SIZE_PREVENT_RACYPACK;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACK_KEPT_OBJECTS;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PRESERVE_OLD_PACKS;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PRUNE_PRESERVED;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_REUSE_DELTAS;
@@ -41,6 +42,7 @@ import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WINDOW;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WINDOW_MEMORY;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WRITE_REVERSE_INDEX;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_PACK_SECTION;
+import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_REPACK_SECTION;
import java.time.Duration;
import java.util.concurrent.Executor;
@@ -178,6 +180,16 @@ public class PackConfig {
*/
public static final boolean DEFAULT_BUILD_BITMAPS = true;
+
+ /**
+ * Default value for including objects in packs locked by .keep file when
+ * repacking: {@value}
+ *
+ * @see #setPackKeptObjects(boolean)
+ * @since 5.13.3
+ */
+ public static final boolean DEFAULT_PACK_KEPT_OBJECTS = false;
+
/**
* Default count of most recent commits to select for bitmaps. Only applies
* when bitmaps are enabled: {@value}
@@ -306,6 +318,8 @@ public class PackConfig {
private boolean buildBitmaps = DEFAULT_BUILD_BITMAPS;
+ private boolean packKeptObjects = DEFAULT_PACK_KEPT_OBJECTS;
+
private int bitmapContiguousCommitCount = DEFAULT_BITMAP_CONTIGUOUS_COMMIT_COUNT;
private int bitmapRecentCommitCount = DEFAULT_BITMAP_RECENT_COMMIT_COUNT;
@@ -387,6 +401,7 @@ public class PackConfig {
this.indexVersion = cfg.indexVersion;
this.writeReverseIndex = cfg.writeReverseIndex;
this.buildBitmaps = cfg.buildBitmaps;
+ this.packKeptObjects = cfg.packKeptObjects;
this.bitmapContiguousCommitCount = cfg.bitmapContiguousCommitCount;
this.bitmapRecentCommitCount = cfg.bitmapRecentCommitCount;
this.bitmapRecentCommitSpan = cfg.bitmapRecentCommitSpan;
@@ -1041,6 +1056,34 @@ public class PackConfig {
}
/**
+ * Set whether to include objects in `.keep` files when repacking.
+ *
+ * <p>
+ * Default setting: {@value #DEFAULT_PACK_KEPT_OBJECTS}
+ *
+ * @param packKeptObjects
+ * boolean indicating whether to include objects in `.keep` files
+ * when repacking.
+ * @since 5.13.3
+ */
+ public void setPackKeptObjects(boolean packKeptObjects) {
+ this.packKeptObjects = packKeptObjects;
+ }
+
+ /**
+ * True if objects in `.keep` files should be included when repacking.
+ *
+ * Default setting: {@value #DEFAULT_PACK_KEPT_OBJECTS}
+ *
+ * @return True if objects in `.keep` files should be included when
+ * repacking.
+ * @since 5.13.3
+ */
+ public boolean isPackKeptObjects() {
+ return packKeptObjects;
+ }
+
+ /**
* Get the count of most recent commits for which to build bitmaps.
*
* Default setting: {@value #DEFAULT_BITMAP_CONTIGUOUS_COMMIT_COUNT}
@@ -1326,8 +1369,12 @@ public class PackConfig {
getSinglePack()));
setWriteReverseIndex(rc.getBoolean(CONFIG_PACK_SECTION,
CONFIG_KEY_WRITE_REVERSE_INDEX, isWriteReverseIndex()));
- setBuildBitmaps(rc.getBoolean(CONFIG_PACK_SECTION,
- CONFIG_KEY_BUILD_BITMAPS, isBuildBitmaps()));
+ boolean buildBitmapsFromConfig = rc.getBoolean(CONFIG_PACK_SECTION,
+ CONFIG_KEY_BUILD_BITMAPS, isBuildBitmaps());
+ setBuildBitmaps(buildBitmapsFromConfig);
+ setPackKeptObjects(rc.getBoolean(CONFIG_REPACK_SECTION,
+ CONFIG_KEY_PACK_KEPT_OBJECTS,
+ buildBitmapsFromConfig || isPackKeptObjects()));
setBitmapContiguousCommitCount(rc.getInt(CONFIG_PACK_SECTION,
CONFIG_KEY_BITMAP_CONTIGUOUS_COMMIT_COUNT,
getBitmapContiguousCommitCount()));
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
index cdda3c0388..e0a351772b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
@@ -36,6 +36,8 @@ import java.util.Date;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
@@ -682,29 +684,23 @@ public abstract class BasePackFetchConnection extends BasePackConnection
}
private void markReachable(Collection<Ref> want, Set<ObjectId> have,
- int maxTime)
- throws IOException {
- Set<String> wantRefs = want.stream().map(Ref::getName)
- .collect(Collectors.toSet());
-
- for (Ref r : local.getRefDatabase().getRefs()) {
- if (useNegotiationTip && !wantRefs.contains(r.getName())) {
- continue;
+ int maxTime) throws IOException {
+ Collection<Ref> refsToMark;
+ if (useNegotiationTip) {
+ refsToMark = translateToLocalTips(want);
+ if (refsToMark.size() < want.size()) {
+ refsToMark.addAll(local.getRefDatabase().getRefs());
}
-
- ObjectId id = r.getPeeledObjectId();
- if (id == null)
- id = r.getObjectId();
- if (id == null)
- continue;
- parseReachable(id);
+ } else {
+ refsToMark = local.getRefDatabase().getRefs();
}
+ markReachableRefTips(refsToMark);
for (ObjectId id : local.getAdditionalHaves())
- parseReachable(id);
+ markReachable(id);
for (ObjectId id : have)
- parseReachable(id);
+ markReachable(id);
if (maxTime > 0) {
// Mark reachable commits until we reach maxTime. These may
@@ -731,7 +727,37 @@ public abstract class BasePackFetchConnection extends BasePackConnection
}
}
- private void parseReachable(ObjectId id) {
+ private Collection<Ref> translateToLocalTips(Collection<Ref> want)
+ throws IOException {
+ String[] refs = want.stream().map(Ref::getName)
+ .collect(Collectors.toSet()).toArray(String[]::new);
+ Map<String, Ref> wantRefMap = local.getRefDatabase().exactRef(refs);
+ return wantRefMap.values().stream()
+ .filter(r -> getRefObjectId(r) != null)
+ .collect(Collectors.toList());
+ }
+
+ /**
+ * Marks commits reachable.
+ *
+ * @param refsToMark
+ * references that client is requesting to be marked.
+ */
+ private void markReachableRefTips(Collection<Ref> refsToMark) {
+ refsToMark.stream().map(BasePackFetchConnection::getRefObjectId)
+ .filter(Objects::nonNull)
+ .forEach(oid -> markReachable(oid));
+ }
+
+ private static ObjectId getRefObjectId(Ref ref) {
+ ObjectId id = ref.getPeeledObjectId();
+ if (id == null) {
+ id = ref.getObjectId();
+ }
+ return id;
+ }
+
+ private void markReachable(ObjectId id) {
try {
RevCommit o = walk.parseCommit(id);
if (!o.has(REACHABLE)) {
@@ -838,7 +864,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
if (statelessRPC && multiAck != MultiAck.DETAILED) {
// Our stateless RPC implementation relies upon the detailed
// ACK status to tell us common objects for reuse in future
- // requests. If its not enabled, we can't talk to the peer.
+ // requests. If its not enabled, we can't talk to the peer.
//
throw new PackProtocolException(uri, MessageFormat.format(
JGitText.get().statelessRPCRequiresOptionToBeEnabled,
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 33aa585569..9318871520 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1190,6 +1190,11 @@ public class UploadPack implements Closeable {
}
private void fetchV2(PacketLineOut pckOut) throws IOException {
+ ProtocolV2Parser parser = new ProtocolV2Parser(transferConfig);
+ FetchV2Request req = parser.parseFetchRequest(pckIn);
+ currentRequest = req;
+ Map<String, ObjectId> wantedRefs = wantedRefs(req);
+
// Depending on the requestValidator, #processHaveLines may
// require that advertised be set. Set it only in the required
// circumstances (to avoid a full ref lookup in the case that
@@ -1199,16 +1204,25 @@ public class UploadPack implements Closeable {
requestValidator instanceof AnyRequestValidator) {
advertised = Collections.emptySet();
} else {
- advertised = refIdSet(getAdvertisedOrDefaultRefs().values());
+ if (req.wantIds.isEmpty()) {
+ // Only refs-in-wants in request. These ref-in-wants where used as
+ // filters already in the ls-refs, there is no need to use a full
+ // advertisement now in fetch. This improves performance and also
+ // accuracy: when the ref db prioritize and truncates the returned
+ // refs (e.g. Gerrit hides too old refs), applying a filter can
+ // return different results than a plain listing.
+ advertised = refIdSet(getFilteredRefs(wantedRefs.keySet()).values());
+ } else {
+ // At least one SHA1 in wants, so we need to take the full
+ // advertisement as base for a reachability check.
+ advertised = refIdSet(getAdvertisedOrDefaultRefs().values());
+ }
}
PackStatistics.Accumulator accumulator = new PackStatistics.Accumulator();
Instant negotiateStart = Instant.now();
accumulator.advertised = advertised.size();
- ProtocolV2Parser parser = new ProtocolV2Parser(transferConfig);
- FetchV2Request req = parser.parseFetchRequest(pckIn);
- currentRequest = req;
rawOut.stopBuffering();
protocolV2Hook.onFetch(req);
@@ -1221,7 +1235,6 @@ public class UploadPack implements Closeable {
// copying data back to class fields
List<ObjectId> deepenNots = parseDeepenNots(req.getDeepenNots());
- Map<String, ObjectId> wantedRefs = wantedRefs(req);
// TODO(ifrade): Avoid mutating the parsed request.
req.getWantIds().addAll(wantedRefs.values());
wantIds = req.getWantIds();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java
index 77c71e4bf0..842d8ba338 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java
@@ -295,6 +295,7 @@ public class FileUtils {
CopyOption... options)
throws AtomicMoveNotSupportedException, IOException {
int attempts = FS.DETECTED.retryFailedLockFileCommit() ? 10 : 1;
+ IOException finalError = null;
while (--attempts >= 0) {
try {
Files.move(toPath(src), toPath(dst), options);
@@ -302,29 +303,35 @@ public class FileUtils {
} catch (AtomicMoveNotSupportedException e) {
throw e;
} catch (IOException e) {
- try {
- if (!dst.delete()) {
- delete(dst, EMPTY_DIRECTORIES_ONLY | RECURSIVE);
+ if (attempts == 0) {
+ // Only delete on the last attempt.
+ try {
+ if (!dst.delete()) {
+ delete(dst, EMPTY_DIRECTORIES_ONLY | RECURSIVE);
+ }
+ // On *nix there is no try, you do or do not
+ Files.move(toPath(src), toPath(dst), options);
+ return;
+ } catch (IOException e2) {
+ e2.addSuppressed(e);
+ finalError = e2;
}
- // On *nix there is no try, you do or do not
- Files.move(toPath(src), toPath(dst), options);
- return;
- } catch (IOException e2) {
- // ignore and continue retry
}
}
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- throw new IOException(
- MessageFormat.format(JGitText.get().renameFileFailed,
- src.getAbsolutePath(), dst.getAbsolutePath()),
- e);
+ if (attempts > 0) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ throw new IOException(MessageFormat.format(
+ JGitText.get().renameFileFailed,
+ src.getAbsolutePath(), dst.getAbsolutePath()), e);
+ }
}
}
throw new IOException(
MessageFormat.format(JGitText.get().renameFileFailed,
- src.getAbsolutePath(), dst.getAbsolutePath()));
+ src.getAbsolutePath(), dst.getAbsolutePath()),
+ finalError);
}
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java
index 274706042b..2fbd12dcc5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java
@@ -14,6 +14,7 @@ import java.text.MessageFormat;
import java.util.Collection;
import org.eclipse.jgit.annotations.NonNull;
+import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.Constants;
@@ -22,6 +23,8 @@ import org.eclipse.jgit.lib.Constants;
*/
public final class StringUtils {
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
private static final long KiB = 1024;
private static final long MiB = 1024 * KiB;
@@ -463,4 +466,39 @@ public final class StringUtils {
}
return String.valueOf(value);
}
+
+ /**
+ * Compares Strings and returns the initial sequence of characters that is
+ * common to all of them.
+ *
+ * @param strings
+ * Strings to consider
+ * @return common prefix of all Strings
+ * @since 6.8
+ */
+ public static @NonNull String commonPrefix(@Nullable String... strings) {
+ if (strings == null || strings.length == 0) {
+ return EMPTY;
+ }
+ String first = strings[0];
+ if (first == null) {
+ return EMPTY;
+ }
+ if (strings.length == 1) {
+ return first;
+ }
+ for (int i = 0; i < first.length(); i++) {
+ char currentChar = first.charAt(i);
+ for (int j = 1; j < strings.length; j++) {
+ String str = strings[j];
+ if (str == null) {
+ return EMPTY;
+ }
+ if (str.length() == i || currentChar != str.charAt(i)) {
+ return str.substring(0, i);
+ }
+ }
+ }
+ return first;
+ }
}
diff --git a/pom.xml b/pom.xml
index ee4fea7217..c38bdbf8ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,41 +101,8 @@
<licenses>
<license>
- <name>Eclipse Distribution License (New BSD License)</name>
- <comments>
- 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.
- </comments>
+ <name>BSD-3-Clause</name>
+ <url>https://www.eclipse.org/org/documents/edl-v10.php</url>
</license>
</licenses>
@@ -146,12 +113,13 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
<java.version>11</java.version>
<bundle-manifest>${project.build.directory}/META-INF/MANIFEST.MF</bundle-manifest>
+ <project.build.outputTimestamp>${commit.time.iso}</project.build.outputTimestamp>
+
<jgit-last-release-version>6.7.0.202309050840-r</jgit-last-release-version>
- <ant-version>1.10.12</ant-version>
+ <ant-version>1.10.14</ant-version>
<apache-sshd-version>2.10.0</apache-sshd-version>
<jsch-version>0.1.55</jsch-version>
<jzlib-version>1.1.3</jzlib-version>
@@ -180,6 +148,7 @@
<hamcrest-version>2.2</hamcrest-version>
<assertj-version>3.24.2</assertj-version>
<jna-version>5.13.0</jna-version>
+ <byte-buddy-version>1.14.9</byte-buddy-version>
<!-- Properties to enable jacoco code coverage analysis -->
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
@@ -224,6 +193,11 @@
<Implementation-Vendor>Eclipse.org - JGit</Implementation-Vendor>
<Implementation-Vendor-Id>org.eclipse.jgit</Implementation-Vendor-Id>
<Implementation-Vendor-URL>${jgit-url}</Implementation-Vendor-URL>
+ <git-describe>${git.commit.id.describe}</git-describe>
+ <git-commit-id>${git.commit.id}</git-commit-id>
+ <git-commit-time>${git.commit.time}</git-commit-time>
+ <git-tags>${git.tags}</git-tags>
+ <git-remote-origin-url>${git.remote.origin.url}</git-remote-origin-url>
</manifestEntries>
</archive>
<!-- TODO: uncomment this in order to skip empty artifact of test modules as soon as bug 416299 is fixed
@@ -391,6 +365,20 @@
<artifactId>license-tool-plugin</artifactId>
<version>1.0.2</version>
</plugin>
+ <plugin>
+ <groupId>org.cyclonedx</groupId>
+ <artifactId>cyclonedx-maven-plugin</artifactId>
+ <version>2.7.9</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-artifact-plugin</artifactId>
+ <version>3.5.0</version>
+ <configuration>
+ <ignore>**/*cyclonedx.json</ignore>
+ <reproducible>true</reproducible>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
@@ -431,7 +419,7 @@
<target if="${translate-qualifier}">
<copy file="META-INF/MANIFEST.MF" tofile="${bundle-manifest}" overwrite="true"/>
<replace file="${bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
@@ -600,6 +588,137 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.cyclonedx</groupId>
+ <artifactId>cyclonedx-maven-plugin</artifactId>
+ <configuration>
+ <projectType>library</projectType>
+ <schemaVersion>1.4</schemaVersion>
+ <includeBomSerialNumber>true</includeBomSerialNumber>
+ <includeCompileScope>true</includeCompileScope>
+ <includeProvidedScope>true</includeProvidedScope>
+ <includeRuntimeScope>true</includeRuntimeScope>
+ <includeSystemScope>true</includeSystemScope>
+ <includeTestScope>false</includeTestScope>
+ <includeLicenseText>false</includeLicenseText>
+ <outputReactorProjects>true</outputReactorProjects>
+ <outputFormat>json</outputFormat>
+ <outputName>cyclonedx</outputName>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <verbose>false</verbose>
+ <detectUnusedForOptionalScope>true</detectUnusedForOptionalScope>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>makeAggregateBom</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>io.github.git-commit-id</groupId>
+ <artifactId>git-commit-id-maven-plugin</artifactId>
+ <version>6.0.0</version>
+ <executions>
+ <execution>
+ <id>get-the-git-infos</id>
+ <goals>
+ <goal>revision</goal>
+ </goals>
+ <phase>initialize</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <generateGitPropertiesFile>false</generateGitPropertiesFile>
+ <injectAllReactorProjects>true</injectAllReactorProjects>
+ <dateFormatTimeZone>UTC</dateFormatTimeZone>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmavenplus</groupId>
+ <artifactId>gmavenplus-plugin</artifactId>
+ <version>3.0.2</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.groovy</groupId>
+ <artifactId>groovy</artifactId>
+ <version>4.0.15</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.groovy</groupId>
+ <artifactId>groovy-ant</artifactId>
+ <version>4.0.15</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>add-dynamic-properties</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <bindAllProjectProperties>true</bindAllProjectProperties>
+ <bindAllSessionUserProperties>true</bindAllSessionUserProperties>
+ <scripts>
+ <script><![CDATA[
+ @Grapes([
+ @Grab(group='org.eclipse.jgit', module='org.eclipse.jgit', version='6.7.0.202309050840-r')
+ ])
+ import java.time.Instant
+ import java.time.ZoneId
+ import java.time.format.DateTimeFormatter
+ import org.eclipse.jgit.lib.Constants
+ import org.eclipse.jgit.lib.ObjectId
+ import org.eclipse.jgit.lib.Repository
+ import org.eclipse.jgit.lib.RepositoryBuilder
+ import org.eclipse.jgit.revwalk.RevCommit
+ import org.eclipse.jgit.revwalk.RevObject
+ import org.eclipse.jgit.revwalk.RevTag
+ import org.eclipse.jgit.revwalk.RevWalk
+
+ try {
+ RepositoryBuilder rb = new RepositoryBuilder().setGitDir().readEnvironment().findGitDir()
+ if (rb.getGitDir() == null) {
+ throw new Exception("Can't find .git directory")
+ }
+ Repository repo = rb.build()
+ ObjectId objectId = repo.resolve(Constants.HEAD)
+ try (RevWalk rw = new RevWalk(repo)) {
+ RevObject obj = rw.parseAny(objectId)
+ while (obj instanceof RevTag) {
+ obj = ((RevTag) obj).getObject()
+ rw.parseBody(obj)
+ }
+
+ switch (obj.getType()) {
+ case Constants.OBJ_COMMIT:
+ RevCommit c = (RevCommit) obj
+ Instant time = c.getCommitterIdent().getWhenAsInstant()
+ DateTimeFormatter iso8601Fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'").withZone(ZoneId.of("UTC"))
+ DateTimeFormatter versionFmt = DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of("UTC"))
+ String isoTime = iso8601Fmt.format(time)
+ String versionTime = versionFmt.format(time)
+ project.properties.setProperty("commit.time.iso", isoTime)
+ project.properties.setProperty("commit.time.version", versionTime)
+ break
+ default:
+ throw new Exception("Didn't expect " + obj.name() + ", " + obj.getType())
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace()
+ }
+ ]]></script>
+ </scripts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
@@ -857,6 +976,26 @@
<artifactId>jna-platform</artifactId>
<version>${jna-version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>5.7.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ <version>${byte-buddy-version}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy-agent</artifactId>
+ <version>${byte-buddy-version}</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</dependencyManagement>