summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-02 14:09:55 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-02 14:09:55 +0100
commit771f14b96e058649ca5db7ce6c99e38108d4abec (patch)
tree875e851b17b30673d2a128ab264f70ecc661d965 /app/controllers
parentb1f22aa35aa62d72f514b3f9beee0a190b6599cc (diff)
downloadgitlab-ce-771f14b96e058649ca5db7ce6c99e38108d4abec.tar.gz
First version of "git archive" headers
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/repositories_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb
index ba9aea1c165..5c7614cfbaf 100644
--- a/app/controllers/projects/repositories_controller.rb
+++ b/app/controllers/projects/repositories_controller.rb
@@ -11,7 +11,9 @@ class Projects::RepositoriesController < Projects::ApplicationController
end
def archive
- render json: ArchiveRepositoryService.new(@project, params[:ref], params[:format]).execute
+ RepositoryArchiveCacheWorker.perform_async
+ headers.store(*Gitlab::Workhorse.send_git_archive(@project, params[:ref], params[:format]))
+ head :ok
rescue => ex
logger.error("#{self.class.name}: #{ex}")
return git_not_found!