diff options
| author | Douwe Maan <douwe@gitlab.com> | 2017-10-03 07:40:20 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2017-10-03 07:40:20 +0000 |
| commit | d14230dd6b9bdd94577b1e52f810e143278ff80e (patch) | |
| tree | 0cdfe8f024a7ba252217e64e09d188abe78da976 /lib | |
| parent | bdc50ed779cb0c7d266c0f80f3e66a25da8b1964 (diff) | |
| parent | 40060b18c751cb6201d6a446b52cb65319f633c5 (diff) | |
| download | gitlab-ce-d14230dd6b9bdd94577b1e52f810e143278ff80e.tar.gz | |
Merge branch 'gitaly-get-archive' into 'master'
Send extra Gitaly params for `send_git_archive` if needed
See merge request gitlab-org/gitlab-ce!14605
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)}" |
