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
This commit is contained in:
João Marcos 2025-02-28 23:39:08 -03:00 committed by GitHub
parent 13deaa3f69
commit a2876f5d3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 93 additions and 35 deletions

View file

@ -399,6 +399,8 @@ macro_rules! action_with_deprecated_aliases {
/// Registers the action and implements the Action trait for any struct that implements Clone,
/// Default, PartialEq, serde_deserialize::Deserialize, and schemars::JsonSchema.
///
/// Similar to `actions!`, but accepts structs with fields.
///
/// Fields and variants that don't make sense for user configuration should be annotated with
/// #[serde(skip)].
#[macro_export]