Display merge request conflicts directly in diff
Problem to solve
To avoid displaying the changes that are already on master in the diff, we compare the branch with
HEAD of the target branch: #198458 (closed). In order to do that, we artificially merge the target branch to the source branch and compare this merge-branch to the target branch. However, when the target branch conflicts with the source branch, we're unable to merge it, so currently we display
master (base) version in this case.
User experience goal
master (HEAD) version with explicit conflicts in the diff, something like BitBucket solves this problem:
One of the ways to reach this goal is to either modify
Gitaly::UserMergeToRefRequest request or create a new one which force merge the conflicts into the diff and explicitly list us the files which contain conflicts. After that, we need to correctly highlight the conflict-block. It is a raw idea though and should be thoroughly investigated. A good links from Bitbucket development: https://blog.developer.atlassian.com/a-better-pull-request/
- Merge source branch to target with adding the conflicts files as-is (with conflict markers)
- Highlight the conflicts section properly in the diffs
The motivation behind the changes: https://www.youtube.com/watch?v=GFXIFA4ZuZw&feature=youtu.be
The functionality is behind
display_merge_conflicts_in_diff feature flag
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.