summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-12-11 16:22:22 +0000
committerPhil Hughes <me@iamphill.com>2017-12-11 16:22:22 +0000
commitdec420feb39975fefd15460f372369071c346d53 (patch)
treed6826474b1038efed62917aa87f9200424019ff7
parentf38a6d6ee610e7301be35740d1cc0e3a1cbd42d0 (diff)
downloadgitlab-ce-dec420feb39975fefd15460f372369071c346d53.tar.gz
fixed project homepage not having correct variable
-rw-r--r--app/controllers/projects/tree_controller.rb1
-rw-r--r--lib/extracts_path.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb
index d56361eb3a5..f3719059f88 100644
--- a/app/controllers/projects/tree_controller.rb
+++ b/app/controllers/projects/tree_controller.rb
@@ -26,7 +26,6 @@ class Projects::TreeController < Projects::ApplicationController
respond_to do |format|
format.html do
- @lfs_blobs = Gitlab::Git::Blob.batch_lfs_pointers(@project.repository, @tree.blobs.map(&:id))
@last_commit = @repository.last_commit_for_path(@commit.id, @tree.path) || @commit
end
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 721ed97bb6b..bab46281922 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -128,6 +128,9 @@ module ExtractsPath
@hex_path = Digest::SHA1.hexdigest(@path)
@logs_path = logs_file_project_ref_path(@project, @ref, @path)
+ blob_ids = tree.blobs.map(&:id)
+ @lfs_blobs = Gitlab::Git::Blob.batch_lfs_pointers(@repo, blob_ids)
+
rescue RuntimeError, NoMethodError, InvalidPathError
render_404
end