diff options
author | Stan Hu <stanhu@gmail.com> | 2019-05-06 10:54:16 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-06 10:54:16 +0000 |
commit | 02ca1577ea92eaa1e8b23855f2742638b1a13e3a (patch) | |
tree | 41cbf2179a372870dc395ea2b51c8fd80321f214 /lib | |
parent | d7adc4cf3ca53fee784c2e0966f127334a9dad54 (diff) | |
parent | 0e033b31248a48bd02ae67aada106f99a2af53f9 (diff) | |
download | gitlab-ce-02ca1577ea92eaa1e8b23855f2742638b1a13e3a.tar.gz |
Merge branch 'jc-disconnect-git-alternates-client' into 'master'
Add client methods for DisconnectGitAlternates rpc
See merge request gitlab-org/gitlab-ce!27938
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/gitaly_client/repository_service.rb | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 508499f227c..fc9bcbdcca2 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -922,6 +922,12 @@ module Gitlab end end + def disconnect_alternates + wrapped_gitaly_errors do + gitaly_repository_client.disconnect_alternates + end + end + def gitaly_repository Gitlab::GitalyClient::Util.repository(@storage, @relative_path, @gl_repository, @gl_project_path) end diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb index 74aae4a8e97..68b17e86608 100644 --- a/lib/gitlab/gitaly_client/repository_service.rb +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -331,6 +331,14 @@ module Gitlab search_results_from_response(response) end + def disconnect_alternates + request = Gitaly::DisconnectGitAlternatesRequest.new( + repository: @gitaly_repo + ) + + GitalyClient.call(@storage, :object_pool_service, :disconnect_git_alternates, request) + end + private def search_results_from_response(gitaly_response) |