Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/gitaly_client/repository_service.rb
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r--lib/gitlab/gitaly_client/repository_service.rb48
1 files changed, 25 insertions, 23 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb
index 009aeaf868a..2e26b3341a2 100644
--- a/lib/gitlab/gitaly_client/repository_service.rb
+++ b/lib/gitlab/gitaly_client/repository_service.rb
@@ -73,18 +73,21 @@ module Gitlab
# rubocop: disable Metrics/ParameterLists
# The `remote` parameter is going away soonish anyway, at which point the
# Rubocop warning can be enabled again.
- def fetch_remote(remote, url:, refmap:, ssh_auth:, forced:, no_tags:, timeout:, prune: true, check_tags_changed: false)
+ def fetch_remote(url, refmap:, ssh_auth:, forced:, no_tags:, timeout:, prune: true, check_tags_changed: false, http_authorization_header: "")
request = Gitaly::FetchRemoteRequest.new(
- repository: @gitaly_repo, remote: remote, force: forced,
- no_tags: no_tags, timeout: timeout, no_prune: !prune,
- check_tags_changed: check_tags_changed
+ repository: @gitaly_repo,
+ force: forced,
+ no_tags: no_tags,
+ timeout: timeout,
+ no_prune: !prune,
+ check_tags_changed: check_tags_changed,
+ remote_params: Gitaly::Remote.new(
+ url: url,
+ mirror_refmaps: Array.wrap(refmap).map(&:to_s),
+ http_authorization_header: http_authorization_header
+ )
)
- if url
- request.remote_params = Gitaly::Remote.new(url: url,
- mirror_refmaps: Array.wrap(refmap).map(&:to_s))
- end
-
if ssh_auth&.ssh_mirror_url?
if ssh_auth.ssh_key_auth? && ssh_auth.ssh_private_key.present?
request.ssh_key = ssh_auth.ssh_private_key
@@ -263,34 +266,33 @@ module Gitlab
GitalyClient.call(@storage, :repository_service, :write_ref, request, timeout: GitalyClient.fast_timeout)
end
- def set_config(entries)
- return if entries.empty?
-
- request = Gitaly::SetConfigRequest.new(repository: @gitaly_repo)
- entries.each do |key, value|
- request.entries << build_set_config_entry(key, value)
- end
-
+ def set_full_path(path)
GitalyClient.call(
@storage,
:repository_service,
- :set_config,
- request,
+ :set_full_path,
+ Gitaly::SetFullPathRequest.new(
+ repository: @gitaly_repo,
+ path: path
+ ),
timeout: GitalyClient.fast_timeout
)
nil
end
- def delete_config(keys)
- return if keys.empty?
+ def set_config(entries)
+ return if entries.empty?
- request = Gitaly::DeleteConfigRequest.new(repository: @gitaly_repo, keys: keys)
+ request = Gitaly::SetConfigRequest.new(repository: @gitaly_repo)
+ entries.each do |key, value|
+ request.entries << build_set_config_entry(key, value)
+ end
GitalyClient.call(
@storage,
:repository_service,
- :delete_config,
+ :set_config,
request,
timeout: GitalyClient.fast_timeout
)