-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Support using the selected commit's message in a fixup #5233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b6121f7 to
15e0386
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesFootnotes
|
stefanhaller
left a comment
There was a problem hiding this 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.
7ae2965 to
dad04be
Compare
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>
dad04be to
897e01b
Compare
stefanhaller
left a comment
There was a problem hiding this 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(), |
There was a problem hiding this comment.
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.
897e01b to
f317a97
Compare
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:
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
go generate ./...)