From aad49a3a24e2ae669d67435e4ee4a0c9654dceeb Mon Sep 17 00:00:00 2001 From: Tobias Meinhardt Date: Tue, 5 Mar 2019 22:51:43 +0100 Subject: git: remove potentially duplicate check for unstaged files Signed-off-by: Tobias Meinhardt --- worktree.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/worktree.go b/worktree.go index a14fd8d..dae40a3 100644 --- a/worktree.go +++ b/worktree.go @@ -152,17 +152,6 @@ func (w *Worktree) Checkout(opts *CheckoutOptions) error { } } - if !opts.Force { - unstaged, err := w.containsUnstagedChanges() - if err != nil { - return err - } - - if unstaged { - return ErrUnstagedChanges - } - } - c, err := w.getCommitFromCheckoutOptions(opts) if err != nil { return err -- cgit