Skip to content

Commit

Permalink
revert isClean() check due to inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Nuzhdin committed Jul 2, 2020
1 parent 45e54c7 commit 3e1328e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,6 @@ func run(c config) error {
return xerrors.Errorf("unable to get a worktree based on the given fs: %w", err)
}

s, err := w.Status()
if err != nil {
return xerrors.Errorf("unable to get the working tree status: %w", err)
}

if !s.IsClean() {
return xerrors.New("the repository is dirty: commit all changes before running 'cob'")
}

err = w.Reset(&git.ResetOptions{Commit: *prev, Mode: git.HardReset})
if err != nil {
return xerrors.Errorf("failed to reset the worktree to a previous commit: %w", err)
Expand Down

0 comments on commit 3e1328e

Please sign in to comment.