public ITask CommitAllFiles(string message, string body) { var task = GitClient.AddAll() .Then(GitClient.Commit(message, body)); return(HookupHandlers(task, true)); }
private void Commit() { // Do not allow new commits before we have received one successful update busy = true; var files = Enumerable.Range(0, tree.Entries.Count) .Where(i => tree.CommitTargets[i].All) .Select(i => tree.Entries[i].Path) .ToArray(); ITask <string> addTask; if (files.Length == tree.Entries.Count) { addTask = GitClient.AddAll(); } else { addTask = GitClient.Add(files); } addTask .Then(GitClient.Commit(commitMessage, commitBody)) .Then(GitClient.Status()) .FinallyInUI((b, exception) => { commitMessage = ""; commitBody = ""; busy = false; }).Start(); }
public ITask CommitAllFiles(string message, string body) { var add = GitClient.AddAll(); add.OnStart += t => IsBusy = true; return(add .Then(GitClient.Commit(message, body)) .Finally(() => IsBusy = false)); }