Extract supports_partial_clone_sparse_checkout?
This commit is contained in:
parent
99504c4474
commit
49e2cf9f92
@ -884,9 +884,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
||||
def partial_clone_sparse_checkout?
|
||||
return false if @only_paths.blank?
|
||||
|
||||
# There is some support for partial clones prior to 2.20, but we avoid using it
|
||||
# due to performance issues
|
||||
Version.create(Utils::Git.version) >= Version.create("2.20.0")
|
||||
Utils::Git.supports_partial_clone_sparse_checkout?
|
||||
end
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
|
||||
@ -141,5 +141,11 @@ module Utils
|
||||
raise ErrorDuringExecution.new(cmd, status: $CHILD_STATUS, output: [[:stdout, output]])
|
||||
end
|
||||
end
|
||||
|
||||
def supports_partial_clone_sparse_checkout?
|
||||
# There is some support for partial clones prior to 2.20, but we avoid using it
|
||||
# due to performance issues
|
||||
Version.create(version) >= Version.create("2.20.0")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user