Commit bc239b55 authored by Valery Sizov's avatar Valery Sizov

Clean up confusing code in LfsListService

We had to pass HEAD to get all the references but
since https://gitlab.com/gitlab-org/gitaly/issues/2247 is fixed, we don't
need it anymore
parent 806841e2
......@@ -4,14 +4,12 @@
module Projects
module LfsPointers
class LfsListService < BaseService
REV = 'HEAD'
# Retrieve all lfs blob pointers and returns a hash
# with the structure { lfs_file_oid => lfs_file_size }
def execute
return {} unless project&.lfs_enabled?
Gitlab::Git::LfsChanges.new(project.repository, REV)
Gitlab::Git::LfsChanges.new(project.repository)
.all_pointers
.map! { |blob| [blob.lfs_oid, blob.lfs_size] }
.to_h
......
......@@ -3,7 +3,7 @@
module Gitlab
module Git
class LfsChanges
def initialize(repository, newrev)
def initialize(repository, newrev = nil)
@repository = repository
@newrev = newrev
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment