#8 Checkout, auth. #16

Closed
kgorbunov wants to merge 104 commits from kgorbunov:dev into master
Showing only changes of commit a18e12bfc4 - Show all commits

View File

@ -459,7 +459,9 @@ 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{Branch: ref.Name(), Create: false, Force: true}); err != nil { if err := w.Checkout(&git.CheckoutOptions{
Branch: plumbing.ReferenceName(ref.Name().String()),
}); err != nil {
logger.Error(ctx, fmt.Sprintf("failed to reset: %v", err)) logger.Error(ctx, fmt.Sprintf("failed to reset: %v", err))
} }
} }