aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_examples/checkout-branch/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/_examples/checkout-branch/main.go b/_examples/checkout-branch/main.go
index c7e1333..59dfdfc 100644
--- a/_examples/checkout-branch/main.go
+++ b/_examples/checkout-branch/main.go
@@ -35,7 +35,7 @@ func main() {
// ... checking out branch
Info("git checkout %s", branch)
- branchRefName := fmt.Sprintf("refs/heads/%s", branch)
+ branchRefName := plumbing.NewBranchReferenceName(branch)
branchCoOpts := git.CheckoutOptions{
Branch: plumbing.ReferenceName(branchRefName),
Force: true,