MCPcopy
hub / github.com/go-git/go-git / IsClean

Method IsClean

status.go:33–41  ·  view source on GitHub ↗

IsClean returns true if all the files are in Unmodified status.

()

Source from the content-addressed store, hash-verified

31
32// IsClean returns true if all the files are in Unmodified status.
33func (s Status) IsClean() bool {
34 for _, status := range s {
35 if status.Worktree != Unmodified || status.Staging != Unmodified {
36 return false
37 }
38 }
39
40 return true
41}
42
43func (s Status) String() string {
44 buf := bytes.NewBuffer(nil)

Calls

no outgoing calls