From c3c78ddd9243aca1d03575c37672b767daaa503c Mon Sep 17 00:00:00 2001 From: Ivan Frade Date: Mon, 16 Sep 2024 12:44:00 -0700 Subject: 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 --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit.pgm/src/org') diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java index c95f1384e8..74e322ff7f 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java @@ -31,6 +31,7 @@ import org.eclipse.jgit.pgm.Command; import org.eclipse.jgit.pgm.TextBuiltin; import org.eclipse.jgit.revwalk.RevObject; import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.storage.pack.PackConfig; import org.eclipse.jgit.util.TemporaryBuffer; import org.kohsuke.args4j.Argument; @@ -68,7 +69,7 @@ class ShowPackDelta extends TextBuiltin { ObjectReuseAsIs asis = (ObjectReuseAsIs) reader; ObjectToPack target = asis.newObjectToPack(obj, obj.getType()); - PackWriter pw = new PackWriter(reader) { + PackWriter pw = new PackWriter(new PackConfig(), reader) { @Override public void select(ObjectToPack otp, StoredObjectRepresentation next) { otp.select(next); -- cgit v1.2.3