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 6f0ea18d2..0d139c1b7 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 @@ -744,7 +744,7 @@ public class DfsGarbageCollector { return; } - try (ReftableStack stack = ReftableStack.open(ctx, reftablesBefore)) { + try (DfsReftableStack stack = DfsReftableStack.open(ctx, reftablesBefore)) { ReftableCompactor compact = new ReftableCompactor(); compact.addAll(stack.readers()); compact.setIncludeDeletes(includeDeletes); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java index 6f3f2bd8e..8cf66b159 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java @@ -311,7 +311,7 @@ public class DfsPackCompactor { DfsObjDatabase objdb = repo.getObjectDatabase(); Collections.sort(srcReftables, objdb.reftableComparator()); - try (ReftableStack stack = ReftableStack.open(ctx, srcReftables)) { + try (DfsReftableStack stack = DfsReftableStack.open(ctx, srcReftables)) { initOutDesc(objdb); ReftableCompactor compact = new ReftableCompactor(); compact.addAll(stack.readers()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java index fc8320fee..cf3c71d43 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java @@ -85,7 +85,7 @@ public class DfsReftableDatabase extends DfsRefDatabase { private DfsReader ctx; - private ReftableStack tableStack; + private DfsReftableStack tableStack; private MergedReftable mergedTables; @@ -173,7 +173,7 @@ public class DfsReftableDatabase extends DfsRefDatabase { * @throws java.io.IOException * if tables cannot be opened. */ - protected ReftableStack stack() throws IOException { + protected DfsReftableStack stack() throws IOException { lock.lock(); try { if (tableStack == null) { @@ -181,7 +181,7 @@ public class DfsReftableDatabase extends DfsRefDatabase { if (ctx == null) { ctx = odb.newReader(); } - tableStack = ReftableStack.open(ctx, + tableStack = DfsReftableStack.open(ctx, Arrays.asList(odb.getReftables())); } return tableStack; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableStack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableStack.java similarity index 94% rename from org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableStack.java rename to org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableStack.java index 50ba0e0f3..b6b540388 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableStack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableStack.java @@ -54,7 +54,7 @@ import org.eclipse.jgit.internal.storage.reftable.Reftable; * Tracks multiple open * {@link org.eclipse.jgit.internal.storage.reftable.Reftable} instances. */ -public class ReftableStack implements AutoCloseable { +public class DfsReftableStack implements AutoCloseable { /** * Opens a stack of tables for reading. * @@ -67,9 +67,9 @@ public class ReftableStack implements AutoCloseable { * @throws java.io.IOException * a table could not be opened */ - public static ReftableStack open(DfsReader ctx, List files) + public static DfsReftableStack open(DfsReader ctx, List files) throws IOException { - ReftableStack stack = new ReftableStack(files.size()); + DfsReftableStack stack = new DfsReftableStack(files.size()); boolean close = true; try { for (DfsReftable t : files) { @@ -88,7 +88,7 @@ public class ReftableStack implements AutoCloseable { private final List files; private final List tables; - private ReftableStack(int tableCnt) { + private DfsReftableStack(int tableCnt) { this.files = new ArrayList<>(tableCnt); this.tables = new ArrayList<>(tableCnt); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java index 682e15664..090c8b3cd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/ReftableBatchRefUpdate.java @@ -405,7 +405,7 @@ public class ReftableBatchRefUpdate extends BatchRefUpdate { private boolean canCompactTopOfStack(ReftableConfig cfg) throws IOException { - ReftableStack stack = refdb.stack(); + DfsReftableStack stack = refdb.stack(); List readers = stack.readers(); if (readers.isEmpty()) { return false;