# Clear pending staged/unstaged diff hunks hunks when writing to the git index fails \(\#26173\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/314ad5dd5fd56ef6cb96c1c762decabafaf91d34)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 314ad5dd5fd56ef6cb96c1c762decabafaf91d34

Requested commit: 314ad5dd5fd56ef6cb96c1c762decabafaf91d34

Commit: 314ad5dd5fd56ef6cb96c1c762decabafaf91d34

Tree: 148c979b71b180ba89a02782932cfe2571a8e78f

Author: Max Brunsfeld

Committer: GitHub

## Message

```
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.
```

## Parents

- [d3c68650c079917e873eb3347f7b04d0277c99dc](https://git.cafe/gitcafe/zed/commit/d3c68650c079917e873eb3347f7b04d0277c99dc?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/314ad5dd5fd56ef6cb96c1c762decabafaf91d34?format=markdown)
