Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,330
    • Merge requests 1,330
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #232484
Closed
Open
Issue created Jul 27, 2020 by Igor Drozdov@igor.drozdov🔴Maintainer

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

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

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

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.

Edited Aug 10, 2022 by 🤖 GitLab Bot 🤖
Assignee
Assign to
Time tracking