summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
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 /lib/extracts_path.rb
parent9c132216b74258d900d7bbfb88f158d53ede90b7 (diff)
downloadgitlab-ce-cbd3ce8f41fc5691a1d23aca0ffe3221ab5d26af.tar.gz
moved lfs_blob_ids method into ExtractsPath modulelfs-badge
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r--lib/extracts_path.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index f576ef74603..27c712a84d4 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -135,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