Skip to content

Commit

Permalink
Fixed: Remove status which not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Treussart committed Dec 6, 2023
1 parent f418e49 commit 206ebcb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ 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'")
}
//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 {
Expand Down

0 comments on commit 206ebcb

Please sign in to comment.