The user's ~/.gitconfig file is a file, but not a repository specific file. Since RepositoryConfig has been refactored into base classes that handle file based configuration, we no longer need to use the RepositoryConfig type to access ~/.gitconfig. Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> --- .../src/org/spearce/jgit/lib/RepositoryConfig.java | 4 ++-- .../src/org/spearce/jgit/util/SystemReader.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java index 9be7c1b..5c912b7 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java @@ -60,7 +60,7 @@ * @return a new configuration instance to read the user's global * configuration file from their home directory. */ - public static RepositoryConfig openUserConfig() { + public static FileBasedConfig openUserConfig() { return SystemReader.getInstance().openUserConfig(); } @@ -85,7 +85,7 @@ public static RepositoryConfig openUserConfig() { * @param cfgLocation * path of the file to load (or save). */ - public RepositoryConfig(final RepositoryConfig base, final File cfgLocation) { + public RepositoryConfig(final Config base, final File cfgLocation) { super(base, cfgLocation); } diff --git a/org.spearce.jgit/src/org/spearce/jgit/util/SystemReader.java b/org.spearce.jgit/src/org/spearce/jgit/util/SystemReader.java index 36c188c..a30dfef 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/util/SystemReader.java +++ b/org.spearce.jgit/src/org/spearce/jgit/util/SystemReader.java @@ -41,6 +41,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; +import org.spearce.jgit.lib.FileBasedConfig; import org.spearce.jgit.lib.RepositoryConfig; /** @@ -63,7 +64,7 @@ public String getProperty(String key) { return System.getProperty(key); } - public RepositoryConfig openUserConfig() { + public FileBasedConfig openUserConfig() { final File home = FS.userHome(); return new RepositoryConfig(null, new File(home, ".gitconfig")); } @@ -119,5 +120,5 @@ public static void setInstance(SystemReader newReader) { /** * @return the git configuration found in the user home */ - public abstract RepositoryConfig openUserConfig(); + public abstract FileBasedConfig openUserConfig(); } -- 1.6.4.rc2.216.g769fa -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html