aboutsummaryrefslogtreecommitdiffstats
path: root/worktree.go
diff options
context:
space:
mode:
authorTobias Meinhardt <tobias.meinhardt89@gmail.com>2019-03-05 22:51:43 +0100
committerTobias Meinhardt <tobias.meinhardt89@gmail.com>2019-03-05 22:54:14 +0100
commitaad49a3a24e2ae669d67435e4ee4a0c9654dceeb (patch)
treeff3c18a91f10015037c990ea1c1ebaefd078888b /worktree.go
parent25e9f61108d7097d6614872b4d65e15f4cb581fa (diff)
downloadgo-git-aad49a3a24e2ae669d67435e4ee4a0c9654dceeb.tar.gz
git: remove potentially duplicate check for unstaged files
Signed-off-by: Tobias Meinhardt <tobias.meinhardt89@gmail.com>
Diffstat (limited to 'worktree.go')
-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