public virtual string GetTreeSha(string commitish) { IntPtr objHandle; if (Native.RevParseSingle(out objHandle, this.RepoHandle, commitish) != Native.SuccessCode) { return(null); } try { switch (Native.Object.GetType(objHandle)) { case Native.ObjectTypes.Commit: GitOid output = Native.IntPtrToGitOid(Native.Commit.GetTreeId(objHandle)); return(output.ToString()); } } finally { Native.Object.Free(objHandle); } return(null); }
public static extern void OidFromString(ref GitOid oid, string hash);