feat: When creating a fixup commit on an existing fixup commit, offer to use the base commit#5259
feat: When creating a fixup commit on an existing fixup commit, offer to use the base commit#5259hhhapz wants to merge 1 commit intojesseduffield:masterfrom
Conversation
When in a workflow where you are applying fixups and using the `findBaseCommitForFixup` action, a fixup commit (to the intended base commit) instead of the base commit may be selected. In those situations, this PR prompts to target the original commit instead in a modal. This primarily helps in improving commit messages from becoming "fixup! fixup! <base commit message>". Three commits are prompted, if a matching base commit is found. 1. The selected commit, if that is the intended behaviour. 2. A base commit in the current todo list of commits (that are pending rebase) using Git's logic for determining the base commits when autosquashing. 3. A base commit using slightly stricter yet more expected rules which is incredibly useful in a workflow when maintaining your own fork.
|
I asked @hhhapz for this feature! Couldn't be bothered to open an issue ahead of time, but it's a very crucial part of my workflow. I maintain 10 forks. Lol. Lmao, even. The default state of the fork is that everything is already merged / pushed. And so, ¹ Which is part of why I forked lazygit too: to allow the action to search through merged commits too. Fork situations like I have, is a good reason for the “including merged commits” option in the popup. When I want to fixup a commit, I rarely care if it would force a need for a force push, because force pushes is how my forks operate to begin with. |
When in a workflow where you are applying fixups and using the
findBaseCommitForFixupaction, a fixup commit (to the intended base commit) instead of the base commit may be selected. In those situations, this PR prompts to target the original commit instead in a modal. This primarily helps in improving commit messages from becoming "fixup! fixup! ".Three commits are prompted, if a matching base commit is found.