diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-06-23 10:11:34 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-06-23 17:29:38 -0700 |
commit | e1b312b5f7e1010c3633df2582f6a20373becdf3 (patch) | |
tree | d1fb4390c518a86efa036183e45fa77dd06d426c /org.eclipse.jgit/src/org/eclipse/jgit/transport | |
parent | 8e396bcddc2c945a2a90f6842c1a481a16c7be52 (diff) | |
download | jgit-e1b312b5f7e1010c3633df2582f6a20373becdf3.tar.gz jgit-e1b312b5f7e1010c3633df2582f6a20373becdf3.zip |
Use CoreConfig, UserConfig and TransferConfig directly
Rather than relying on the helpers in RepositoryConfig to get
these objects, obtain them directly through the Config API.
Its only slightly more verbose, but permits us to work with the
base Config class, which is more flexible than the highly file
specific RepositoryConfig.
This is what I really meant to do when I added the section parser
and caching support to Config, we just failed to finish updating
all of the call sites.
Change-Id: I481cb365aa00bfa8c21e5ad0cd367ddd9c6c0edd
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java | 4 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java index 2a5b4344f5..f6e04107f6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java @@ -67,6 +67,7 @@ import org.eclipse.jgit.errors.MissingObjectException; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.BinaryDelta; import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.CoreConfig; import org.eclipse.jgit.lib.InflaterCache; import org.eclipse.jgit.lib.MutableObjectId; import org.eclipse.jgit.lib.ObjectChecker; @@ -127,7 +128,8 @@ public class IndexPack { base = new File(objdir, n.substring(0, n.length() - suffix.length())); final IndexPack ip = new IndexPack(db, is, base); - ip.setIndexVersion(db.getConfig().getCore().getPackIndexVersion()); + ip.setIndexVersion(db.getConfig().get(CoreConfig.KEY) + .getPackIndexVersion()); return ip; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java index e1988a6c85..a8e47afd38 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java @@ -566,7 +566,7 @@ public abstract class Transport { * URI passed to {@link #open(Repository, URIish)}. */ protected Transport(final Repository local, final URIish uri) { - final TransferConfig tc = local.getConfig().getTransfer(); + final TransferConfig tc = local.getConfig().get(TransferConfig.KEY); this.local = local; this.uri = uri; this.checkFetchedObjects = tc.isFsckObjects(); |