Example #1
0
 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;
 }
Example #2
0
        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));
            }
        }
Example #3
0
 public async Task <IEnumerable <string> > ArchiveFormatListAsync()
 => GitParsing.ParseArchiveFormatList((await RunGitAsync(GitArguments.ArchiveFormatList())).Output);
Example #4
0
 public async Task <GitObjectCount> CountObjectsAsync()
 => GitParsing.ParseCountObjects((await RunGitAsync(GitArguments.CountObjects())).Output);
Example #5
0
 public async Task <IEnumerable <GitFileStatus> > StatusAsync()
 => GitParsing.ParseStatus((await RunGitAsync(GitArguments.Status())).Output);