Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 19a9641

Browse files
Stopping watcher for git commit operations
1 parent 985c390 commit 19a9641

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/GitHub.Api/Git/RepositoryManager.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,20 @@ public int WaitForEvents()
173173

174174
public ITask CommitAllFiles(string message, string body)
175175
{
176-
var add = GitClient.AddAll();
177-
add.OnStart += t => IsBusy = true;
178-
return add
179-
.Then(GitClient.Commit(message, body))
180-
.Finally(() => IsBusy = false);
176+
var task = GitClient.AddAll()
177+
.Then(GitClient.Commit(message, body));
178+
179+
HookupHandlers(task, true);
180+
return task;
181181
}
182182

183183
public ITask CommitFiles(List<string> files, string message, string body)
184184
{
185-
var add = GitClient.Add(files);
186-
add.OnStart += t => IsBusy = true;
187-
return add
188-
.Then(GitClient.Commit(message, body))
189-
.Finally(() => IsBusy = false);
185+
var task = GitClient.Add(files)
186+
.Then(GitClient.Commit(message, body));
187+
188+
HookupHandlers(task, true);
189+
return task;
190190
}
191191

192192
public ITask<List<GitLogEntry>> Log()

0 commit comments

Comments
 (0)