diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-02 18:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-02 18:08:01 +0300 |
commit | 53b1f4eaa2a451aaba908a5fee7ce97a930021ac (patch) | |
tree | 66501ec0de9f529ee1cfc7cd6c4b481b1fc76662 /lib | |
parent | 684d65316ac77c62f47d68b9926eea8af30db227 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/remote_mirror.rb | 8 | ||||
-rw-r--r-- | lib/gitlab/gitaly_client/remote_service.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/path_regex.rb | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/gitlab/git/remote_mirror.rb b/lib/gitlab/git/remote_mirror.rb index df3cd422527..d9f51a7e844 100644 --- a/lib/gitlab/git/remote_mirror.rb +++ b/lib/gitlab/git/remote_mirror.rb @@ -5,14 +5,15 @@ module Gitlab class RemoteMirror include Gitlab::Git::WrapsGitalyErrors - attr_reader :repository, :ref_name, :only_branches_matching, :ssh_key, :known_hosts + attr_reader :repository, :ref_name, :only_branches_matching, :ssh_key, :known_hosts, :keep_divergent_refs - def initialize(repository, ref_name, only_branches_matching: [], ssh_key: nil, known_hosts: nil) + def initialize(repository, ref_name, only_branches_matching: [], ssh_key: nil, known_hosts: nil, keep_divergent_refs: false) @repository = repository @ref_name = ref_name @only_branches_matching = only_branches_matching @ssh_key = ssh_key @known_hosts = known_hosts + @keep_divergent_refs = keep_divergent_refs end def update @@ -21,7 +22,8 @@ module Gitlab ref_name, only_branches_matching, ssh_key: ssh_key, - known_hosts: known_hosts + known_hosts: known_hosts, + keep_divergent_refs: keep_divergent_refs ) end end diff --git a/lib/gitlab/gitaly_client/remote_service.rb b/lib/gitlab/gitaly_client/remote_service.rb index 2405f3be197..4566c59bbe0 100644 --- a/lib/gitlab/gitaly_client/remote_service.rb +++ b/lib/gitlab/gitaly_client/remote_service.rb @@ -53,7 +53,7 @@ module Gitlab encode_utf8(response.ref) end - def update_remote_mirror(ref_name, only_branches_matching, ssh_key: nil, known_hosts: nil) + def update_remote_mirror(ref_name, only_branches_matching, ssh_key: nil, known_hosts: nil, keep_divergent_refs: false) req_enum = Enumerator.new do |y| first_request = Gitaly::UpdateRemoteMirrorRequest.new( repository: @gitaly_repo, @@ -62,6 +62,7 @@ module Gitlab first_request.ssh_key = ssh_key if ssh_key.present? first_request.known_hosts = known_hosts if known_hosts.present? + first_request.keep_divergent_refs = keep_divergent_refs y.yield(first_request) diff --git a/lib/gitlab/path_regex.rb b/lib/gitlab/path_regex.rb index 5fa0fbf874c..d95da262eea 100644 --- a/lib/gitlab/path_regex.rb +++ b/lib/gitlab/path_regex.rb @@ -28,7 +28,6 @@ module Gitlab apple-touch-icon.png assets autocomplete - ci dashboard deploy.html explore |