예제 #1
0
        public static ConfigFileSettings CreateGlobal(bool allowCache = true)
        {
            string configPath = Path.Combine(GitCommandHelpers.GetHomeDir(), ".config", "git", "config");

            if (!File.Exists(configPath))
            {
                configPath = Path.Combine(GitCommandHelpers.GetHomeDir(), ".gitconfig");
            }

            return(new ConfigFileSettings(null,
                                          ConfigFileSettingsCache.Create(configPath, false, allowCache)));
        }
예제 #2
0
 private static ConfigFileSettings CreateLocal(GitModule aModule, ConfigFileSettings aLowerPriority, bool allowCache = true)
 {
     return(new ConfigFileSettings(aLowerPriority,
                                   ConfigFileSettingsCache.Create(Path.Combine(aModule.WorkingDirGitDir(), "config"), true, allowCache)));
 }