public static IList<string> ListAllTagNames(RepositorySafeHandle repo)
        {
            UnSafeNativeMethods.git_strarray strArray;
            int res = UnSafeNativeMethods.git_tag_list(out strArray, repo);
            Ensure.Success(res);

            return BuildListOf(strArray);
        }
        public static IList<string> ListAllReferenceNames(RepositorySafeHandle repo, GitReferenceType types)
        {
            UnSafeNativeMethods.git_strarray strArray;
            int res = UnSafeNativeMethods.git_reference_list(out strArray, repo, types);
            Ensure.Success(res);

            return BuildListOf(strArray);
        }
Esempio n. 3
0
        public ObjectSafeWrapper(ObjectId id, RepositorySafeHandle handle, bool allowNullObjectId = false)
        {
            Ensure.ArgumentNotNull(handle, "handle");

            if (allowNullObjectId && id == null)
            {
                objectPtr = new NullGitObjectSafeHandle();
            }
            else
            {
                Ensure.ArgumentNotNull(id, "id");
                objectPtr = Proxy.git_object_lookup(handle, id, GitObjectType.Any);
            }
        }
 internal static extern int git_tag_list(out git_strarray array, RepositorySafeHandle repo);
 public static extern int git_remote_list(out git_strarray array, RepositorySafeHandle repo);
 public static extern int git_reference_list(out git_strarray array, RepositorySafeHandle repo, GitReferenceType flags);
 public static extern int git_branch_list(out git_strarray array, RepositorySafeHandle repo, GitBranchType flags);
 internal RawContentStream(ObjectId id, RepositorySafeHandle repo,
     Func<GitObjectSafeHandle, IntPtr> bytePtrProvider, long length)
     : this(new ObjectSafeWrapper(id, repo), bytePtrProvider, length)
 {
 }