diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-16 21:14:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-16 21:14:09 +0300 |
commit | cab5a484fe5153edc5463603923491b1487faa5f (patch) | |
tree | 70ab8059b964452839165c99a48d2223536ca769 /lib/gitlab/task_helpers.rb | |
parent | 6aaec2fc6c3e3f96f443b96fd53ae9ed5e7979af (diff) |
Add latest changes from gitlab-org/gitlab@master
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 |