summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-06-07 15:49:01 +0000
committerDouwe Maan <douwe@gitlab.com>2018-06-07 15:49:01 +0000
commitea2bd9cb4f8ec9652eea8122f75f059f4a71c9fc (patch)
tree1c1cf26122db6437b87d66fe6cc3ca243d7a5139 /lib
parente114c6fcccef929f955ce25556d71456c2b05930 (diff)
downloadgitlab-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.rb6
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)