HasUncommittedChanges returns true if there are local, uncommitted changes.
()
| 174 | |
| 175 | // HasUncommittedChanges returns true if there are local, uncommitted changes. |
| 176 | func (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. |
| 188 | func (repo *GitRepo) VerifyCommit(hash string) error { |
nothing calls this directly
no test coverage detected