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