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.
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.
- This will probably require a new RPC
UserFfToRef(as opposed to
UserMergeToRefwe currently have).
MergeToRefServiceto use it instead raising an "unsupported" error