public async Task <IEnumerable <GitCommit> > LogAsync(GitArguments.LogOptions options = default, IEnumerable <string> paths = null) { var result = await RunGitAsync(GitArguments.Log(options, paths)); if (result.ExitCode == 1) { return(Enumerable.Empty <GitCommit>()); } else { return(GitParsing.ParseLog(result.Output)); } }
public Task <ExecutionResult> ArchiveAsync(string treeish, string output, GitArguments.ArchiveOptions options = default) => RunGitAsync(GitArguments.Archive(treeish, output, options));
public async Task <IEnumerable <string> > ArchiveFormatListAsync() => GitParsing.ParseArchiveFormatList((await RunGitAsync(GitArguments.ArchiveFormatList())).Output);
public async Task <GitObjectCount> CountObjectsAsync() => GitParsing.ParseCountObjects((await RunGitAsync(GitArguments.CountObjects())).Output);
public Task <ExecutionResult> ConfigAsync(string key, string value = null, string scope = null) => RunGitAsync(GitArguments.Config(key, value, scope));
public Task <ExecutionResult> RemoveAsync(IEnumerable <string> paths) => RunGitAsync(GitArguments.Remove(paths));
public Task <ExecutionResult> AddAsync(IEnumerable <string> paths) => RunGitAsync(GitArguments.Add(paths));
public Task <ExecutionResult> CheckoutNewBranchAsync(string branchName, bool force = false, string startPoint = null) => RunGitAsync(GitArguments.CheckoutNewBranch(branchName, force, startPoint));
public Task <ExecutionResult> CheckoutAsync(string treeish, IEnumerable <string> paths = null, GitArguments.CheckoutOptions options = default) => RunGitAsync(GitArguments.Checkout(treeish, paths, options));
public Task <ExecutionResult> CommitAsync(string message = "", GitArguments.CommitOptions options = default) => RunGitAsync(GitArguments.Commit(options), message);
public Task <ExecutionResult> InitAsync() => RunGitAsync(GitArguments.Init());
public async Task <IEnumerable <GitFileStatus> > StatusAsync() => GitParsing.ParseStatus((await RunGitAsync(GitArguments.Status())).Output);