aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/lib
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2012-01-05 10:15:55 -0500
committerCode Review <codereview-daemon@eclipse.org>2012-01-05 10:15:55 -0500
commitf9726423abd861c66bbd86bd4cba90260a6d9fe4 (patch)
tree4aad67c8a7d193a9de07c7a7ded2ccd69b82d3d3 /org.eclipse.jgit/src/org/eclipse/jgit/lib
parent69451b8302e9e46b9b2615de1d5b64c83158ea47 (diff)
parent6c959f77027434f39ecfb6b7c59bb964fe51824b (diff)
downloadjgit-f9726423abd861c66bbd86bd4cba90260a6d9fe4.tar.gz
jgit-f9726423abd861c66bbd86bd4cba90260a6d9fe4.zip
Merge "Use constants from ConfigConstants in CoreConfig"
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java9
2 files changed, 15 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
index ce11e66630..237fb66d0a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
@@ -75,6 +75,9 @@ public class ConfigConstants {
/** The "submodule" section */
public static final String CONFIG_SUBMODULE_SECTION = "submodule";
+ /** The "pack" section */
+ public static final String CONFIG_PACK_SECTION = "pack";
+
/** The "algorithm" key */
public static final String CONFIG_KEY_ALGORITHM = "algorithm";
@@ -169,4 +172,10 @@ public class ConfigConstants {
/** The "update" key */
public static final String CONFIG_KEY_UPDATE = "update";
+
+ /** The "compression" key */
+ public static final String CONFIG_KEY_COMPRESSION = "compression";
+
+ /** The "indexversion" key */
+ public static final String CONFIG_KEY_INDEXVERSION = "indexversion";
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
index 2d9f44aad8..23aca37948 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
@@ -83,9 +83,12 @@ public class CoreConfig {
private final String excludesfile;
private CoreConfig(final Config rc) {
- compression = rc.getInt("core", "compression", DEFAULT_COMPRESSION);
- packIndexVersion = rc.getInt("pack", "indexversion", 2);
- logAllRefUpdates = rc.getBoolean("core", "logallrefupdates", true);
+ compression = rc.getInt(ConfigConstants.CONFIG_CORE_SECTION,
+ ConfigConstants.CONFIG_KEY_COMPRESSION, DEFAULT_COMPRESSION);
+ packIndexVersion = rc.getInt(ConfigConstants.CONFIG_PACK_SECTION,
+ ConfigConstants.CONFIG_KEY_INDEXVERSION, 2);
+ logAllRefUpdates = rc.getBoolean(ConfigConstants.CONFIG_CORE_SECTION,
+ ConfigConstants.CONFIG_KEY_LOGALLREFUPDATES, true);
excludesfile = rc.getString(ConfigConstants.CONFIG_CORE_SECTION, null,
ConfigConstants.CONFIG_KEY_EXCLUDESFILE);
}