From 8c9b551cde356ef6df8711add4722ca240f308b5 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Mon, 23 Feb 2026 11:53:39 -0800 Subject: [PATCH] release: tag based on `refs/remotes/origin/main`. This avoids locally created branches from shadowing `origin/main`, for instance via the `git switch -c origin/main` mistake that originally motivated this script. --- tools/release/tag/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release/tag/main.go b/tools/release/tag/main.go index 6ad4548a1cd..d212f4b364d 100644 --- a/tools/release/tag/main.go +++ b/tools/release/tag/main.go @@ -121,7 +121,7 @@ func tag(args []string) error { // Produce the tag, using -s to PGP sign it. This will fail if a tag with // that name already exists. message := fmt.Sprintf("Release %s", tag) - _, err = git("tag", "-s", "-m", message, tag, "origin/"+branch) + _, err = git("tag", "-s", "-m", message, tag, "refs/remotes/origin/"+branch) if err != nil { return err }