-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Do not autosquash in regular rebase #2429
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
Do not autosquash in regular rebase #2429
Conversation
…al rebase For users who have the rebase.autoSquash git config set to true, any regular rebase will squash fixups in addition to rebasing. Not good -- we'll fix that in the next commit.
|
Uffizzi Preview |
This fixes the problem shown in the previous commit.
cf5036b to
1da762c
Compare
As for the PR itself: I typically err on the side of letting the user's git config decide the behaviour of lazygit. I'm not clear why the typical user who has |
|
I have When I do a regular, non-interactive rebase on the command line, it has no effect, which is what I want. When lazygit does a regular, non-interactive rebase though, it passes Does that make it clearer? |
|
How about making it configurable like git:
rebase:
autoSquash: default # 'default', 'always', or 'never' |
|
No, another option doesn't help with this. I'm not trying to find a way to tweak lazygit's behavior to everybody's needs; I'm trying to solve a problem where lazygit behaves in unexpected ways by default. To reiterate my point: in my mental model, selecting "master" in the branches panel and hitting "r" is equivalent to doing |
|
This is not really an important issue for me, personally. I can totally just remove the |
|
The reason for lazygit passing the --interactive flag is that if a rebase is not interactive, it's hard to render it the way I want to i.e. showing the commits between the HEAD and the final commit. I say hard, but it's probably not that hard: we would just need to add a new concept of a 'rebase commit' that you can't actually interact with (e.g. dropping/fixup'ing). If we take that approach, then we can remove the --interactive flag and lazygit will behave less surprisingly |
|
To be more specific: I like being able to show a 'you are here' message when we're rebasing so you have a visual cue as to how far you still have to go. |
|
I see, thanks for the explanation. Makes sense to me. But as long as we do that (pass |
|
yep I agree with that |
|
I've created an issue for removing the --interactive from the rebase: #2442 |
For users who have the
rebase.autoSquashgit config set to true (like me :), any regular rebase would squash fixups in addition to rebasing. That's undesirable, squashing fixups should be a deliberate action. This PR fixes that.@jesseduffield I'm not sure if you appreciate this style of adding a "failing" test first to demonstrate a bug. We use this pattern a lot at work, and I find it useful.