Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 948b0c9

Browse files
authored
Merge pull request #1081 from meinto/fix/tobias/potentially-duplicate-check-for-unstaged-files
git: remove potentially duplicate check for unstaged files
2 parents 25e9f61 + aad49a3 commit 948b0c9

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

worktree.go

Lines changed: 0 additions & 11 deletions
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)