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