Skip to content

Commit aad49a3

Browse files
author
Tobias Meinhardt
committed
git: remove potentially duplicate check for unstaged files
Signed-off-by: Tobias Meinhardt <[email protected]>
1 parent 25e9f61 commit aad49a3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

worktree.go

-11
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,6 @@ func (w *Worktree) Checkout(opts *CheckoutOptions) error {
152152
}
153153
}
154154

155-
if !opts.Force {
156-
unstaged, err := w.containsUnstagedChanges()
157-
if err != nil {
158-
return err
159-
}
160-
161-
if unstaged {
162-
return ErrUnstagedChanges
163-
}
164-
}
165-
166155
c, err := w.getCommitFromCheckoutOptions(opts)
167156
if err != nil {
168157
return err

0 commit comments

Comments
 (0)