Surface specific Gitaly conflict reasons in the merge widget

What does this MR do and why?

A merge that failed on a git conflict showed only "An error occurred while merging. Try again.", and a failed squash showed a fixed "Squashing failed" string. In both cases Gitaly reports the real reason and we discarded it.

Gitaly returns a structured merge_conflict error on UserMergeBranch, but user_merge_branch had no branch for it, so the failure became a plain CommandError and MergeService replaced the message with a generic constant. user_squash handled resolve_revision and rebase_conflict in one branch, and SquashService rescued StandardError and dropped the message. Add Gitlab::Git::MergeConflictError, raise it from both RPCs, and map it to a specific message in each service. The raw Gitaly text is still logged for support.

References

#616263

Screenshots or screen recordings

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading