MCPcopy Index your code
hub / github.com/google/git-appraise / HasUncommittedChanges

Method HasUncommittedChanges

repository/git.go:176–185  ·  view source on GitHub ↗

HasUncommittedChanges returns true if there are local, uncommitted changes.

()

Source from the content-addressed store, hash-verified

174
175// HasUncommittedChanges returns true if there are local, uncommitted changes.
176func (repo *GitRepo) HasUncommittedChanges() (bool, error) {
177 out, err := repo.runGitCommand("status", "--porcelain")
178 if err != nil {
179 return false, err
180 }
181 if len(out) > 0 {
182 return true, nil
183 }
184 return false, nil
185}
186
187// VerifyCommit verifies that the supplied hash points to a known commit.
188func (repo *GitRepo) VerifyCommit(hash string) error {

Callers

nothing calls this directly

Calls 1

runGitCommandMethod · 0.95

Tested by

no test coverage detected