From 9331d4780847c1b9c44d03432b2eb16fc2c32f4b Mon Sep 17 00:00:00 2001 From: "Adrien M. BERNEDE" Date: Thu, 23 Feb 2023 16:38:16 +0100 Subject: [PATCH] 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 --- lib/spack/spack/fetch_strategy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 0ea42ecb36a..91936573111 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -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")