diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-03-25 11:20:49 +0300 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2019-04-02 17:07:16 +0300 |
commit | 6766a0a144bd07441b4593d25235924a14df0a91 (patch) | |
tree | 73deba69622e52ae41427cc56e6cd8e448e25612 /app/helpers | |
parent | e028276d34571cd5128021ab5daf3088eb538be2 (diff) |
Download a folder from repository
Add `GetArchiveRequest` to git-archive params.
Modifies `Git::Repository#archive_metadata` to append `path`
to `ArchivePrefix` so it'll not hit the cache of repository archive
when it already exists.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 12 | ||||
-rw-r--r-- | app/helpers/workhorse_helper.rb | 1 |
2 files changed, 4 insertions, 9 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index f5cae40aa86..009dd70c2c9 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -26,14 +26,6 @@ module ProjectsHelper image_tag(src, width: opts[:size], class: classes, alt: '', "data-src" => avatar) end - - def is_directory - @path.empty? ? false : true - end - - def get_directory_path - @path ? "#{@path}/" : '' - end def author_content_tag(author, opts = {}) default_opts = { author_class: 'author', tooltip: false, by_username: false } @@ -307,6 +299,10 @@ module ProjectsHelper }.to_json end + def directory? + @path.present? + end + private def get_project_nav_tabs(project, current_user) diff --git a/app/helpers/workhorse_helper.rb b/app/helpers/workhorse_helper.rb index 7c49a6e1c6d..bb5b1555dc4 100644 --- a/app/helpers/workhorse_helper.rb +++ b/app/helpers/workhorse_helper.rb @@ -31,7 +31,6 @@ module WorkhorseHelper # Archive a Git repository and send it through Workhorse def send_git_archive(repository, **kwargs) - kwargs.delete(:subdirectory) if kwargs[:subdirectory].nil? headers.store(*Gitlab::Workhorse.send_git_archive(repository, **kwargs)) head :ok end |