summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r--lib/extracts_path.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 26f699f4c9d..aa9996c7685 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -128,7 +128,6 @@ module ExtractsPath
@hex_path = Digest::SHA1.hexdigest(@path)
@logs_path = logs_file_project_ref_path(@project, @ref, @path)
-
rescue RuntimeError, NoMethodError, InvalidPathError
render_404
end
@@ -138,6 +137,11 @@ module ExtractsPath
@tree ||= @repo.tree(@commit.id, @path) # rubocop:disable Gitlab/ModuleWithInstanceVariables
end
+ def lfs_blob_ids
+ blob_ids = tree.blobs.map(&:id)
+ @lfs_blob_ids = Gitlab::Git::Blob.batch_lfs_pointers(@project.repository, blob_ids).map(&:id)
+ end
+
private
# overriden in subclasses, do not remove