Skip to content
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

Squash all fixups in current branch #3263

Closed
stefanhaller opened this issue Jan 26, 2024 · 2 comments · Fixed by #3274
Closed

Squash all fixups in current branch #3263

stefanhaller opened this issue Jan 26, 2024 · 2 comments · Fixed by #3274
Labels
enhancement New feature or request
Milestone

Comments

@stefanhaller
Copy link
Collaborator

Now that we have 'i' for conveniently starting an interactive rebase of the current branch, I want the same for squashing fixups. I don't want to have to care about selecting a commit to start from, just an automatic "squash all fixups in my current branch" command.

To do that, we should rename Squash all 'fixup!' commits above selected commit (autosquash) to just Squash 'fixup!' commits (autosquash); instead of showing a confirmation prompt it should show a menu with the choices "all fixups above the selected commit" and "all fixups in current branch".

For backwards compatibility and muscle memory the menu entries need to be in that order, so that shift-S enter does the same thing as before. On the other hand, I find "all fixups in current branch" much more useful and I expect to use it by default most of the time, so I'm inclined to make it the default and break compatibility. With #3261, maybe it's acceptable.

@stefanhaller stefanhaller added the enhancement New feature or request label Jan 26, 2024
@stefanhaller
Copy link
Collaborator Author

I'm already in the middle of working on this, but I'm a bit time constrained right now and can't promise when it's done. Just filing it so that we can track it in #3262.

@jesseduffield
Copy link
Owner

Machiavelli says:

Injuries, therefore, should be inflicted all at once, that their ill savour being less lasting may the less offend; whereas, benefits should be conferred little by little, that so they may be more fully relished.

Given this wisdom, and given how many other things which break muscle memory will be in this release, now would be the time to break muscle memory. I say we do it and see if anybody complains and use that to inform us for future decisions

@jesseduffield jesseduffield added this to the v0.41 milestone Jan 28, 2024
stefanhaller added a commit that referenced this issue Jan 29, 2024
Add command to squash all fixups in the current branch.

To do that, change the "Apply fixup commits" command to show a menu with
the two choices "in current branch" and "above the selected commit"; we
make "in current branch" the default, as it's the more useful one most
of the time, even though it is a breaking change for those who are used
to "shift-S enter" meaning "squash above selected".

Fixes #3263.
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 a pull request may close this issue.

2 participants