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 4c731ab1 96.41%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4c731ab) Report Missing Report Missing Report Missing
Head commit (dad04be) 59601 51933 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.

docs/Config.md Outdated
renameCommitWithEditor: R
viewResetOptions: g
markCommitAsFixup: f
setFixupMessage: M
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious where the changes to docs/ come from; did you add them manually somehow? make generate only touches docs-master/, which is all we want to change. I pushed 7ae2965 to fix this, just wondering if we have a problem with our tooling.

Copy link
Owner Author

Choose a reason for hiding this comment

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

That's on me: mustn't have been paying attention. I've confirmed go generate ./... does not update those files.

Fixup: "Fixup",
SureFixupThisCommit: "Are you sure you want to 'fixup' the selected commit(s) into the commit below?",
FixupKeepMessage: "Fixup and use this commit's message",
FixupKeepMessageTooltip: "Meld the selected commit into the commit below, using this commit's message.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Meld" reads really weird to me; the standard term for this is "squash". I realize we already use "Meld" on main in the FixupTooltip text, but there's a reason in that case, because that text also mentions the 'squash' command, so it uses another term to avoid confusion; we don't have this problem here, so I'd prefer to say "Squash" in this case.

Also, I wonder if we should be even more explicit and say "using this commit's message, discarding the message of the commit below." Maybe that's over the top, but the extra clarity could be helpful.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Works for me. See dad04be (this PR)

jesseduffield and others added 3 commits January 26, 2026 17:46
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.
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