LibGit2Sharp.Repository.HasObject C# (CSharp) Метод

HasObject() публичный Метод

Tells if the specified sha exists in the repository. Exceptions: ArgumentException ArgumentNullException
public HasObject ( string sha ) : bool
sha string The sha.
Результат bool
        public bool HasObject(string sha)
        {
            var id = new ObjectId(sha);

            IntPtr odb = NativeMethods.git_repository_database(handle);
            GitOid oid = id.Oid;
            return NativeMethods.git_odb_exists(odb, ref oid);
        }