summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target16
-rw-r--r--org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2022-06.tpd14
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/LockFileTest.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java13
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java68
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java36
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java31
18 files changed, 217 insertions, 103 deletions
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 117ad0a753..909b32a73d 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.17" sequenceNumber="1651525068">
+<target name="jgit-4.17" sequenceNumber="1653430139">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
index adc5aa0056..9a19f4b67c 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.18" sequenceNumber="1651525068">
+<target name="jgit-4.18" sequenceNumber="1653430139">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
index 5842995fff..caaa7055be 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.19-staging" sequenceNumber="1651525065">
+<target name="jgit-4.19-staging" sequenceNumber="1653430136">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target
index f8f7f3cf76..52c6e0dd84 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.20" sequenceNumber="1651525067">
+<target name="jgit-4.20" sequenceNumber="1653430139">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target
index 503f653d56..67b96e14c6 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.21" sequenceNumber="1651525068">
+<target name="jgit-4.21" sequenceNumber="1653430139">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target
index c40cde33a4..afb52ccb56 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.22" sequenceNumber="1651525008">
+<target name="jgit-4.22" sequenceNumber="1653430138">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target
index 78456d4a37..b233f3d184 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.23" sequenceNumber="1651531554">
+<target name="jgit-4.23" sequenceNumber="1653430138">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target
index 12b5ea80c8..1a48702e23 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,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.24" sequenceNumber="1651531556">
+<target name="jgit-4.24" sequenceNumber="1653430121">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="jakarta.servlet-api" version="4.0.0"/>
@@ -39,8 +39,8 @@
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
- <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
- <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
+ <unit id="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="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
@@ -59,12 +59,12 @@
<unit id="org.apache.sshd.sftp.source" version="2.8.0.v20211227-1750"/>
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
- <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcpg" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcpg.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcpkix" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcpkix.source" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220105-1522"/>
- <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220105-1522"/>
+ <unit id="org.bouncycastle.bcprov" version="1.70.0.v20220507-1208"/>
+ <unit id="org.bouncycastle.bcprov.source" version="1.70.0.v20220507-1208"/>
<unit id="org.bouncycastle.bcutil" version="1.70.0.v20220105-1522"/>
<unit id="org.bouncycastle.bcutil.source" version="1.70.0.v20220105-1522"/>
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
@@ -87,7 +87,7 @@
<unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/>
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
- <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2022-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2022-06.tpd
index 9e32ba4161..41d534abc0 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2022-06.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2022-06.tpd
@@ -1,7 +1,7 @@
target "staging-2022-06" with source configurePhase
// see https://download.eclipse.org/tools/orbit/downloads/
-location "https://download.eclipse.org/tools/orbit/downloads/drops/I20220502200629/repository" {
+location "https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository" {
com.google.gson [2.8.9.v20220111-1409,2.8.9.v20220111-1409]
com.google.gson.source [2.8.9.v20220111-1409,2.8.9.v20220111-1409]
com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
@@ -18,8 +18,8 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I202205022006
net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
- net.i2p.crypto.eddsa [0.3.0.v20210923-1401,0.3.0.v20210923-1401]
- net.i2p.crypto.eddsa.source [0.3.0.v20210923-1401,0.3.0.v20210923-1401]
+ net.i2p.crypto.eddsa [0.3.0.v20220506-1020,0.3.0.v20220506-1020]
+ net.i2p.crypto.eddsa.source [0.3.0.v20220506-1020,0.3.0.v20220506-1020]
org.apache.ant [1.10.12.v20211102-1452,1.10.12.v20211102-1452]
org.apache.ant.source [1.10.12.v20211102-1452,1.10.12.v20211102-1452]
org.apache.commons.codec [1.14.0.v20200818-1422,1.14.0.v20200818-1422]
@@ -38,12 +38,12 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I202205022006
org.apache.sshd.sftp.source [2.8.0.v20211227-1750,2.8.0.v20211227-1750]
org.assertj [3.20.2.v20210706-1104,3.20.2.v20210706-1104]
org.assertj.source [3.20.2.v20210706-1104,3.20.2.v20210706-1104]
- org.bouncycastle.bcpg [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
- org.bouncycastle.bcpg.source [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
+ org.bouncycastle.bcpg [1.70.0.v20220507-1208,1.70.0.v20220507-1208]
+ org.bouncycastle.bcpg.source [1.70.0.v20220507-1208,1.70.0.v20220507-1208]
org.bouncycastle.bcpkix [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
org.bouncycastle.bcpkix.source [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
- org.bouncycastle.bcprov [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
- org.bouncycastle.bcprov.source [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
+ org.bouncycastle.bcprov [1.70.0.v20220507-1208,1.70.0.v20220507-1208]
+ org.bouncycastle.bcprov.source [1.70.0.v20220507-1208,1.70.0.v20220507-1208]
org.bouncycastle.bcutil [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
org.bouncycastle.bcutil.source [1.70.0.v20220105-1522,1.70.0.v20220105-1522]
org.hamcrest [2.2.0.v20210711-0821,2.2.0.v20210711-0821]
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/LockFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/LockFileTest.java
index 509935dfb9..7eab1dcb09 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/LockFileTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/LockFileTest.java
@@ -200,4 +200,16 @@ public class LockFileTest extends RepositoryTestCase {
assertFalse(lock.isLocked());
checkFile(f, "contentother");
}
+
+ @Test
+ public void testUnlockNoop() throws Exception {
+ File f = writeTrashFile("somefile", "content");
+ try {
+ LockFile lock = new LockFile(f);
+ lock.unlock();
+ lock.unlock();
+ } catch (Throwable e) {
+ fail("unlock should be noop if not locked at all.");
+ }
+ }
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java
index 17bd863528..a784af8c3f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java
@@ -15,6 +15,7 @@ import java.io.RandomAccessFile;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.util.Equality;
class PackFileSnapshot extends FileSnapshot {
@@ -61,7 +62,8 @@ class PackFileSnapshot extends FileSnapshot {
}
boolean isChecksumChanged(File packFile) {
- return wasChecksumChanged = checksum != MISSING_CHECKSUM
+ return wasChecksumChanged = !Equality.isSameInstance(checksum,
+ MISSING_CHECKSUM)
&& !checksum.equals(readChecksum(packFile));
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
index a50eaf1a8a..a25948e50b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
@@ -143,8 +143,19 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
*/
static final int TOPO_QUEUED = 1 << 6;
+ /**
+ * Set on a RevCommit when a {@link TreeRevFilter} has been applied.
+ * <p>
+ * This flag is processed by the {@link RewriteGenerator} to check if a
+ * {@link TreeRevFilter} has been applied.
+ *
+ * @see TreeRevFilter
+ * @see RewriteGenerator
+ */
+ static final int TREE_REV_FILTER_APPLIED = 1 << 7;
+
/** Number of flag bits we keep internal for our own use. See above flags. */
- static final int RESERVED_FLAGS = 7;
+ static final int RESERVED_FLAGS = 8;
private static final int APP_FLAGS = -1 & ~((1 << RESERVED_FLAGS) - 1);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java
index 4565a4b5de..1adef07ad9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java
@@ -24,14 +24,7 @@ import org.eclipse.jgit.errors.MissingObjectException;
* commit that matched the revision walker's filters.
* <p>
* This generator is the second phase of a path limited revision walk and
- * assumes it is receiving RevCommits from {@link TreeRevFilter},
- * after they have been fully buffered by {@link AbstractRevQueue}. The full
- * buffering is necessary to allow the simple loop used within our own
- * {@link #rewrite(RevCommit)} to pull completely through a strand of
- * {@link RevWalk#REWRITE} colored commits and come up with a simplification
- * that makes the DAG dense. Not fully buffering the commits first would cause
- * this loop to abort early, due to commits not being parsed and colored
- * correctly.
+ * assumes it is receiving RevCommits from {@link TreeRevFilter}.
*
* @see TreeRevFilter
*/
@@ -43,9 +36,12 @@ class RewriteGenerator extends Generator {
private final Generator source;
+ private final FIFORevQueue pending;
+
RewriteGenerator(Generator s) {
super(s.firstParent);
source = s;
+ pending = new FIFORevQueue(s.firstParent);
}
@Override
@@ -62,10 +58,19 @@ class RewriteGenerator extends Generator {
@Override
RevCommit next() throws MissingObjectException,
IncorrectObjectTypeException, IOException {
- final RevCommit c = source.next();
+ RevCommit c = pending.next();
+
if (c == null) {
- return null;
+ c = source.next();
+ if (c == null) {
+ // We are done: Both the source generator and our internal list
+ // are completely exhausted.
+ return null;
+ }
}
+
+ applyFilterToParents(c);
+
boolean rewrote = false;
final RevCommit[] pList = c.parents;
final int nParents = pList.length;
@@ -91,10 +96,41 @@ class RewriteGenerator extends Generator {
return c;
}
- private RevCommit rewrite(RevCommit p) {
+ /**
+ * Makes sure that the {@link TreeRevFilter} has been applied to all parents
+ * of this commit by the previous {@link PendingGenerator}.
+ *
+ * @param c
+ * @throws MissingObjectException
+ * @throws IncorrectObjectTypeException
+ * @throws IOException
+ */
+ private void applyFilterToParents(RevCommit c)
+ throws MissingObjectException, IncorrectObjectTypeException,
+ IOException {
+ for (RevCommit parent : c.parents) {
+ while ((parent.flags & RevWalk.TREE_REV_FILTER_APPLIED) == 0) {
+
+ RevCommit n = source.next();
+
+ if (n != null) {
+ pending.add(n);
+ } else {
+ // Source generator is exhausted; filter has been applied to
+ // all commits
+ return;
+ }
+
+ }
+
+ }
+ }
+
+ private RevCommit rewrite(RevCommit p) throws MissingObjectException,
+ IncorrectObjectTypeException, IOException {
for (;;) {
- final RevCommit[] pList = p.parents;
- if (pList.length > 1) {
+
+ if (p.parents.length > 1) {
// This parent is a merge, so keep it.
//
return p;
@@ -114,14 +150,16 @@ class RewriteGenerator extends Generator {
return p;
}
- if (pList.length == 0) {
+ if (p.parents.length == 0) {
// We can't go back any further, other than to
// just delete the parent entirely.
//
return null;
}
- p = pList[0];
+ applyFilterToParents(p.parents[0]);
+ p = p.parents[0];
+
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
index bfcea6ea8f..a79901ca10 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
@@ -125,12 +125,6 @@ class StartGenerator extends Generator {
}
if ((g.outputType() & NEEDS_REWRITE) != 0) {
- // Correction for an upstream NEEDS_REWRITE is to buffer
- // fully and then apply a rewrite generator that can
- // pull through the rewrite chain and produce a dense
- // output graph.
- //
- g = new FIFORevQueue(g);
g = new RewriteGenerator(g);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java
index 822fc5320c..92d72268d1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java
@@ -41,6 +41,8 @@ public class TreeRevFilter extends RevFilter {
private static final int UNINTERESTING = RevWalk.UNINTERESTING;
+ private static final int FILTER_APPLIED = RevWalk.TREE_REV_FILTER_APPLIED;
+
private final int rewriteFlag;
private final TreeWalk pathFilter;
@@ -101,6 +103,7 @@ public class TreeRevFilter extends RevFilter {
public boolean include(RevWalk walker, RevCommit c)
throws StopWalkException, MissingObjectException,
IncorrectObjectTypeException, IOException {
+ c.flags |= FILTER_APPLIED;
// Reset the tree filter to scan this commit and parents.
//
RevCommit[] pList = c.parents;
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 567e40936a..cba5e1697c 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
@@ -180,9 +180,10 @@ public class FileBasedConfig extends StoredConfig {
}
final LockFile lf = new LockFile(getFile());
- if (!lf.lock())
- throw new LockFailedException(getFile());
try {
+ if (!lf.lock()) {
+ throw new LockFailedException(getFile());
+ }
lf.setNeedSnapshotNoConfig(true);
lf.write(out);
if (!lf.commit())
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java
new file mode 100644
index 0000000000..da1684630b
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2022, Fabio Ponciroli <ponch78@gmail.com> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.util;
+
+/**
+ * Equality utilities.
+ *
+ * @since: 6.2
+ */
+public class Equality {
+
+ /**
+ * Compare by reference
+ *
+ * @param a
+ * First object to compare
+ * @param b
+ * Second object to compare
+ * @return {@code true} if the objects are identical, {@code false}
+ * otherwise
+ *
+ * @since 6.2
+ */
+ @SuppressWarnings("ReferenceEquality")
+ public static <T> boolean isSameInstance(T a, T b) {
+ return a == b;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index 9237c0a9b2..e8f38d8fd9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -47,7 +47,6 @@ import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
@@ -262,8 +261,9 @@ public abstract class FS {
*
* @see java.util.concurrent.Executors#newCachedThreadPool()
*/
- private static final Executor FUTURE_RUNNER = new ThreadPoolExecutor(0,
- 5, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
+ private static final ExecutorService FUTURE_RUNNER = new ThreadPoolExecutor(
+ 0, 5, 30L, TimeUnit.SECONDS,
+ new LinkedBlockingQueue<Runnable>(),
runnable -> {
Thread t = new Thread(runnable,
"JGit-FileStoreAttributeReader-" //$NON-NLS-1$
@@ -285,8 +285,9 @@ public abstract class FS {
* small keep-alive time to avoid delays on shut-down.
* </p>
*/
- private static final Executor SAVE_RUNNER = new ThreadPoolExecutor(0, 1,
- 1L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(),
+ private static final ExecutorService SAVE_RUNNER = new ThreadPoolExecutor(
+ 0, 1, 1L, TimeUnit.MILLISECONDS,
+ new LinkedBlockingQueue<Runnable>(),
runnable -> {
Thread t = new Thread(runnable,
"JGit-FileStoreAttributeWriter-" //$NON-NLS-1$
@@ -296,6 +297,18 @@ public abstract class FS {
return t;
});
+ static {
+ // Shut down the SAVE_RUNNER on System.exit()
+ Runtime.getRuntime().addShutdownHook(new Thread(() -> {
+ try {
+ SAVE_RUNNER.shutdownNow();
+ SAVE_RUNNER.awaitTermination(100, TimeUnit.MILLISECONDS);
+ } catch (Exception e) {
+ // Ignore; we're shutting down
+ }
+ }));
+ }
+
/**
* Whether FileStore attributes should be determined asynchronously
*
@@ -452,11 +465,13 @@ public abstract class FS {
return null;
}
// fall through and return fallback
- } catch (IOException | InterruptedException
- | ExecutionException | CancellationException e) {
+ } catch (IOException | ExecutionException | CancellationException e) {
LOG.error(e.getMessage(), e);
} catch (TimeoutException | SecurityException e) {
// use fallback
+ } catch (InterruptedException e) {
+ LOG.error(e.getMessage(), e);
+ Thread.currentThread().interrupt();
}
LOG.debug("{}: use fallback timestamp resolution for directory {}", //$NON-NLS-1$
Thread.currentThread(), dir);
@@ -474,6 +489,7 @@ public abstract class FS {
Path probe = dir.resolve(".probe-" + UUID.randomUUID()); //$NON-NLS-1$
Instant end = Instant.now().plusSeconds(3);
try {
+ probe.toFile().deleteOnExit();
Files.createFile(probe);
do {
n++;
@@ -540,6 +556,7 @@ public abstract class FS {
}
Path probe = dir.resolve(".probe-" + UUID.randomUUID()); //$NON-NLS-1$
try {
+ probe.toFile().deleteOnExit();
Files.createFile(probe);
Duration fsResolution = getFsResolution(s, dir, probe);
Duration clockResolution = measureClockResolution();