]> source.dussan.org Git - jgit.git/commitdiff
SystemReader: Use discoverGitSystemConfig() in openSystemConfig() 46/48146/6
authorSebastian Schuberth <sschuberth@gmail.com>
Tue, 19 May 2015 09:30:03 +0000 (11:30 +0200)
committerSebastian Schuberth <sschuberth@gmail.com>
Fri, 22 May 2015 07:37:34 +0000 (09:37 +0200)
Bug: 410568
Change-Id: Id768294e83f374f50ae5e6486f4e757515c8262d
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java

index f6f415e85bb1e2b79ea070abe2e7bf3f3c929814..04a7051a720d8bd369f7eb82757820c52e4aec90 100644 (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) {