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,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,328
    • Merge requests 1,328
  • 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
  • #26996
Closed
Open
Issue created Feb 26, 2019 by Oswaldo Ferreira@oswaldoContributor

Support fast forward methods for merge ref operation

Problem to solve

If I checkout the merge ref for a merge request refs/merge-requests/$iid/merge for a project that uses a fast forward or semi-linear merge strategy, the ref is not representative of the the change because it will actually contain commits that cannot be merged in a fast forward arrangement with master.

This means that the merge-ref isn't an accurate representation of the resultant state of the target branch should the merge occur.

Further details

Follow up to https://gitlab.com/gitlab-org/gitlab-ce/issues/47110

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24692 introduces a MergeToRefService which writes to refs/merge-requests/:iid/merge, though it currently only supports the merge method, which currently writes a new commit SHA to the ref. Ideally we should also support squash and FF-only projects / MRs.

Proposal

  1. This will probably require a new RPC UserFfToRef (as opposed to UserMergeToRef we currently have).
  2. Change MergeToRefService to use it instead raising an "unsupported" error

Links / references

Edited Nov 05, 2019 by James Ramsay (ex-GitLab)
Assignee
Assign to
Time tracking