Add git filter flag only if it is supported
This commit is contained in:
parent
e114c6fccc
commit
ea2bd9cb4f
1 changed files with 5 additions and 1 deletions
|
@ -39,7 +39,11 @@ module Gitlab
|
|||
end
|
||||
|
||||
def git_all_pointers
|
||||
params = { options: ["--filter=blob:limit=#{Gitlab::Git::Blob::LFS_POINTER_MAX_SIZE}"], require_path: true }
|
||||
params = { require_path: true }
|
||||
|
||||
if Gitlab::Git.version >= Gitlab::VersionInfo.parse('2.16.0')
|
||||
params[:options] = ["--filter=blob:limit=#{Gitlab::Git::Blob::LFS_POINTER_MAX_SIZE}"]
|
||||
end
|
||||
|
||||
rev_list.all_objects(params) do |object_ids|
|
||||
Gitlab::Git::Blob.batch_lfs_pointers(@repository, object_ids)
|
||||
|
|
Loading…
Reference in a new issue