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 724975bb2..083124e5e 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,9 +311,9 @@ public class DfsPackCompactor { DfsObjDatabase objdb = repo.getObjectDatabase(); Collections.sort(srcReftables, objdb.reftableComparator()); + initOutDesc(objdb); try (DfsReftableStack stack = DfsReftableStack.open(ctx, srcReftables); DfsOutputStream out = objdb.writeFile(outDesc, REFTABLE)) { - initOutDesc(objdb); ReftableCompactor compact = new ReftableCompactor(out); compact.addAll(stack.readers()); compact.setIncludeDeletes(true);