mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
If a squash merge stops with conflicts, lazygit doesn't show a merge in progress, because "git merge --squash" doesn't write MERGE_HEAD. After resolving the conflicts, users have to commit the changes themselves, and type the message that "Squash merge and commit" would have used. To give up, they have to discard the changes. The "Abort the merge" item of the conflicts menu fails with "You are currently neither rebasing nor merging". "git merge --squash" writes SQUASH_MSG, a message for committing the changes. Git removes it when the changes are committed, reset or stashed, and when switching branches. Show a merge in progress while the file exists. Continue it with "git commit", and abort it with "git reset --merge", like "git merge --abort" does. Write the configured squashMergeMessage into SQUASH_MSG, so that continuing uses it. Do this for "Squash merge and leave uncommitted" too, so that both variants make the same commit. A merge in progress is now shown after this variant until the user commits the changes. We don't offer to continue it when its conflicts are resolved, though, because the user asked us not to commit. Select the new commit after "Squash merge and commit", like after other merges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>