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>
This commit is contained in:
parent
cb12f4f0ad
commit
d9ffc03837
|
@ -89,8 +89,8 @@ public String getProperty(String key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileBasedConfig openSystemConfig(Config parent, FS fs) {
|
public FileBasedConfig openSystemConfig(Config parent, FS fs) {
|
||||||
File prefix = fs.gitPrefix();
|
File configFile = fs.discoverGitSystemConfig();
|
||||||
if (prefix == null) {
|
if (configFile == null) {
|
||||||
return new FileBasedConfig(null, fs) {
|
return new FileBasedConfig(null, fs) {
|
||||||
public void load() {
|
public void load() {
|
||||||
// empty, do not load
|
// empty, do not load
|
||||||
|
@ -102,9 +102,7 @@ public boolean isOutdated() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
File etc = fs.resolve(prefix, "etc"); //$NON-NLS-1$
|
return new FileBasedConfig(parent, configFile, fs);
|
||||||
File config = fs.resolve(etc, "gitconfig"); //$NON-NLS-1$
|
|
||||||
return new FileBasedConfig(parent, config, fs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileBasedConfig openUserConfig(Config parent, FS fs) {
|
public FileBasedConfig openUserConfig(Config parent, FS fs) {
|
||||||
|
|
Loading…
Reference in New Issue