diff options
author | John Cai <jcai@gitlab.com> | 2022-05-03 20:07:40 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2022-05-03 20:07:40 +0300 |
commit | 055d37fec0b1364d2a7468c74581965f16b48275 (patch) | |
tree | fa1947172acf7c91d0e53c670e3d2be49af65a25 /proto/operations.proto | |
parent | a374f9bf00471e249d8c5d2331ae084481bee450 (diff) | |
parent | 44e98aba66779e943a4182b672e2ff4f039abcb5 (diff) |
Merge branch 'jc-cherry-pick-structured-errors-proto' into 'master'
proto: Add CherryPickError type for UserCherryPick structured errors
See merge request gitlab-org/gitaly!4497
Diffstat (limited to 'proto/operations.proto')
-rw-r--r-- | proto/operations.proto | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/proto/operations.proto b/proto/operations.proto index a7f240b0c..023ed3c8b 100644 --- a/proto/operations.proto +++ b/proto/operations.proto @@ -394,6 +394,27 @@ message UserCherryPickResponse { CreateTreeError create_tree_error_code = 5; } +// UserCherryPickError is an error returned by the UserCherryPick RPC. +message UserCherryPickError { + oneof error { + // CherryPickConflict is returned if there is a conflict when applying the cherry + // pick. + MergeConflictError cherry_pick_conflict = 1; + // TargetBranchDiverged is returned whenever the tip commit of the branch we're + // about to apply the new commit on is not a direct ancestor of the newly created + // cherry-picked commit. This may happen either due to a race where the reference + // is modified while we compute the cherry-picked commit, or alternatively if the + // commit fetched from the start branch of the remote repository is not an ancestor + // of of the local target branch. + NotAncestorError target_branch_diverged = 2; + // ChangesAlreadyApplied is returned if the result after applying the cherry pick is empty. + ChangesAlreadyAppliedError changes_already_applied = 3; + // AccessCheck is returned in case GitLab's `/internal/allowed` endpoint rejected + // the change. + AccessCheckError access_check = 4; + } +} + message UserRevertRequest { // repository is the repository in which the revert shall be applied. Repository repository = 1 [(target_repository)=true]; |