Skip to content

Conversation

@jesseduffield
Copy link
Owner

@jesseduffield jesseduffield commented Jan 24, 2026

PR Description

I had a spare couple hours so figured I'd whip up a PR for a feature I've wanted for a while.

I've optimised for muscle memory backwards compatibility here:

  • Outside interactive rebase: press 'f' then instead of a confirmation panel, a menu appears where you can choose to keep the selected commit's message
  • Inside interactive rebase: press 'f' then press 'c' to see the menu for keeping the message, where if you press 'c' again it will retain the current message. so 'fcc' is the chord to press.

We're also now showing the -C flag (which is what enables the behaviour) against the todo.

I've picked the 'c' keybinding because 'C' was taken and it corresponds to the flag. Previously that showed a warning about a change in keybinding for cherry picking but it's been ages since we've made that change so I'm happy to retire it.

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@jesseduffield jesseduffield added the enhancement New feature or request label Jan 24, 2026
@codacy-production
Copy link

codacy-production bot commented Jan 24, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 39cd4741 96.41%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (39cd474) Report Missing Report Missing Report Missing
Head commit (f317a97) 59607 51936 87.13%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5233) 167 161 96.41%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Copy link
Collaborator

@stefanhaller stefanhaller left a comment

Choose a reason for hiding this comment

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

This is similar to #4526 in many ways, except for the addition of the extra c command, which is a great idea.

My main problem with #4526 was that I found the new fixup menu (outside of rebase) more confusing than the old confirmation, so it slowed me down even though the muscle memory interaction stayed the same; that's probably better in your version because the top menu entry simply says "Fixup", which I like. I'll use this in production for a while and see how it feels.

I didn't look at the code very much yet, just a little bit of early feedback about the texts.

jesseduffield and others added 4 commits January 28, 2026 10:15
It's been ages since we changed the key, users should hopefully be used to it by
now, and we want to reuse the key for something else later in the branch.

Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
Not used yet, we pass an empty string everywhere, to match the previous
behavior. Just extracting this into a separate commit to make the next one
smaller.

Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
Copy link
Collaborator

@stefanhaller stefanhaller left a comment

Choose a reason for hiding this comment

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

This is very nice; I used it for a while now, and have no issues with the workflow. I even used the feature of using the upper commit's message once, so that's a welcome improvement.

I took the liberty to break up the large commit into a few smaller ones, I find this much easier to review.

Lines(
Contains("--- Pending rebase todos ---"),
Contains("pick").Contains("Third Commit"),
Contains("fixup").Contains("Second Commit").IsSelected(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I usually prefer matching larger parts of a line instead of multiple Contains, mainly because it's more robust (you'd need a DoesNotContain("-C") in your version), but also because I find it easier to read.

Fixed in 897e01b.

I've optimised for muscle memory backwards compatibility here:
  - Outside interactive rebase: press 'f' then instead of a confirmation
panel, a menu appears where you can choose to keep the selected commit's
message
  - Inside interactive rebase: press 'f' then press 'c' to see the menu
for keeping the message, where if you press 'c' again it will retain the
current message. so 'fcc' is the chord to press.

We're also now showing the -C flag (which is what enables the behaviour)
against the todo.

I've picked the 'c' keybinding because 'C' was taken and it corresponds
to the flag. Previously that showed a warning about a change in
keybinding for cherry picking but it's been ages since we've made that
change so I'm happy to retire it.
@stefanhaller stefanhaller merged commit ce202a5 into master Jan 28, 2026
13 checks passed
@stefanhaller stefanhaller deleted the fixup-up branch January 28, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants