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:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-10-01 03:13:23 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-10-02 18:39:42 +0300
commitfce708c154273a7b91b465cfcf2ce8b8bf416046 (patch)
tree95a73ac9f31c1bfe190889867ca53cf06229e773 /lib/gitlab/workhorse.rb
parentb40192a9464503bf4b141f8cf6133d7ba0f893fe (diff)
Send extra Gitaly params for `send_git_archive` if needed
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index 45f246242f1..f200c694562 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -89,6 +89,13 @@ module Gitlab
params = repository.archive_metadata(ref, Gitlab.config.gitlab.repository_downloads_path, format)
raise "Repository or ref not found" if params.empty?
+ if Gitlab::GitalyClient.feature_enabled?(:workhorse_archive)
+ params.merge!(
+ 'GitalyServer' => gitaly_server_hash(repository),
+ 'GitalyRepository' => repository.gitaly_repository.to_h
+ )
+ end
+
[
SEND_DATA_HEADER,
"git-archive:#{encode(params)}"