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

Method VerifyGitRef

repository/git.go:201–204  ·  view source on GitHub ↗

VerifyGitRef verifies that the supplied ref points to a known commit.

(ref string)

Source from the content-addressed store, hash-verified

199
200// VerifyGitRef verifies that the supplied ref points to a known commit.
201func (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.
207func (repo *GitRepo) GetHeadRef() (string, error) {

Callers 1

ResolveRefCommitMethod · 0.95

Calls 1

runGitCommandMethod · 0.95

Tested by

no test coverage detected