diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-04 23:00:36 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-06 22:01:48 +0300 |
commit | 21096e2391e3e4c5d8e6ab1d430189429847248d (patch) | |
tree | f07eea62506b41674895f312abae0c97b5dea491 /lib | |
parent | c1c4d7ed2b0dfa344dcf25b8dac0a5b65f90d712 (diff) |
Add Gitlab::GitalyClient::RemoteService#find_remote_root_ref
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/gitaly_client/remote_service.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/remote_service.rb b/lib/gitlab/gitaly_client/remote_service.rb index 1381e033d4b..6415c64b4e2 100644 --- a/lib/gitlab/gitaly_client/remote_service.rb +++ b/lib/gitlab/gitaly_client/remote_service.rb @@ -52,6 +52,18 @@ module Gitlab response.result end + def find_remote_root_ref(remote_name) + request = Gitaly::FindRemoteRootRefRequest.new( + repository: @gitaly_repo, + remote: remote_name + ) + + response = GitalyClient.call(@storage, :remote_service, + :find_remote_root_ref, request) + + response.ref.presence + end + def update_remote_mirror(ref_name, only_branches_matching) req_enum = Enumerator.new do |y| y.yield Gitaly::UpdateRemoteMirrorRequest.new( |