Commit 5c3b135d authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Merge branch 'bvl-add-apply-patch-rpc' into 'master'

Add endpoint to apply patches to a branch

See merge request gitlab-org/gitaly-proto!232
parents 5309c99c 1d305953
......@@ -135,6 +135,8 @@ It has these top-level messages:
UserRebaseResponse
UserSquashRequest
UserSquashResponse
UserApplyPatchRequest
UserApplyPatchResponse
ListNewBlobsRequest
ListNewBlobsResponse
FindDefaultBranchNameRequest
......
This diff is collapsed.
......@@ -17,6 +17,7 @@ service OperationService {
rpc UserCommitFiles(stream UserCommitFilesRequest) returns (UserCommitFilesResponse) {}
rpc UserRebase(UserRebaseRequest) returns (UserRebaseResponse) {}
rpc UserSquash(UserSquashRequest) returns (UserSquashResponse) {}
rpc UserApplyPatch(stream UserApplyPatchRequest) returns (UserApplyPatchResponse) {}
}
message UserCreateBranchRequest {
......@@ -242,3 +243,20 @@ message UserSquashResponse {
reserved "pre_receive_error";
string git_error = 3;
}
message UserApplyPatchRequest {
message Header {
Repository repository = 1;
User user = 2;
bytes target_branch = 3;
}
oneof user_apply_patch_request_payload {
Header header = 1;
bytes patches = 2;
}
}
message UserApplyPatchResponse {
OperationBranchUpdate branch_update = 1;
}
......@@ -181,6 +181,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :squash_sha, :string, 1
optional :git_error, :string, 3
end
add_message "gitaly.UserApplyPatchRequest" do
oneof :user_apply_patch_request_payload do
optional :header, :message, 1, "gitaly.UserApplyPatchRequest.Header"
optional :patches, :bytes, 2
end
end
add_message "gitaly.UserApplyPatchRequest.Header" do
optional :repository, :message, 1, "gitaly.Repository"
optional :user, :message, 2, "gitaly.User"
optional :target_branch, :bytes, 3
end
add_message "gitaly.UserApplyPatchResponse" do
optional :branch_update, :message, 1, "gitaly.OperationBranchUpdate"
end
end
module Gitaly
......@@ -213,4 +227,7 @@ module Gitaly
UserRebaseResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UserRebaseResponse").msgclass
UserSquashRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UserSquashRequest").msgclass
UserSquashResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UserSquashResponse").msgclass
UserApplyPatchRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UserApplyPatchRequest").msgclass
UserApplyPatchRequest::Header = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UserApplyPatchRequest.Header").msgclass
UserApplyPatchResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UserApplyPatchResponse").msgclass
end
......@@ -26,6 +26,7 @@ module Gitaly
rpc :UserCommitFiles, stream(UserCommitFilesRequest), UserCommitFilesResponse
rpc :UserRebase, UserRebaseRequest, UserRebaseResponse
rpc :UserSquash, UserSquashRequest, UserSquashResponse
rpc :UserApplyPatch, stream(UserApplyPatchRequest), UserApplyPatchResponse
end
Stub = Service.rpc_stub_class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment