Add a step that forces the fetch of the specific commit

This will fetch even if the commit is on a PR from a fork
This commit is contained in:
Adrien M. BERNEDE 2023-02-23 16:38:16 +01:00
parent 5c7cccd052
commit 9331d47808

View File

@ -862,6 +862,9 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False):
)
with working_dir(dest):
# By defaults, on all references are fetched by the clone
fetch_args = ["fetch", "origin", "--depth 1", commit]
git(*fetch_args)
checkout_args = ["checkout", commit]
if not debug:
checkout_args.insert(1, "--quiet")