GitCommands.CommitInformation.GetAllTagsWhichContainGivenCommit C# (CSharp) Method

GetAllTagsWhichContainGivenCommit() public static method

Gets all tags which contain the given commit.
public static GetAllTagsWhichContainGivenCommit ( string sha1 ) : IEnumerable
sha1 string The sha1.
return IEnumerable
        public static IEnumerable<string> GetAllTagsWhichContainGivenCommit(string sha1)
        {
            string info = GitCommands.RunCmd(Settings.GitCommand, "tag --contains " + sha1);

            if (info.Trim().StartsWith("fatal") || info.Trim().StartsWith("error:"))
                return new List<string>();
            return info.Split(new[] { '\r', '\n', '*', ' ' }, StringSplitOptions.RemoveEmptyEntries);
        }