diff options
author | Ivan Frade <ifrade@google.com> | 2024-09-16 12:44:00 -0700 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-09-16 12:44:00 -0700 |
commit | c3c78ddd9243aca1d03575c37672b767daaa503c (patch) | |
tree | e75b44000369cedc6dec430c42485e36ff4b570b /org.eclipse.jgit.test | |
parent | 77e7479a36e5e9742043d0c54a02119a1097f623 (diff) | |
download | jgit-c3c78ddd9243aca1d03575c37672b767daaa503c.tar.gz jgit-c3c78ddd9243aca1d03575c37672b767daaa503c.zip |
PackWriter: Remove constructor with only Reader as param
At construction time, PackWriter receives the PackConfig as a
parameter or reads it from the repository. The only exception is when
the constructor receives only a reader (no repo nor conf
provided?!).
Remove PackWriter(Reader) and let callers be explicit what conf to
use. This makes clearer the flow of conf in the PackWriter.
Change-Id: If12e122797ffc8c44fc3c435ca1b000ca016645b
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsPackFileTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsPackFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsPackFileTest.java index bc851f8dde..9680019f88 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsPackFileTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsPackFileTest.java @@ -41,6 +41,7 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.NullProgressMonitor; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.storage.pack.PackConfig; import org.eclipse.jgit.transport.ReceiveCommand; import org.junit.Before; import org.junit.Test; @@ -309,7 +310,7 @@ public class DfsPackFileTest { private void assertPackSize() throws IOException { try (DfsReader ctx = db.getObjectDatabase().newReader(); - PackWriter pw = new PackWriter(ctx); + PackWriter pw = new PackWriter(new PackConfig(), ctx); ByteArrayOutputStream os = new ByteArrayOutputStream(); PackOutputStream out = new PackOutputStream( NullProgressMonitor.INSTANCE, os, pw)) { |