public static void Fetch(this IRepository repository, IEnumerable <Remote> remotes, CredentialsHandler credentials, IEventStream?eventStream = null, bool prune = false) { foreach (var remote in remotes) { Git.Fetch( (Repository)repository, remote.Name, remote.FetchRefSpecs.Select(x => x.Specification), new FetchOptions { Prune = prune, CredentialsProvider = credentials, OnProgress = serverProgressOutput => { eventStream?.Push(new Status(serverProgressOutput)); return(true); }, OnTransferProgress = progress => { eventStream?.Push(new Status($"Received {progress.ReceivedObjects} of {progress.TotalObjects}", progress.ReceivedObjects / (float)progress.TotalObjects)); return(true); } }, string.Empty); } }
public static void Stage(this IRepository repository, string filepath) => Git.Stage(repository, filepath);
public static void Remove(this IRepository repository, string filepath) => Git.Remove(repository, filepath);
public static void Checkout(this IRepository repository, Branch branch) => Git.Checkout(repository, branch);