diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /lib/gitlab/task_helpers.rb | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'lib/gitlab/task_helpers.rb')
-rw-r--r-- | lib/gitlab/task_helpers.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/task_helpers.rb b/lib/gitlab/task_helpers.rb index 227962fc0f7..6a98fa12903 100644 --- a/lib/gitlab/task_helpers.rb +++ b/lib/gitlab/task_helpers.rb @@ -190,6 +190,9 @@ module Gitlab end def checkout_version(version, target_dir) + # Explicitly setting the git protocol version to v2 allows older Git binaries + # to do have a shallow clone obtain objects by object ID. + run_command!(%W[#{Gitlab.config.git.bin_path} -C #{target_dir} config protocol.version 2]) run_command!(%W[#{Gitlab.config.git.bin_path} -C #{target_dir} fetch --quiet origin #{version}]) run_command!(%W[#{Gitlab.config.git.bin_path} -C #{target_dir} checkout -f --quiet FETCH_HEAD --]) end |