Commit 6e6c38f1 authored by Francisco Javier López's avatar Francisco Javier López Committed by Douwe Maan

Moving rev-list lfs options to Lfschanges

parent bb31635b
......@@ -39,7 +39,9 @@ module Gitlab
end
def git_all_pointers
rev_list.all_objects(require_path: true) do |object_ids|
params = { options: ["--filter=blob:limit=#{Gitlab::Git::Blob::LFS_POINTER_MAX_SIZE}"], require_path: true }
rev_list.all_objects(params) do |object_ids|
Gitlab::Git::Blob.batch_lfs_pointers(@repository, object_ids)
end
end
......
......@@ -1557,7 +1557,7 @@ module Gitlab
end
end
def rev_list(including: [], excluding: [], objects: false, &block)
def rev_list(including: [], excluding: [], options: [], objects: false, &block)
args = ['rev-list']
args.push(*rev_list_param(including))
......@@ -1570,6 +1570,10 @@ module Gitlab
args.push('--objects') if objects
if options.any?
args.push(*options)
end
run_git!(args, lazy_block: block)
end
......
......@@ -37,8 +37,11 @@ module Gitlab
get_objects(opts, &lazy_block)
end
def all_objects(require_path: nil, &lazy_block)
get_objects(including: :all, require_path: require_path, &lazy_block)
def all_objects(options: [], require_path: nil, &lazy_block)
get_objects(including: :all,
options: options,
require_path: require_path,
&lazy_block)
end
# This methods returns an array of missed references
......@@ -54,8 +57,8 @@ module Gitlab
repository.rev_list(args).split("\n")
end
def get_objects(including: [], excluding: [], require_path: nil)
opts = { including: including, excluding: excluding, objects: true }
def get_objects(including: [], excluding: [], options: [], require_path: nil)
opts = { including: including, excluding: excluding, options: options, objects: true }
repository.rev_list(opts) do |lazy_output|
objects = objects_from_output(lazy_output, require_path: require_path)
......
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