Browse Source

Use constants from ConfigConstants in CoreConfig

Change-Id: Ic1253498ecdd7545c6b1f114f4c83a3b77273874
stable-1.3
Kevin Sawicki 13 years ago
parent
commit
6c959f7702
  1. 9
      org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
  2. 9
      org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java

9
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java

@ -75,6 +75,9 @@ public class ConfigConstants {
/** The "submodule" section */ /** The "submodule" section */
public static final String CONFIG_SUBMODULE_SECTION = "submodule"; public static final String CONFIG_SUBMODULE_SECTION = "submodule";
/** The "pack" section */
public static final String CONFIG_PACK_SECTION = "pack";
/** The "algorithm" key */ /** The "algorithm" key */
public static final String CONFIG_KEY_ALGORITHM = "algorithm"; public static final String CONFIG_KEY_ALGORITHM = "algorithm";
@ -169,4 +172,10 @@ public class ConfigConstants {
/** The "update" key */ /** The "update" key */
public static final String CONFIG_KEY_UPDATE = "update"; 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";
} }

9
org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java

@ -83,9 +83,12 @@ public class CoreConfig {
private final String excludesfile; private final String excludesfile;
private CoreConfig(final Config rc) { private CoreConfig(final Config rc) {
compression = rc.getInt("core", "compression", DEFAULT_COMPRESSION); compression = rc.getInt(ConfigConstants.CONFIG_CORE_SECTION,
packIndexVersion = rc.getInt("pack", "indexversion", 2); ConfigConstants.CONFIG_KEY_COMPRESSION, DEFAULT_COMPRESSION);
logAllRefUpdates = rc.getBoolean("core", "logallrefupdates", true); 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, excludesfile = rc.getString(ConfigConstants.CONFIG_CORE_SECTION, null,
ConfigConstants.CONFIG_KEY_EXCLUDESFILE); ConfigConstants.CONFIG_KEY_EXCLUDESFILE);
} }

Loading…
Cancel
Save