diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-11-22 13:19:42 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-11-22 13:19:42 +0300 |
commit | 571f1dda17203d162dac65270a6b68366de1f101 (patch) | |
tree | 2e467b90384a78201143657bc00b1c1cf854ef02 /lib/gitlab/gitaly_client/repository_service.rb | |
parent | 6369db0196ec7b6e288b16382c95243424a59b62 (diff) |
Add FetchSourceBranch Gitaly call
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/repository_service.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb index cef692d3c2a..70cb16bd810 100644 --- a/lib/gitlab/gitaly_client/repository_service.rb +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -65,6 +65,25 @@ module Gitlab response.value end + + def fetch_source_branch(source_repository, source_branch, local_ref) + request = Gitaly::FetchSourceBranchRequest.new( + repository: @gitaly_repo, + source_repository: source_repository.gitaly_repository, + source_branch: source_branch.b, + target_ref: local_ref.b + ) + + response = GitalyClient.call( + @storage, + :repository_service, + :fetch_source_branch, + request, + remote_storage: source_repository.storage + ) + + response.result + end end end end |