GitCommands.GitCommands.GetGlobalSetting C# (CSharp) Method

GetGlobalSetting() public method

public GetGlobalSetting ( string setting ) : string
setting string
return string
        public string GetGlobalSetting(string setting)
        {
            var configFile = GetGlobalConfig();
            return configFile.GetValue(setting);
        }

Usage Example

Example #1
0
        public static bool SolveKDiff()
        {
            GitCommands.GitCommands gitCommands = new GitCommands.GitCommands();
            string mergeTool = gitCommands.GetGlobalSetting("merge.tool");
            if (string.IsNullOrEmpty(mergeTool))
            {
                mergeTool = "kdiff3";
                gitCommands.SetGlobalSetting("merge.tool", mergeTool);
            }

            if (mergeTool.Equals("kdiff3", StringComparison.CurrentCultureIgnoreCase))
                return SolveKDiffPath(gitCommands);

            return true;
        }
All Usage Examples Of GitCommands.GitCommands::GetGlobalSetting
GitCommands