# Support hunk-wise \`StageAndNext\` and \`UnstageAndNext\` \(\#25845\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a2876f5d3e88553724ce8eaf2aaa9a0069f39d83

Requested commit: a2876f5d3e88553724ce8eaf2aaa9a0069f39d83

Commit: a2876f5d3e88553724ce8eaf2aaa9a0069f39d83

Tree: b88fd2ad53e53486be41ef24b703edcd1d2cdf89

Author: João Marcos

Committer: GitHub

## Message

```
Support hunk-wise `StageAndNext` and `UnstageAndNext` (#25845)

This PR adds the `whole_excerpt` field to the actions:

- `git::StageAndNext`
- `git::UnstageAndNext`

Which is set by false by default, effectively, now staging and unstaging
with these actions is done hunk-by-hunk, this also affects the `Stage`
and
`Unstage` buttons in the Diff View toolbar.

A caveat: with this PR, there is no way to configure the buttons in the
Diff
View toolbar to restore the previous behavior, if we want, I think we
can make
it a setting, but let's see if anyone really wants that.

Release Notes:

- N/A
```

## Parents

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

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