GitCommands.GitCommands.SetGlobalSetting C# (CSharp) Method

SetGlobalSetting() public method

public SetGlobalSetting ( string setting, string value ) : void
setting string
value string
return void
        public void SetGlobalSetting(string setting, string value)
        {
            var configFile = GetGlobalConfig();
            configFile.SetValue(setting, value);
            configFile.Save();
        }

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::SetGlobalSetting
GitCommands