internal static GitObject CreateFromPtr(IntPtr obj, ObjectId id, Repository repo) { try { GitObjectType type = NativeMethods.git_object_type(obj); switch (type) { case GitObjectType.Commit: return(Commit.BuildFromPtr(obj, id, repo)); case GitObjectType.Tree: return(Tree.BuildFromPtr(obj, id, repo)); case GitObjectType.Tag: return(TagAnnotation.BuildFromPtr(obj, id, repo)); case GitObjectType.Blob: return(Blob.BuildFromPtr(obj, id, repo)); default: throw new LibGit2Exception(string.Format(CultureInfo.InvariantCulture, "Unexpected type '{0}' for object '{1}'.", type, id)); } } finally { NativeMethods.git_object_close(obj); } }
public TagAnnotationVertex(TagAnnotation tagAnnotation) : base(tagAnnotation) { Message = tagAnnotation.Message; }