When MR has a single commit, and 'Squash commits when merge request is accepted' is selected, UI presents a squash commit message box that cannot be toggled off
Steps
- Create a MR with single commit, with 'Squash commits when merge request is accepted' checkbox selected
- Go to merge the MR
Description
The UI will present a form element to provide a squash commit message or select a commit to be the squash commit message, but the normal 'Squash commits' checkbox is missing. The 'Squash commits' checkbox only appears in the merge form when you have more than one commit. This means that you cannot toggle the squash form elements off when you have a single commit like you can when there are multiple commits. This forces the merge to be performed as a squash.
Solution
If there is only a single commit, do not expose any UI related to squashing at all. This will present the MR form the same way as it does when the 'Squash commits when merge request is accepted' checkbox is not selected.
Edited by Luke Duncalfe