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:
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index b375602a5fe..c91d1b05440 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -62,9 +62,6 @@ module Gitlab
end
def send_git_archive(repository, ref:, format:, append_sha:, path: nil)
- path_enabled = Feature.enabled?(:git_archive_path, default_enabled: true)
- path = nil unless path_enabled
-
format ||= 'tar.gz'
format = format.downcase
@@ -78,12 +75,7 @@ module Gitlab
raise "Repository or ref not found" if metadata.empty?
- params =
- if path_enabled
- send_git_archive_params(repository, metadata, path, archive_format(format))
- else
- metadata
- end
+ params = send_git_archive_params(repository, metadata, path, archive_format(format))
# If present, DisableCache must be a Boolean. Otherwise
# workhorse ignores it.
@@ -138,8 +130,7 @@ module Gitlab
]
end
- def send_artifacts_entry(build, entry)
- file = build.artifacts_file
+ def send_artifacts_entry(file, entry)
archive = file.file_storage? ? file.path : file.url
params = {
@@ -213,7 +204,7 @@ module Gitlab
# This is the outermost encoding of a senddata: header. It is safe for
# inclusion in HTTP response headers
def encode(hash)
- Base64.urlsafe_encode64(JSON.dump(hash))
+ Base64.urlsafe_encode64(Gitlab::Json.dump(hash))
end
# This is for encoding individual fields inside the senddata JSON that