summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-12-14 11:59:01 +0000
committerPhil Hughes <me@iamphill.com>2017-12-14 11:59:01 +0000
commitcbd3ce8f41fc5691a1d23aca0ffe3221ab5d26af (patch)
treeed843b1c13b5e231abc56a6fc304fea9868d8c73 /app/controllers
parent9c132216b74258d900d7bbfb88f158d53ede90b7 (diff)
downloadgitlab-ce-cbd3ce8f41fc5691a1d23aca0ffe3221ab5d26af.tar.gz
moved lfs_blob_ids method into ExtractsPath modulelfs-badge
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/tree_controller.rb4
-rw-r--r--app/controllers/projects_controller.rb5
2 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb
index 2998ec21dca..f752a46f828 100644
--- a/app/controllers/projects/tree_controller.rb
+++ b/app/controllers/projects/tree_controller.rb
@@ -26,10 +26,8 @@ class Projects::TreeController < Projects::ApplicationController
respond_to do |format|
format.html do
- blob_ids = tree.blobs.map(&:id)
-
+ lfs_blob_ids
@last_commit = @repository.last_commit_for_path(@commit.id, @tree.path) || @commit
- @lfs_blob_ids = Gitlab::Git::Blob.batch_lfs_pointers(@repo, blob_ids).map(&:id)
end
format.js do
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index bce3a8d42e4..b06981b4b1d 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -404,9 +404,4 @@ class ProjectsController < Projects::ApplicationController
#
redirect_to request.original_url.sub(/\.git\/?\Z/, '') if params[:format] == 'git'
end
-
- def lfs_blob_ids
- blob_ids = tree.blobs.map(&:id)
- @lfs_blob_ids = Gitlab::Git::Blob.batch_lfs_pointers(@repo, blob_ids).map(&:id)
- end
end