Browse Source

Use Config.getEnum() to read the IgnoreSubmoduleMode

Doing so goes through the TypedConfigGetter and thus allows library
clients (for instance EGit) to warn about invalid configurations.

Change-Id: If1080ad90b8aff54a903d4d75637614faad6469b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
stable-4.9
Thomas Wolf 7 years ago committed by Matthias Sohn
parent
commit
6d27869659
  1. 9
      org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java

9
org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java

@ -45,7 +45,6 @@ package org.eclipse.jgit.submodule;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.HashMap;
import java.util.Map;
@ -691,13 +690,9 @@ public class SubmoduleWalk implements AutoCloseable {
public IgnoreSubmoduleMode getModulesIgnore() throws IOException,
ConfigInvalidException {
lazyLoadModulesConfig();
String name = modulesConfig.getString(
return modulesConfig.getEnum(IgnoreSubmoduleMode.values(),
ConfigConstants.CONFIG_SUBMODULE_SECTION, getModuleName(path),
ConfigConstants.CONFIG_KEY_IGNORE);
if (name == null)
return null;
return IgnoreSubmoduleMode
.valueOf(name.trim().toUpperCase(Locale.ROOT));
ConfigConstants.CONFIG_KEY_IGNORE, IgnoreSubmoduleMode.NONE);
}
/**

Loading…
Cancel
Save