From a2f3b147451b3c956debd8f628f1c8501d3bf1c1 Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Wed, 27 May 2026 08:28:22 +0100 Subject: [PATCH] fix: upstream tag fetch needs explicit refspec (bare --tags errors 'no remote HEAD') git fetch --tags without a refspec errors 'couldn't find remote ref HEAD'; use 'refs/tags/*:refs/tags/*'. Verified: brings custom-html's 18 upstream version tags into the mirror PR clone so the upgrade stage finds a previous published version (was skipping). Co-Authored-By: Claude Opus 4.7 (1M context) --- runner/run_recipe_ci.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runner/run_recipe_ci.py b/runner/run_recipe_ci.py index 384e79b..8dc4581 100644 --- a/runner/run_recipe_ci.py +++ b/runner/run_recipe_ci.py @@ -96,7 +96,9 @@ def fetch_recipe(recipe: str, ref: str | None, src: str | None) -> None: # tags from the public upstream, never push to the recipe repo. Plain git (no bot token sent # to a foreign host). Non-fatal: if upstream is unreachable, upgrade degrades to a skip. upstream = f"https://git.coopcloud.tech/coop-cloud/{recipe}.git" - subprocess.run(["git", "-C", dest, "fetch", "--quiet", "--tags", upstream], check=False) + # Explicit tags refspec — a bare `fetch --tags ` errors "couldn't find remote ref HEAD". + subprocess.run(["git", "-C", dest, "fetch", "--quiet", upstream, + "refs/tags/*:refs/tags/*"], check=False) else: # Clean re-fetch from the catalogue. rm first so a leftover dir from a prior SRC+REF run # (which points origin at the private mirror and may lack version tags) can't poison the