public Tag(LibGit2Sharp.Tag tag) { FriendlyName = tag.FriendlyName; IsAnnotated = tag.IsAnnotated; AnnotatedMessage = IsAnnotated ? tag.Annotation.Message : string.Empty; TargetSha = tag.Target.Sha; }
/// <summary> /// Creates a new tag. /// </summary> /// <param name="repo"></param> /// <param name="tag"></param> /// <returns></returns> public static Tag Create(LibGit2Sharp.Repository repo, LibGit2Sharp.Tag tag) { Tag newTag = new Tag { CanonicalName = tag.CanonicalName, Name = tag.Name, //Annotation = tag.Annotation, IsAnnotated = false, //tag.IsAnnotated, TargetSha = tag.Target.Sha, HasCommitAsTarget = tag.Target.GetType().FullName == "LibGit2Sharp.Commit" }; return(newTag); }