VerifyGitRef verifies that the supplied ref points to a known commit.
(ref string)
| 199 | |
| 200 | // VerifyGitRef verifies that the supplied ref points to a known commit. |
| 201 | func (repo *GitRepo) VerifyGitRef(ref string) error { |
| 202 | _, err := repo.runGitCommand("show-ref", "--verify", ref) |
| 203 | return err |
| 204 | } |
| 205 | |
| 206 | // GetHeadRef returns the ref that is the current HEAD. |
| 207 | func (repo *GitRepo) GetHeadRef() (string, error) { |
no test coverage detected