Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-12-15 12:02:24 +0300
committerDouwe Maan <douwe@gitlab.com>2017-12-15 12:02:24 +0300
commit1baea77438779e74657b49ca26810d6c8f041b41 (patch)
tree480634259d9a6d88351a842a4a49561001ec111c /lib/extracts_path.rb
parentc96e2edc105a46c93bcbf6841c8ec52270d6a601 (diff)
parentcbd3ce8f41fc5691a1d23aca0ffe3221ab5d26af (diff)
Merge branch 'lfs-badge' into 'master'
Added LFS badge to indicate LFS tracked files Closes #15567 See merge request gitlab-org/gitlab-ce!15845
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 721ed97bb6b..27c712a84d4 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -127,7 +127,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
@@ -136,6 +135,11 @@ module ExtractsPath
@tree ||= @repo.tree(@commit.id, @path)
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