GitCommands.GitModule.GetRemoteServerRefs C# (CSharp) Method

GetRemoteServerRefs() public method

public GetRemoteServerRefs ( string remote, bool tags, bool branches ) : RemoteActionResult>
remote string
tags bool
branches bool
return RemoteActionResult>
        public RemoteActionResult<IList<IGitRef>> GetRemoteServerRefs(string remote, bool tags, bool branches)
        {
            var result = new RemoteActionResult<IList<IGitRef>>()
            {
                AuthenticationFail = false,
                HostKeyFail = false,
                Result = null
            };

            remote = remote.ToPosixPath();

            result.CmdResult = GetTreeFromRemoteRefs(remote, tags, branches);

            var tree = result.CmdResult.StdOutput;
            // If the authentication failed because of a missing key, ask the user to supply one.
            if (tree.Contains("FATAL ERROR") && tree.Contains("authentication"))
            {
                result.AuthenticationFail = true;
            }
            else if (tree.ToLower().Contains("the server's host key is not cached in the registry"))
            {
                result.HostKeyFail = true;
            }
            else if (result.CmdResult.ExitedSuccessfully)
            {
                result.Result = GetTreeRefs(tree);
            }

            return result;
        }
GitModule