public static IList<string> ListAllBranchNames(RepositorySafeHandle repo, GitBranchType types)
        {
            UnSafeNativeMethods.git_strarray strArray;
            int res = UnSafeNativeMethods.git_branch_list(out strArray, repo, types);
            Ensure.Success(res);

            return BuildListOf(strArray);
        }
示例#2
0
        public static IList <string> ListAllBranchNames(RepositorySafeHandle repo, GitBranchType types)
        {
            UnSafeNativeMethods.git_strarray strArray;
            int res = UnSafeNativeMethods.git_branch_list(out strArray, repo, types);

            Ensure.Success(res);

            return(BuildListOf(strArray));
        }
示例#3
0
        private static string branchToCanoncialName(IntPtr namePtr, GitBranchType branchType)
        {
            string shortName = Utf8Marshaler.FromNative(namePtr);

            switch (branchType)
            {
            case GitBranchType.GIT_BRANCH_LOCAL:
                return(ShortToLocalName(shortName));

            case GitBranchType.GIT_BRANCH_REMOTE:
                return(ShortToRemoteName(shortName));

            default:
                return(shortName);
            }
        }
示例#4
0
 public static extern int git_branch_delete(
     RepositorySafeHandle repo,
     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string branch_name,
     GitBranchType branch_type);
 public static extern int git_branch_list(out git_strarray array, RepositorySafeHandle repo, GitBranchType flags);
示例#6
0
 internal static extern int git_branch_foreach(
     RepositorySafeHandle repo,
     GitBranchType branch_type,
     branch_foreach_callback branch_cb,
     IntPtr payload);
示例#7
0
 public static extern int git_branch_list(out git_strarray array, RepositorySafeHandle repo, GitBranchType flags);