# Restore original file content when rejecting an overwritten file \(\#29974\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 210c338df4517741b699d32b582340447f106fd9

Requested commit: 210c338df4517741b699d32b582340447f106fd9

Commit: 210c338df4517741b699d32b582340447f106fd9

Tree: e0427f7244376ab097177116f7f6524ad7131903

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Restore original file content when rejecting an overwritten file (#29974)

Release Notes:

- Fixed a bug that would cause rejecting a hunk from the agent to delete
the file if the agent had decided to rewrite that file from scratch.
```

## Parents

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

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