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 145be31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/knqyf263/cob
module github.com/Olfeo/cob

go 1.13

Expand Down
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 145be31

Please sign in to comment.