GitCommands.GitModule.GetTagMessage C# (CSharp) Method

GetTagMessage() public method

Returns tag's message. If the lightweight tag is passed, corresponding commit message is returned.
public GetTagMessage ( string tag ) : string
tag string
return string
        public string GetTagMessage(string tag)
        {
            if (string.IsNullOrWhiteSpace(tag))
                return null;

            tag = tag.Trim();

            string info = RunGitCmd("tag -l -n10 " + tag, SystemEncoding);

            if (info.Trim().StartsWith("fatal") || info.Trim().StartsWith("error:"))
                return null;

            if (!info.StartsWith(tag))
                return null;

            info = info.Substring(tag.Length).Trim();
            if (info.Length == 0)
                return null;

            return info;
        }
GitModule