From 9f83f0f384a6e7b9a31b346c09c68e2eaebf9e7d Mon Sep 17 00:00:00 2001 From: wispem-wantex Date: Sat, 7 Jun 2025 09:26:18 -0400 Subject: [PATCH] Use the proper ref instead of always assuming it's a 'head' (might be a 'tag') --- checkout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkout.go b/checkout.go index a6dd0a1..a454139 100644 --- a/checkout.go +++ b/checkout.go @@ -59,7 +59,7 @@ func main() { } err = w.Checkout(&git.CheckoutOptions{ - Branch: plumbing.ReferenceName("refs/heads/" + refName), + Branch: plumbing.ReferenceName(ref), }) if err != nil { log.Fatal(err)