Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorJames Fargher <jfargher@gitlab.com>2021-08-26 04:45:11 +0300
committerJames Fargher <jfargher@gitlab.com>2021-09-22 04:03:56 +0300
commit24f30cffd80d38c90d93b3de4edf7d54ae779660 (patch)
tree23441e29fda03a25d41ec5a6f83ce2c487ffb9e8 /ruby
parent15c4a53fb5a093291e0331331efadb52d76f0871 (diff)
Add FetchBundle to repository service proto
FetchBundle will allow updating an existing repository with the objects and refs of a bundle, such as an incremental backup. Right now the only other RPC is `CreateRespositoryFromBundle` but this requires the repository to not already exist. For incremental backups, there will be a series of bundles that need to be applied to a repository in a specific order.
Diffstat (limited to 'ruby')
-rw-r--r--ruby/proto/gitaly/repository-service_pb.rb8
-rw-r--r--ruby/proto/gitaly/repository-service_services_pb.rb4
2 files changed, 12 insertions, 0 deletions
diff --git a/ruby/proto/gitaly/repository-service_pb.rb b/ruby/proto/gitaly/repository-service_pb.rb
index b5fc2aeb8..fe4e2b379 100644
--- a/ruby/proto/gitaly/repository-service_pb.rb
+++ b/ruby/proto/gitaly/repository-service_pb.rb
@@ -62,6 +62,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "gitaly.ApplyGitattributesResponse" do
end
+ add_message "gitaly.FetchBundleRequest" do
+ optional :repository, :message, 1, "gitaly.Repository"
+ optional :data, :bytes, 2
+ end
+ add_message "gitaly.FetchBundleResponse" do
+ end
add_message "gitaly.FetchRemoteRequest" do
optional :repository, :message, 1, "gitaly.Repository"
optional :force, :bool, 3
@@ -342,6 +348,8 @@ module Gitaly
RepositorySizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RepositorySizeResponse").msgclass
ApplyGitattributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ApplyGitattributesRequest").msgclass
ApplyGitattributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ApplyGitattributesResponse").msgclass
+ FetchBundleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FetchBundleRequest").msgclass
+ FetchBundleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FetchBundleResponse").msgclass
FetchRemoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FetchRemoteRequest").msgclass
FetchRemoteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FetchRemoteResponse").msgclass
CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CreateRepositoryRequest").msgclass
diff --git a/ruby/proto/gitaly/repository-service_services_pb.rb b/ruby/proto/gitaly/repository-service_services_pb.rb
index c6d740bb2..68de3267c 100644
--- a/ruby/proto/gitaly/repository-service_services_pb.rb
+++ b/ruby/proto/gitaly/repository-service_services_pb.rb
@@ -40,6 +40,10 @@ module Gitaly
rpc :CreateBundle, Gitaly::CreateBundleRequest, stream(Gitaly::CreateBundleResponse)
# CreateBundleFromRefList creates a bundle from a stream of ref patterns
rpc :CreateBundleFromRefList, stream(Gitaly::CreateBundleFromRefListRequest), stream(Gitaly::CreateBundleFromRefListResponse)
+ # FetchBundle fetches references from a bundle into the local repository.
+ # Refs will be mirrored to the target repository with the refspec
+ # "+refs/*:refs/*" and refs that do not exist in the bundle will be removed.
+ rpc :FetchBundle, stream(Gitaly::FetchBundleRequest), Gitaly::FetchBundleResponse
rpc :CreateRepositoryFromBundle, stream(Gitaly::CreateRepositoryFromBundleRequest), Gitaly::CreateRepositoryFromBundleResponse
# GetConfig reads the target repository's gitconfig and streams its contents
# back. Returns a NotFound error in case no gitconfig was found.