diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-12-15 09:02:24 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-12-15 09:02:24 +0000 |
commit | 1baea77438779e74657b49ca26810d6c8f041b41 (patch) | |
tree | 480634259d9a6d88351a842a4a49561001ec111c /lib | |
parent | c96e2edc105a46c93bcbf6841c8ec52270d6a601 (diff) | |
parent | cbd3ce8f41fc5691a1d23aca0ffe3221ab5d26af (diff) | |
download | gitlab-ce-1baea77438779e74657b49ca26810d6c8f041b41.tar.gz |
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')
-rw-r--r-- | lib/extracts_path.rb | 6 |
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 |