MCPcopy Create free account
hub / github.com/go-git/go-git / IsClean

Method IsClean

status.go:30–38  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 15

TestCheckoutSymlinkMethod · 0.45
TestCheckoutSubmoduleMethod · 0.45
TestCheckoutBranchMethod · 0.45
TestCheckoutCreateMethod · 0.45
TestCheckoutTagMethod · 0.45
TestCheckoutTagHashMethod · 0.45
testCheckoutBisectMethod · 0.45
TestStatusMethod · 0.45

Calls

no outgoing calls

Tested by 15

TestCheckoutSymlinkMethod · 0.36
TestCheckoutSubmoduleMethod · 0.36
TestCheckoutBranchMethod · 0.36
TestCheckoutCreateMethod · 0.36
TestCheckoutTagMethod · 0.36
TestCheckoutTagHashMethod · 0.36
testCheckoutBisectMethod · 0.36
TestStatusMethod · 0.36