GitCommands.GitModule.GetRemoteBranch C# (CSharp) Method

GetRemoteBranch() public method

Gets the remote branch of the specified local branch; or "" if none is configured.
public GetRemoteBranch ( string branch ) : string
branch string
return string
        public string GetRemoteBranch(string branch)
        {
            string remote = GetSetting(string.Format("branch.{0}.remote", branch));
            string merge = GetSetting(string.Format("branch.{0}.merge", branch));
            if (String.IsNullOrEmpty(remote) || String.IsNullOrEmpty(merge))
                return "";
            return remote + "/" + (merge.StartsWith("refs/heads/") ? merge.Substring(11) : merge);
        }
GitModule