]> source.dussan.org Git - jgit.git/commitdiff
DfsInserter: Create PackConfig from repo instead of repo.conf 35/1201735/1
authorIvan Frade <ifrade@google.com>
Tue, 24 Sep 2024 22:23:04 +0000 (15:23 -0700)
committerIvan Frade <ifrade@google.com>
Tue, 24 Sep 2024 22:23:04 +0000 (15:23 -0700)
PackConfig can be constructed from the repo or from a config. While
browing the code, it is easier to follow the provenance of the
configuration when using the repository constructor.

Use the PackConfig(Repository) constructor in the
DfsInserter. Internally it calls PackConfig(repo.getConfig()) so this
should be a noop.

Change-Id: Ifce5bc87404ca8ec9a821d28253d489056faad9a

org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java

index a07d8416c4f1b5aa062d025c221b7be554c1e16b..86fbd445be410fde3c565b2f9994ca713949a743 100644 (file)
@@ -93,7 +93,7 @@ public class DfsInserter extends ObjectInserter {
         */
        protected DfsInserter(DfsObjDatabase db) {
                this.db = db;
-               PackConfig pc = new PackConfig(db.getRepository().getConfig());
+               PackConfig pc = new PackConfig(db.getRepository());
                this.minBytesForObjectSizeIndex = pc.getMinBytesForObjSizeIndex();
        }