Merge "Use constants from ConfigConstants in CoreConfig"

This commit is contained in:
Matthias Sohn 2012-01-05 10:15:55 -05:00 committed by Code Review
commit f9726423ab
2 changed files with 15 additions and 3 deletions

View File

@ -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";
}

View File

@ -83,9 +83,12 @@ public static enum AutoCRLF {
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);
}