# git: Fix git amend on panel \(\#38681\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 271d67f7adde107a728fe2e9d4cb964ac91cd15b

Requested commit: 271d67f7adde107a728fe2e9d4cb964ac91cd15b

Commit: 271d67f7adde107a728fe2e9d4cb964ac91cd15b

Tree: 94e85f900c2587edf12af593e9eb276ac1b47b81

Author: Alvaro Parker

Committer: GitHub

## Message

```
git: Fix git amend on panel (#38681)

Closes #38651 

`git_panel.set_amend_pending(false, cx);` was being called before
`git_panel.commit_changes(...)` which was causing the commit buffer to
be cleared/reset before actually sending the commit request to git.

Introduced by #35268 which added clear buffer functionality to the
`set_amend_pending` function.

Release Notes:

- Fix git amend on panel sending "Update ..." instead of the original
commit message
- FIx git amend button not working
```

## Parents

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

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