diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-09-30 21:13:23 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-02 12:39:42 -0300 |
commit | fce708c154273a7b91b465cfcf2ce8b8bf416046 (patch) | |
tree | 95a73ac9f31c1bfe190889867ca53cf06229e773 /lib | |
parent | b40192a9464503bf4b141f8cf6133d7ba0f893fe (diff) | |
download | gitlab-ce-fce708c154273a7b91b465cfcf2ce8b8bf416046.tar.gz |
Send extra Gitaly params for `send_git_archive` if needed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/workhorse.rb | 7 |
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)}" |