diff --git a/sso/apply.sh b/sso/apply.sh index 59a2572aed..f7114b749b 100755 --- a/sso/apply.sh +++ b/sso/apply.sh @@ -23,7 +23,11 @@ if ! git remote get-url upstream >/dev/null 2>&1; then fi echo "[sso] fetching tag $TAG" -git fetch --no-tags upstream "refs/tags/${TAG}:refs/tags/${TAG}" +# Forced (+): a same-named tag may already exist locally (e.g. the CI checkout +# of the fork, fetch-depth 0, copies every tag the fork holds). Without + git +# refuses with "would clobber existing tag" and the build dies before the +# overlay is applied. Upstream is the source of truth for upstream tags. +git fetch --no-tags upstream "+refs/tags/${TAG}:refs/tags/${TAG}" echo "[sso] preparing worktree at $OUT" git worktree remove --force "$OUT" 2>/dev/null || true