#8 change checkout.
This commit is contained in:
parent
11d6e7d29e
commit
85d580a63e
@ -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{Branch: ref.Name()}); err != nil {
|
||||
logger.Fatal(ctx, fmt.Sprintf("failed to reset: %v", err))
|
||||
if err := w.Checkout(&git.CheckoutOptions{Branch: ref.Name(), Create: false, Force: true}); err != nil {
|
||||
logger.Error(ctx, fmt.Sprintf("failed to reset: %v", err))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user