예제 #1
0
        public ITask CommitAllFiles(string message, string body)
        {
            var task = GitClient.AddAll()
                       .Then(GitClient.Commit(message, body));

            return(HookupHandlers(task, true));
        }
예제 #2
0
        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();
        }
예제 #3
0
        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));
        }