Support squash and fast forward methods for merge ref operation
Problem to solve
We now create a ref for each merge request
refs/merge-requests/$iid/merge that can is used by GitLab CI for testing the result of the merge, but it may not accurately reflect the likely merge ref because fast-forward and squash settings aren't considered when creating the merge ref.
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