Пример #1
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));
            }
        }
Пример #2
0
 public Task <ExecutionResult> ArchiveAsync(string treeish, string output, GitArguments.ArchiveOptions options = default)
 => RunGitAsync(GitArguments.Archive(treeish, output, options));
Пример #3
0
 public async Task <IEnumerable <string> > ArchiveFormatListAsync()
 => GitParsing.ParseArchiveFormatList((await RunGitAsync(GitArguments.ArchiveFormatList())).Output);
Пример #4
0
 public async Task <GitObjectCount> CountObjectsAsync()
 => GitParsing.ParseCountObjects((await RunGitAsync(GitArguments.CountObjects())).Output);
Пример #5
0
 public Task <ExecutionResult> ConfigAsync(string key, string value = null, string scope = null)
 => RunGitAsync(GitArguments.Config(key, value, scope));
Пример #6
0
 public Task <ExecutionResult> RemoveAsync(IEnumerable <string> paths)
 => RunGitAsync(GitArguments.Remove(paths));
Пример #7
0
 public Task <ExecutionResult> AddAsync(IEnumerable <string> paths)
 => RunGitAsync(GitArguments.Add(paths));
Пример #8
0
 public Task <ExecutionResult> CheckoutNewBranchAsync(string branchName, bool force = false, string startPoint = null)
 => RunGitAsync(GitArguments.CheckoutNewBranch(branchName, force, startPoint));
Пример #9
0
 public Task <ExecutionResult> CheckoutAsync(string treeish, IEnumerable <string> paths = null, GitArguments.CheckoutOptions options = default)
 => RunGitAsync(GitArguments.Checkout(treeish, paths, options));
Пример #10
0
 public Task <ExecutionResult> CommitAsync(string message = "", GitArguments.CommitOptions options = default)
 => RunGitAsync(GitArguments.Commit(options), message);
Пример #11
0
 public Task <ExecutionResult> InitAsync()
 => RunGitAsync(GitArguments.Init());
Пример #12
0
 public async Task <IEnumerable <GitFileStatus> > StatusAsync()
 => GitParsing.ParseStatus((await RunGitAsync(GitArguments.Status())).Output);