gitaly_client: Handle detailed errors for UserSquash
Gitaly is in the process of migrating UserSquash to use detailed errors like we already do for UserMergeBranch. This change will break the current calling convention, where Gitaly will return some errors by returning successfully, but with an `git_error` field set in the response. Instead, Gitaly will return a proper error for all conditions but give clients the ability to distinguish error cases via error details. Prepare the OperationService for this change by handling those new error details. Theoretically, this allows us to implement more fine-grained handling of these errors now: `ResolveRevisionErrors` contain the revision that Gitaly tried to resolve but couldn't, and `MergeConflictErrors` contain information about the files that have been conflicting. To ease the transition though we're treating those errors exactly the same as we did previously, where we raised a `GitError`. We can still iterate on this at a later point. The end result should be that there is no real user-visible change in how we handle UserSquash.
Showing
Please register or sign in to comment