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: https://gitlab.com/gitlab-org/gitlab/-/issues/198458. In order to do that, we artificially [merge](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/merge_requests/merge_to_ref_service.rb) 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 Display `master (HEAD)` version with explicit conflicts in the diff, something like BitBucket solves this problem: ![Screen_Shot_2020-07-27_at_1.13.15_PM](https://gitlab.com/gitlab-org/gitlab/uploads/12933976de73ab1a10d966277a5f21bd/Screen_Shot_2020-07-27_at_1.13.15_PM.png) ### Proposal ~~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 ### Feature flag The functionality is behind `display_merge_conflicts_in_diff` feature flag <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *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.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
issue