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:
authorJames Ramsay <james@jramsay.com.au>2018-02-19 23:41:04 +0300
committerJames Ramsay <james@jramsay.com.au>2018-04-04 23:56:18 +0300
commit0b1b9c409d3adbf4517351dbb9037ed053f73e67 (patch)
tree2a8b6e8c3efe9f5ffbab63b80e8871ebf84ff6da /lib/gitlab/workhorse.rb
parenteaed588bf228c833cb666a61bc7d25cf21d5f94b (diff)
Add option to suppress archive commit sha
Repository archives are always named `<project>-<ref>-<sha>` even if the ref is a commit. A consequence of always including the sha even for tags is that packaging a release is more difficult because both the ref and sha must be known by the packager. - add append_sha option (defaults true) to provide a method for toggling this feature. Support added to GitLab Workhorse by gitlab-org/gitlab-workhorse!232
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index b102812ec12..bdb20060cc0 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -63,10 +63,10 @@ module Gitlab
]
end
- def send_git_archive(repository, ref:, format:)
+ def send_git_archive(repository, ref:, format:, append_sha: true)
format ||= 'tar.gz'
format.downcase!
- params = repository.archive_metadata(ref, Gitlab.config.gitlab.repository_downloads_path, format)
+ params = repository.archive_metadata(ref, Gitlab.config.gitlab.repository_downloads_path, format, append_sha)
raise "Repository or ref not found" if params.empty?
if Gitlab::GitalyClient.feature_enabled?(:workhorse_archive, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT)