aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2019-03-11 10:42:05 +0100
committerGitHub <noreply@github.com>2019-03-11 10:42:05 +0100
commit948b0c930bf1b173b172e5f28aa71da454c3a093 (patch)
treeff3c18a91f10015037c990ea1c1ebaefd078888b
parent25e9f61108d7097d6614872b4d65e15f4cb581fa (diff)
parentaad49a3a24e2ae669d67435e4ee4a0c9654dceeb (diff)
downloadgo-git-948b0c930bf1b173b172e5f28aa71da454c3a093.tar.gz
Merge pull request #1081 from meinto/fix/tobias/potentially-duplicate-check-for-unstaged-files
git: remove potentially duplicate check for unstaged files
-rw-r--r--worktree.go11
1 files changed, 0 insertions, 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