Skip to content

fix(cherry-pick): continue/abort/skip, reset keybinding, and correct multi-commit order#16

Merged
Blankeos merged 1 commit into
Blankeos:mainfrom
fcmiranda:cherry-pick
May 17, 2026
Merged

fix(cherry-pick): continue/abort/skip, reset keybinding, and correct multi-commit order#16
Blankeos merged 1 commit into
Blankeos:mainfrom
fcmiranda:cherry-pick

Conversation

@fcmiranda
Copy link
Copy Markdown
Contributor

Summary

Fixes three bugs in the cherry-pick implementation.

Bug 1 β€” Critical: conflict resolution was impossible

show_rebase_options_menu received is_cherry_picking but the parameter was named _is_cherry_picking and completely ignored β€” no menu items were built for it. When a cherry-pick hit a conflict the menu opened empty and the user was stuck with no way to continue or abort from the TUI.

Fix: added continue_cherry_pick(), abort_cherry_pick(), and skip_cherry_pick() git wrappers in status.rs, and wired them into the options menu with keys c / a / s.

Bug 2 β€” Dead keybinding: <Ctrl-q> did nothing

reset_cherry_pick was declared in the config with default <c-q> but was never matched in the key handler.

Fix: added the matches_key check in handle_key so pressing <Ctrl-q> now clears the clipboard.

Bug 3 β€” Wrong history order for multi-commit cherry-pick

The commit list is shown newest-first. Hashes were pushed to the clipboard in visual order and passed to git cherry-pick unchanged β€” oldest commit ended up applied last, reversing history.

Fix: the clipboard is reversed before being passed to git.cherry_pick(), so oldest is applied first.

Files changed

  • src/git/status.rs β€” add continue_cherry_pick, abort_cherry_pick, skip_cherry_pick
  • src/gui/mod.rs β€” fix _is_cherry_picking dead param; add continue/abort/skip menu items
  • src/gui/controller/commits.rs β€” wire reset_cherry_pick keybinding; reverse hashes before paste

Copy link
Copy Markdown
Owner

@Blankeos Blankeos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good and well-scoped so I'll just merge.

@Blankeos Blankeos merged commit 334fa28 into Blankeos:main May 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants