Squashed merge commit uses garbage commit message instead of MR title
The newly implemented feature to override squashed commit messages #47149 (closed) has horribly broken merging with fast-forward enabled.
Whereas an MR used to use the MR title as the commit message, it now by default picks the longest commit message from the merged branch. However when using the fast-forward merge option, there is no way to edit the commit message and no indication that the behavior has changed leading to highly unexpected behavior for our users.
The result in any instance where the feature branch has had to first resolve any merge conflicts from master, is that the new merge commit is a garbage message from the feature branch and no indication of what has actually been merged.
This has completely broken our workflow because we can no longer do a squashed fast-forward merge request without trashing our git history.
Steps to reproduce
- Create a project with fast-forward merge requests enabled
- Create some commits on master
- Create a feature branch and add commits that will create a conflict
- Merge master into the feature branch, resolving the conflicts
- Create a merge request to merge feature branch into master (no option to change the message is given)
- Perform the merge request and enable the squash option
- The new commit on master will be the text of the conflict resolution from step 4
Here is a project where the latest commit shows an example of this bug
The commit came from this merge request
What is the current bug behavior?
The longest commit message is used instead of the merge request title and there is no way to change it.
What is the expected correct behavior?
The merge request title should be used by default
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Somewhat related to #48324 (closed), but that issue doesn't address the fact that MRs are suddenly picking the wrong commit message to use.