summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-01-10 10:06:38 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-01-10 10:06:38 +0000
commit6a2521d2e9ce9e8ec30b9caffdefdb9510823410 (patch)
tree6dad04932a99d148378c2716361343574727394a /lib
parent520cb97ee718a338139782ea42ea906c8e82cc9b (diff)
parent8065efac462f3483cb3b17eed7519bbaeddd799a (diff)
downloadgitlab-ce-6a2521d2e9ce9e8ec30b9caffdefdb9510823410.tar.gz
Merge branch 'fix/use-mirror-refmaps-instead-mirror-refmap' into 'master'
Add support for multiple refmaps to RemoteService#add_remote Closes gitaly#903 See merge request gitlab-org/gitlab-ce!16331
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/gitaly_client/remote_service.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gitlab/gitaly_client/remote_service.rb b/lib/gitlab/gitaly_client/remote_service.rb
index 559a901b9a3..e58f641d69a 100644
--- a/lib/gitlab/gitaly_client/remote_service.rb
+++ b/lib/gitlab/gitaly_client/remote_service.rb
@@ -7,10 +7,12 @@ module Gitlab
@storage = repository.storage
end
- def add_remote(name, url, mirror_refmap)
+ def add_remote(name, url, mirror_refmaps)
request = Gitaly::AddRemoteRequest.new(
- repository: @gitaly_repo, name: name, url: url,
- mirror_refmap: mirror_refmap.to_s
+ repository: @gitaly_repo,
+ name: name,
+ url: url,
+ mirror_refmaps: Array.wrap(mirror_refmaps).map(&:to_s)
)
GitalyClient.call(@storage, :remote_service, :add_remote, request)