diff options
Diffstat (limited to 'worktree.go')
-rw-r--r-- | worktree.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/worktree.go b/worktree.go index dae40a3..1b10449 100644 --- a/worktree.go +++ b/worktree.go @@ -160,6 +160,8 @@ func (w *Worktree) Checkout(opts *CheckoutOptions) error { ro := &ResetOptions{Commit: c, Mode: MergeReset} if opts.Force { ro.Mode = HardReset + } else if opts.Keep { + ro.Mode = SoftReset } if !opts.Hash.IsZero() && !opts.Create { |