Clear pending staged/unstaged diff hunks hunks when writing to the git index fails (#26173)
Release Notes: - Git Beta: Fixed a bug where discarding a hunk in the project diff view performed two concurrent saves of the buffer. - Git Beta: Fixed an issue where diff hunks appeared in the wrong state after failing to write to the git index.
This commit is contained in:
parent
d3c68650c0
commit
314ad5dd5f
14 changed files with 534 additions and 143 deletions
|
@ -307,6 +307,13 @@ impl GitPanel {
|
|||
this.active_repository = git_store.read(cx).active_repository();
|
||||
this.schedule_update(true, window, cx);
|
||||
}
|
||||
GitEvent::IndexWriteError(error) => {
|
||||
this.workspace
|
||||
.update(cx, |workspace, cx| {
|
||||
workspace.show_error(error, cx);
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
},
|
||||
)
|
||||
.detach();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue