diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-06-07 15:49:01 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-07 15:49:01 +0000 |
commit | ea2bd9cb4f8ec9652eea8122f75f059f4a71c9fc (patch) | |
tree | 1c1cf26122db6437b87d66fe6cc3ca243d7a5139 /lib | |
parent | e114c6fcccef929f955ce25556d71456c2b05930 (diff) | |
download | gitlab-ce-ea2bd9cb4f8ec9652eea8122f75f059f4a71c9fc.tar.gz |
Add git filter flag only if it is supported
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/lfs_changes.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/git/lfs_changes.rb b/lib/gitlab/git/lfs_changes.rb index 320b2ad007b..b230289e7bf 100644 --- a/lib/gitlab/git/lfs_changes.rb +++ b/lib/gitlab/git/lfs_changes.rb @@ -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) |