#8 change checkout.

This commit is contained in:
Gorbunov Kirill Andreevich 2024-04-09 00:08:19 +03:00
parent c0887adf99
commit 11d6e7d29e

View File

@ -459,7 +459,7 @@ func checkout(w *git.Worktree, ref plumbing.Reference) {
ctx := context.Background() ctx := context.Background()
logger.Debug(ctx, fmt.Sprintf("Checkout: %s", ref.Name().Short())) 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)) logger.Fatal(ctx, fmt.Sprintf("failed to reset: %v", err))
} }
} }