From cfdc4822d4fe6abb79f6237f64957f463587fbaf Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Mon, 1 Jun 2026 09:03:26 +0200 Subject: [PATCH] ci(deps): make git clone support non-branch refs (#13787) --- .github/workflows/dependencies/updater.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies/updater.py b/.github/workflows/dependencies/updater.py index faab5a12c..6fc93ad6e 100644 --- a/.github/workflows/dependencies/updater.py +++ b/.github/workflows/dependencies/updater.py @@ -348,7 +348,7 @@ class Git: default_branch = "master" @staticmethod - def clone(remote_url: str, branch: str, repo_dir: str, reclone=False): + def clone(remote_url: str, ref: str, repo_dir: str, reclone=False): # If repo needs to be fresh if reclone and os.path.exists(repo_dir): shutil.rmtree(repo_dir) @@ -356,11 +356,11 @@ class Git: # Clone repo in tmp directory and checkout branch if not os.path.exists(repo_dir): print( - f"Cloning {remote_url} to {repo_dir} and checking out {branch}", + f"Cloning {remote_url} to {repo_dir} and checking out {ref}", file=sys.stderr, ) CommandRunner.run_or_fail( - ["git", "clone", "--depth=1", "-b", branch, remote_url, repo_dir], + ["git", "clone", "--depth=1", "--revision", ref, remote_url, repo_dir], stage="Clone", )