internal GitException(string message, string error, string output, int exitCode, string gitCommand) : base(message) { this.Error = error; this.Output = output; this.ExitCode = exitCode; this.GitError = GitParsing.ParseErrorCode(error); this.GitCommand = gitCommand; }
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 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 async Task <IEnumerable <GitFileStatus> > StatusAsync() => GitParsing.ParseStatus((await RunGitAsync(GitArguments.Status())).Output);