Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static extern void OidFromString(ref GitOid oid, string hash);