Operations: return structured errors in UserRevert
Modify the RPC UserRevert to return structured errors instead of inline errors. Modify the handling of the following four errors: 'Conflict', 'Changes Already Applied', 'Branch diverged', and 'CustomHookError'. Returns the corresponding structured error.
We need the following steps to introduce structured errors for UserRevert.
- First merge the protobufs only in Gitaly.(Merged via: !6667 (merged))
- Update Rails to handle the new errors properly. (Merged via: gitlab!143180 (merged))
- Merge the behavior changes(return structured errors) behind the feature flag in Gitaly.(This MR)
After that, the Gitaly team can handle the feature flag rollout.
Edited by Yadong Wang