Skip to content

Commit

Permalink
Revert "feat: check if there are changes found in the git tree (knqyf…
Browse files Browse the repository at this point in the history
…263#3)"

see knqyf263#21

This reverts commit 8e3da16.
  • Loading branch information
szuecs committed Jul 20, 2021
1 parent 5256316 commit e310809
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 e310809

Please sign in to comment.