From 11d6e7d29ecf71ed97dad3aef8acbcfe6367e73e Mon Sep 17 00:00:00 2001 From: Gorbunov Kirill Andreevich Date: Tue, 9 Apr 2024 00:08:19 +0300 Subject: [PATCH] #8 change checkout. --- internal/source/gitlab/gitlab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/source/gitlab/gitlab.go b/internal/source/gitlab/gitlab.go index 4b1898c..5ac9a4e 100644 --- a/internal/source/gitlab/gitlab.go +++ b/internal/source/gitlab/gitlab.go @@ -459,7 +459,7 @@ func checkout(w *git.Worktree, ref plumbing.Reference) { ctx := context.Background() logger.Debug(ctx, fmt.Sprintf("Checkout: %s", ref.Name().Short())) - if err := w.Checkout(&git.CheckoutOptions{Hash: ref.Hash()}); err != nil { + if err := w.Checkout(&git.CheckoutOptions{Branch: ref.Name()}); err != nil { logger.Fatal(ctx, fmt.Sprintf("failed to reset: %v", err)) } }