Browse Source

SystemReader: Use discoverGitSystemConfig() in openSystemConfig()

Bug: 410568
Change-Id: Id768294e83f374f50ae5e6486f4e757515c8262d
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
tags/v4.0.0.201505260635-rc2
Sebastian Schuberth 9 years ago
parent
commit
d9ffc03837
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java

+ 3
- 5
org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java View File

@@ -89,8 +89,8 @@ public abstract class SystemReader {
}

public FileBasedConfig openSystemConfig(Config parent, FS fs) {
File prefix = fs.gitPrefix();
if (prefix == null) {
File configFile = fs.discoverGitSystemConfig();
if (configFile == null) {
return new FileBasedConfig(null, fs) {
public void load() {
// empty, do not load
@@ -102,9 +102,7 @@ public abstract class SystemReader {
}
};
}
File etc = fs.resolve(prefix, "etc"); //$NON-NLS-1$
File config = fs.resolve(etc, "gitconfig"); //$NON-NLS-1$
return new FileBasedConfig(parent, config, fs);
return new FileBasedConfig(parent, configFile, fs);
}

public FileBasedConfig openUserConfig(Config parent, FS fs) {

Loading…
Cancel
Save