diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-09 02:44:18 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-10 20:26:32 +0300 |
commit | 06e7eeb1c22bf380ad8f3d35581ed63132adf5d6 (patch) | |
tree | 694c4961516c07024f5c39ae45a3fc8311553272 /lib/gitlab/gitaly_client/repository_service.rb | |
parent | 9ac5338b8eb361927ad068486398b92acb0c287e (diff) |
Use Gitaly's RepositoryService.HasLocalBranches RPC
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/repository_service.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb index fdf912214e0..cef692d3c2a 100644 --- a/lib/gitlab/gitaly_client/repository_service.rb +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -58,6 +58,13 @@ module Gitlab request = Gitaly::CreateRepositoryRequest.new(repository: @gitaly_repo) GitalyClient.call(@storage, :repository_service, :create_repository, request) end + + def has_local_branches? + request = Gitaly::HasLocalBranchesRequest.new(repository: @gitaly_repo) + response = GitalyClient.call(@storage, :repository_service, :has_local_branches, request) + + response.value + end end end end |