Sep.Git.Tfs.Core.GitTfsRemote.IsIgnoringBranches C# (CSharp) Method

IsIgnoringBranches() public method

public IsIgnoringBranches ( ) : bool
return bool
        public bool IsIgnoringBranches()
        {
            var value = Repository.GetConfig<string>(GitTfsConstants.IgnoreBranches, null);
            bool isIgnoringBranches;
            if (value != null && bool.TryParse(value, out isIgnoringBranches))
                return isIgnoringBranches;

            Trace.TraceInformation("warning: no value found for branch management setting '" + GitTfsConstants.IgnoreBranches +
                             "'...");
            var isIgnoringBranchesDetected = Repository.ReadAllTfsRemotes().Count() < 2;
            Trace.TraceInformation("=> Branch support " + (isIgnoringBranchesDetected ? "disabled!" : "enabled!"));
            if (isIgnoringBranchesDetected)
                Trace.TraceInformation("   if you want to enable branch support, use the command:" + Environment.NewLine
                    + "    git config --local " + GitTfsConstants.IgnoreBranches + " false");
            _globals.Repository.SetConfig(GitTfsConstants.IgnoreBranches, isIgnoringBranchesDetected.ToString());
            return isIgnoringBranchesDetected;
        }