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

Commit 0cd1013

Browse files
committed
Clarify why we need to do this manually
1 parent fa188d3 commit 0cd1013

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/GitHub.Api/Git/RepositoryManager.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,9 @@ public ITask DiscardChanges(GitStatusEntry[] gitStatusEntries)
332332
if (itemsToRevert.Any())
333333
{
334334
gitDiscardTask = GitClient.Discard(itemsToRevert);
335-
task
336-
.Then(gitDiscardTask)
337-
// we're appending a new continuation, we need to reset the finally handler
338-
// so it runs after the discard task
335+
task.Then(gitDiscardTask)
336+
// we're appending a new continuation after HookupHandlers has run,
337+
// we need to set the finally handler manually so it runs at the end of everything
339338
.Finally(s =>
340339
{
341340
watcher.Start();

0 commit comments

Comments
 (0)