Merge Conflict Tool merges source and target branches in reverse
Summary
Resolving a merge conflict on GitLab reverses target and source branches.
Steps to reproduce
- Create a merge that causes a merge conflict
- Click "resolve these conflicts" link to resolve the merge conflict in GitLab
Able to reproduce in CE 8.11.4 and gitlab.com
Reproduced on gitlab.com: https://gitlab.com/devdaniel/merge_bug/network/master
Expected behavior
Source branch is merged into target branch
Actual behavior
Target branch is merged into source branch
Relevant logs and/or screenshots
Resolving using tool: Note the difference between the intended merge (branch_a and master) and the automatic commit message (master into branch_b)
After attempting to resolve the merge, the page will show an error showing the intended source branch (branch_b) has been updated. At this point, the error merge has already been completed but the merge request will remain open and will ask if you want to merge it back in anyway.