SystemReader: Respect passed-in parent when no system config is present

The default implementation of openSystemConfig has special handling for
when the FS returns null from getGitSystemConfig: it should return a
"real" FileBasedConfig instance that never actually tries to load a
file. However, this codepath was not respecting the passed-in parent
config.

Change-Id: Id0bcdc93bb42f9ebe3f5ee4c6b4be8863e0133f9
This commit is contained in:
Dave Borowitz 2019-05-23 13:56:00 -07:00
parent 1342942cc8
commit 04bd5821e9
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ public String getProperty(String key) {
public FileBasedConfig openSystemConfig(Config parent, FS fs) {
File configFile = fs.getGitSystemConfig();
if (configFile == null) {
return new FileBasedConfig(null, fs) {
return new FileBasedConfig(parent, null, fs) {
@Override
public void load() {
// empty, do not load