diff options
author | Tobias Meinhardt <tobias.meinhardt89@gmail.com> | 2019-03-05 22:51:43 +0100 |
---|---|---|
committer | Tobias Meinhardt <tobias.meinhardt89@gmail.com> | 2019-03-05 22:54:14 +0100 |
commit | aad49a3a24e2ae669d67435e4ee4a0c9654dceeb (patch) | |
tree | ff3c18a91f10015037c990ea1c1ebaefd078888b /worktree.go | |
parent | 25e9f61108d7097d6614872b4d65e15f4cb581fa (diff) | |
download | go-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.go | 11 |
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 |