getUserAuthFactories() {
return Collections.unmodifiableList(
Arrays.asList(GssApiWithMicAuthFactory.INSTANCE,
JGitPublicKeyAuthFactory.FACTORY,
- JGitPasswordAuthFactory.INSTANCE,
+ UserAuthPasswordFactory.INSTANCE,
UserAuthKeyboardInteractiveFactory.INSTANCE));
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndexTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndexTest.java
new file mode 100644
index 000000000..b533d5c98
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndexTest.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2023, Google LLC
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.internal.storage.commitgraph;
+
+import org.eclipse.jgit.lib.ObjectId;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+
+public class GraphObjectIndexTest {
+
+ @Test
+ public void findGraphPosition_noObjInBucket() throws CommitGraphFormatException {
+ GraphObjectIndex idx = new GraphObjectIndex(100,
+ new byte[256 * 4], new byte[] {});
+ int graphPosition = idx.findGraphPosition(
+ ObjectId.fromString("731dfd4c5eb6f88b98e983b9b0551b3562a0c46c"));
+ assertEquals(-1, graphPosition);
+ }
+
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
index 2a403c769..24a81b671 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
@@ -541,6 +541,39 @@ public void testWriteObjectSizeIndex_noDeltas() throws Exception {
assertEquals(18787, objSizeIdx.getSize(idx.findPosition(knownBlob2)));
}
+ @Test
+ public void testWriteReverseIndexConfig() {
+ assertFalse(config.isWriteReverseIndex());
+ config.setWriteReverseIndex(true);
+ assertTrue(config.isWriteReverseIndex());
+ }
+
+ @Test
+ public void testWriteReverseIndexOff() throws Exception {
+ config.setWriteReverseIndex(false);
+ writer = new PackWriter(config, db.newObjectReader());
+ ByteArrayOutputStream reverseIndexOutput = new ByteArrayOutputStream();
+
+ writer.writeReverseIndex(reverseIndexOutput);
+
+ assertEquals(0, reverseIndexOutput.size());
+ }
+
+ @Test
+ public void testWriteReverseIndexOn() throws Exception {
+ config.setWriteReverseIndex(true);
+ writeVerifyPack4(false);
+ ByteArrayOutputStream reverseIndexOutput = new ByteArrayOutputStream();
+ int headerBytes = 12;
+ int bodyBytes = 12;
+ int footerBytes = 40;
+
+ writer.writeReverseIndex(reverseIndexOutput);
+
+ assertTrue(reverseIndexOutput.size() == headerBytes + bodyBytes
+ + footerBytes);
+ }
+
@Test
public void testExclude() throws Exception {
// TestRepository closes repo
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RewriteGeneratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RewriteGeneratorTest.java
new file mode 100644
index 000000000..04e372998
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RewriteGeneratorTest.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2023, HIS eG
+ *
+ * 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.revwalk;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
+
+public class RewriteGeneratorTest extends RevWalkTestCase {
+
+ @Test
+ public void testRewriteGeneratorDoesNotExhaustPreviousGenerator()
+ throws Exception {
+ RevCommit a = commit();
+ a.flags |= RevWalk.TREE_REV_FILTER_APPLIED;
+ RevCommit b = commit(a);
+
+ LIFORevQueue q = new LIFORevQueue();
+ q.add(a);
+ q.add(b);
+
+ /*
+ * Since the TREE_REV_FILTER has been applied to commit a and the
+ * REWRITE flag has not been applied to commit a, the RewriteGenerator
+ * must not rewrite the parent of b and thus must not call the previous
+ * generator (since b already has its correct parent).
+ */
+ RewriteGenerator rewriteGenerator = new RewriteGenerator(q);
+ rewriteGenerator.next();
+
+ assertNotNull(
+ "Previous generator was unnecessarily exhausted by RewriteGenerator",
+ q.next());
+ }
+
+ @Test
+ public void testRewriteGeneratorRewritesParent() throws Exception {
+ RevCommit a = commit();
+ a.flags |= RevWalk.TREE_REV_FILTER_APPLIED;
+ a.flags |= RevWalk.REWRITE;
+ RevCommit b = commit(a);
+ assertEquals(1, b.getParentCount());
+
+ LIFORevQueue q = new LIFORevQueue();
+ /*
+ * We are only adding commit b (and not a), because PendingGenerator
+ * should never emit a commit that has the REWRITE flag set.
+ */
+ q.add(b);
+
+ RewriteGenerator rewriteGenerator = new RewriteGenerator(q);
+ RevCommit returnedB = rewriteGenerator.next();
+ assertEquals(b.getId(), returnedB.getId());
+ assertEquals(0, returnedB.getParentCount());
+ }
+}
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index 1fbc01102..75697fd88 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -14,161 +14,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -182,31 +34,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
index ca5370e91..ccf99ff5b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java
@@ -12,6 +12,7 @@
import java.io.IOException;
import java.util.List;
+import java.util.Objects;
import org.eclipse.jgit.blame.ReverseWalk.ReverseCommit;
import org.eclipse.jgit.diff.Edit;
@@ -269,7 +270,7 @@ private Region clearRegionList() {
}
boolean canMergeRegions(Candidate other) {
- return sourceCommit == other.sourceCommit
+ return Objects.equals(sourceCommit, other.sourceCommit)
&& sourcePath.getPath().equals(other.sourcePath.getPath());
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java
index b0df46732..22b4011f9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java
@@ -80,7 +80,7 @@ int findGraphPosition(AnyObjectId id) {
if (levelOne > 0) {
low = fanoutTable[levelOne - 1];
}
- do {
+ while (low < high) {
int mid = (low + high) >>> 1;
int pos = objIdOffset(mid);
int cmp = id.compareTo(oidLookup, pos);
@@ -91,7 +91,7 @@ int findGraphPosition(AnyObjectId id) {
} else {
low = mid + 1;
}
- } while (low < high);
+ }
return -1;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java
index 66bcf7398..92e23b8b4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java
@@ -577,6 +577,7 @@ private void packGarbage(ProgressMonitor pm) throws IOException {
cfg.setReuseObjects(true);
cfg.setDeltaCompress(false);
cfg.setBuildBitmaps(false);
+ cfg.setWriteReverseIndex(false);
try (PackWriter pw = new PackWriter(cfg, ctx);
RevWalk pool = new RevWalk(ctx)) {
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 be359bbea..11757aabd 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
@@ -11,6 +11,7 @@
package org.eclipse.jgit.internal.storage.file;
import static org.eclipse.jgit.internal.storage.pack.PackExt.BITMAP_INDEX;
+import static org.eclipse.jgit.internal.storage.pack.PackExt.COMMIT_GRAPH;
import static org.eclipse.jgit.internal.storage.pack.PackExt.INDEX;
import static org.eclipse.jgit.internal.storage.pack.PackExt.KEEP;
import static org.eclipse.jgit.internal.storage.pack.PackExt.PACK;
@@ -943,7 +944,8 @@ void writeCommitGraph(@NonNull Set extends ObjectId> wants)
try (RevWalk walk = new RevWalk(repo)) {
CommitGraphWriter writer = new CommitGraphWriter(
GraphCommits.fromWalk(pm, wants, walk));
- tmpFile = File.createTempFile("commit_", ".graph_tmp", //$NON-NLS-1$//$NON-NLS-2$
+ tmpFile = File.createTempFile("commit_", //$NON-NLS-1$
+ COMMIT_GRAPH.getTmpExtension(),
repo.getObjectDatabase().getInfoDirectory());
// write the commit-graph file
try (FileOutputStream fos = new FileOutputStream(tmpFile);
@@ -1292,10 +1294,11 @@ private Pack writePack(@NonNull Set extends ObjectId> want,
ObjectId id = pw.computeName();
File packdir = repo.getObjectDatabase().getPackDirectory();
packdir.mkdirs();
- tmpPack = File.createTempFile("gc_", ".pack_tmp", packdir); //$NON-NLS-1$ //$NON-NLS-2$
- final String tmpBase = tmpPack.getName()
+ tmpPack = File.createTempFile("gc_", //$NON-NLS-1$
+ PACK.getTmpExtension(), packdir);
+ String tmpBase = tmpPack.getName()
.substring(0, tmpPack.getName().lastIndexOf('.'));
- File tmpIdx = new File(packdir, tmpBase + ".idx_tmp"); //$NON-NLS-1$
+ File tmpIdx = new File(packdir, tmpBase + INDEX.getTmpExtension());
tmpExts.put(INDEX, tmpIdx);
if (!tmpIdx.createNewFile())
@@ -1321,7 +1324,8 @@ private Pack writePack(@NonNull Set extends ObjectId> want,
}
if (pw.prepareBitmapIndex(pm)) {
- File tmpBitmapIdx = new File(packdir, tmpBase + ".bitmap_tmp"); //$NON-NLS-1$
+ File tmpBitmapIdx = new File(packdir,
+ tmpBase + BITMAP_INDEX.getTmpExtension());
tmpExts.put(BITMAP_INDEX, tmpBitmapIdx);
if (!tmpBitmapIdx.createNewFile())
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java
index adad411c6..d58008379 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java
@@ -71,6 +71,15 @@ public int getBit() {
return 1 << getPosition();
}
+ /**
+ * Format a temporary file extension for this PackExt.
+ *
+ * @return a temporary file extension
+ */
+ public String getTmpExtension() {
+ return String.format(".%s_tmp", ext); //$NON-NLS-1$
+ }
+
/** {@inheritDoc} */
@Override
public String toString() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
index bad572459..9508f3fe3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
@@ -62,6 +62,7 @@
import org.eclipse.jgit.internal.storage.file.PackBitmapIndexWriterV1;
import org.eclipse.jgit.internal.storage.file.PackIndexWriter;
import org.eclipse.jgit.internal.storage.file.PackObjectSizeIndexWriter;
+import org.eclipse.jgit.internal.storage.file.PackReverseIndexWriter;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.AsyncObjectSizeQueue;
import org.eclipse.jgit.lib.BatchingProgressMonitor;
@@ -1136,6 +1137,38 @@ public void writeObjectSizeIndex(OutputStream objIdxStream)
stats.timeWriting += System.currentTimeMillis() - writeStart;
}
+ /**
+ * Whether the writer will write a reverse index file. The configuration
+ * flag must be on and the writer must be able to write corresponding
+ * forward index.
+ *
+ * @return whether the writer will write a reverse index file
+ */
+ public boolean isReverseIndexEnabled() {
+ // Only write the reverse index if the writer is configured to and the
+ // forward index that it would correspond to will be written.
+ return config.isWriteReverseIndex() && !isIndexDisabled();
+ }
+
+ /**
+ * Write the pack's reverse index file to the output stream.
+ *
+ * @param stream
+ * where to write the file contents to
+ * @throws IOException
+ * if writing to the stream fails
+ */
+ public void writeReverseIndex(OutputStream stream) throws IOException {
+ if (!isReverseIndexEnabled()) {
+ return;
+ }
+ long writeStart = System.currentTimeMillis();
+ PackReverseIndexWriter writer = PackReverseIndexWriter
+ .createWriter(stream);
+ writer.write(sortByName(), packcsum);
+ stats.timeWriting += System.currentTimeMillis() - writeStart;
+ }
+
/**
* Create a bitmap index file to match the pack file just written.
*
@@ -1690,6 +1723,11 @@ private void parallelDeltaSearch(ProgressMonitor monitor,
}
throw new IOException(JGitText
.get().packingCancelledDuringObjectsWriting, e);
+ } catch (Throwable e) {
+ if (e1 != null) {
+ e.addSuppressed(e1);
+ }
+ throw 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 c4b6bf955..4c080f476 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
@@ -744,6 +744,13 @@ public final class ConfigConstants {
*/
public static final String CONFIG_KEY_BITMAP_RECENT_COMMIT_COUNT = "bitmaprecentcommitspan";
+ /**
+ * The "pack.writeReverseIndex" key
+ *
+ * @since 6.6
+ */
+ public static final String CONFIG_KEY_WRITE_REVERSE_INDEX = "writeReverseIndex";
+
/**
* The "pack.buildBitmaps" key
* @since 5.8
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 a0c978f6e..b0b1d4ff2 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
@@ -27,7 +27,10 @@
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_DELTA_COMPRESSION;
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_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;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_REUSE_OBJECTS;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_SEARCH_FOR_REUSE_TIMEOUT;
@@ -36,10 +39,8 @@
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WAIT_PREVENT_RACYPACK;
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_MIN_BYTES_OBJ_SIZE_INDEX;
+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_KEY_PRESERVE_OLD_PACKS;
-import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PRUNE_PRESERVED;
import java.time.Duration;
import java.util.concurrent.Executor;
@@ -161,6 +162,14 @@ public class PackConfig {
*/
public static final int DEFAULT_INDEX_VERSION = 2;
+ /**
+ * Default value of the write reverse index option: {@value}
+ *
+ * @see #setWriteReverseIndex(boolean)
+ * @since 6.6
+ */
+ public static final boolean DEFAULT_WRITE_REVERSE_INDEX = false;
+
/**
* Default value of the build bitmaps option: {@value}
*
@@ -292,6 +301,8 @@ public class PackConfig {
private int indexVersion = DEFAULT_INDEX_VERSION;
+ private boolean writeReverseIndex = DEFAULT_WRITE_REVERSE_INDEX;
+
private boolean buildBitmaps = DEFAULT_BUILD_BITMAPS;
private int bitmapContiguousCommitCount = DEFAULT_BITMAP_CONTIGUOUS_COMMIT_COUNT;
@@ -373,6 +384,7 @@ public PackConfig(PackConfig cfg) {
this.threads = cfg.threads;
this.executor = cfg.executor;
this.indexVersion = cfg.indexVersion;
+ this.writeReverseIndex = cfg.writeReverseIndex;
this.buildBitmaps = cfg.buildBitmaps;
this.bitmapContiguousCommitCount = cfg.bitmapContiguousCommitCount;
this.bitmapRecentCommitCount = cfg.bitmapRecentCommitCount;
@@ -973,6 +985,31 @@ public void setIndexVersion(int version) {
indexVersion = version;
}
+ /**
+ * True if the writer should write reverse index files.
+ *
+ * Default setting: {@value #DEFAULT_WRITE_REVERSE_INDEX}
+ *
+ * @return whether the writer should write reverse index files
+ * @since 6.6
+ */
+ public boolean isWriteReverseIndex() {
+ return writeReverseIndex;
+ }
+
+ /**
+ * Set whether the writer will write reverse index files.
+ *
+ * Default setting: {@value #DEFAULT_WRITE_REVERSE_INDEX}
+ *
+ * @param writeReverseIndex
+ * whether the writer should write reverse index files
+ * @since 6.6
+ */
+ public void setWriteReverseIndex(boolean writeReverseIndex) {
+ this.writeReverseIndex = writeReverseIndex;
+ }
+
/**
* True if writer is allowed to build bitmaps for indexes.
*
@@ -1286,6 +1323,8 @@ public void fromConfig(Config rc) {
setSinglePack(rc.getBoolean(CONFIG_PACK_SECTION,
CONFIG_KEY_SINGLE_PACK,
getSinglePack()));
+ setWriteReverseIndex(rc.getBoolean(CONFIG_PACK_SECTION,
+ CONFIG_KEY_WRITE_REVERSE_INDEX, isWriteReverseIndex()));
setBuildBitmaps(rc.getBoolean(CONFIG_PACK_SECTION,
CONFIG_KEY_BUILD_BITMAPS, isBuildBitmaps()));
setBitmapContiguousCommitCount(rc.getInt(CONFIG_PACK_SECTION,
@@ -1347,6 +1386,7 @@ public String toString() {
b.append(", reuseDeltas=").append(isReuseDeltas()); //$NON-NLS-1$
b.append(", reuseObjects=").append(isReuseObjects()); //$NON-NLS-1$
b.append(", deltaCompress=").append(isDeltaCompress()); //$NON-NLS-1$
+ b.append(", writeReverseIndex=").append(isWriteReverseIndex()); //$NON-NLS-1$
b.append(", buildBitmaps=").append(isBuildBitmaps()); //$NON-NLS-1$
b.append(", bitmapContiguousCommitCount=") //$NON-NLS-1$
.append(getBitmapContiguousCommitCount());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java
index d48252174..b87392531 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java
@@ -596,7 +596,7 @@ HttpURLConnection open(final String method, final String bucket,
final String key, final Map args)
throws IOException {
final StringBuilder urlstr = new StringBuilder();
- urlstr.append(protocol); //$NON-NLS-1$
+ urlstr.append(protocol);
urlstr.append("://"); //$NON-NLS-1$
urlstr.append(bucket);
urlstr.append('.');
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
index f02160e45..c510194ee 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
@@ -111,7 +111,7 @@ void execute(ProgressMonitor monitor, FetchResult result,
for (PackLock lock : packLocks) {
lock.unlock();
}
- } catch (IOException e) {
+ } catch (Throwable e) {
if (e1 != null) {
e.addSuppressed(e1);
}
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 f245eae39..3264f556f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1189,6 +1189,7 @@ private void fetchV2(PacketLineOut pckOut) throws IOException {
PackStatistics.Accumulator accumulator = new PackStatistics.Accumulator();
Instant negotiateStart = Instant.now();
+ accumulator.advertised = advertised.size();
ProtocolV2Parser parser = new ProtocolV2Parser(transferConfig);
FetchV2Request req = parser.parseFetchRequest(pckIn);
@@ -1209,6 +1210,7 @@ private void fetchV2(PacketLineOut pckOut) throws IOException {
// TODO(ifrade): Avoid mutating the parsed request.
req.getWantIds().addAll(wantedRefs.values());
wantIds = req.getWantIds();
+ accumulator.wants = wantIds.size();
boolean sectionSent = false;
boolean mayHaveShallow = req.getDepth() != 0
@@ -1766,7 +1768,6 @@ private boolean negotiate(FetchRequest req,
&& line.length() == PACKET_HAVE.length() + 40) {
peerHas.add(ObjectId
.fromString(line.substring(PACKET_HAVE.length())));
- accumulator.haves++;
} else if (line.equals(PACKET_DONE)) {
last = processHaveLines(peerHas, last, pckOut, accumulator, Option.NONE);
@@ -1798,6 +1799,7 @@ private ObjectId processHaveLines(List peerHas, ObjectId last,
parseWants(accumulator);
if (peerHas.isEmpty())
return last;
+ accumulator.haves += peerHas.size();
sentReady = false;
int haveCnt = 0;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
index ed8f450c5..cc6c252fa 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
@@ -530,9 +530,10 @@ private boolean downloadPackedObject(final ProgressMonitor monitor,
// are unusable and we shouldn't consult them again.
//
try {
- if (pack.tmpIdx != null)
+ if (pack.tmpIdx != null) {
FileUtils.delete(pack.tmpIdx);
- } catch (IOException e) {
+ }
+ } catch (Throwable e) {
if (e1 != null) {
e.addSuppressed(e1);
}
diff --git a/pom.xml b/pom.xml
index 406eafd90..4a0ef5e40 100644
--- a/pom.xml
+++ b/pom.xml
@@ -152,7 +152,7 @@
6.5.0.202303070854-r
1.10.12
- 2.9.2
+ 2.10.0
0.1.55
1.1.3
1.2.3
@@ -179,6 +179,7 @@
2.13.0
2.2
3.24.2
+ 5.13.0
jacoco
@@ -210,10 +211,6 @@
repo.eclipse.org.dash-releases
https://repo.eclipse.org/content/repositories/dash-licenses-releases/
-
- repo.eclipse.org.dash-snapshots
- https://repo.eclipse.org/content/repositories/dash-licenses-snapshots/
-
@@ -396,7 +393,7 @@
org.eclipse.dash
license-tool-plugin
- 0.0.1-SNAPSHOT
+ 1.0.2
@@ -788,6 +785,18 @@
assertj-core
${assertj-version}