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

Method GetHeadRef

repository/git.go:207–209  ·  view source on GitHub ↗

GetHeadRef returns the ref that is the current HEAD.

()

Source from the content-addressed store, hash-verified

205
206// GetHeadRef returns the ref that is the current HEAD.
207func (repo *GitRepo) GetHeadRef() (string, error) {
208 return repo.runGitCommand("symbolic-ref", "HEAD")
209}
210
211// GetCommitHash returns the hash of the commit pointed to by the given ref.
212func (repo *GitRepo) GetCommitHash(ref string) (string, error) {

Callers

nothing calls this directly

Calls 1

runGitCommandMethod · 0.95

Tested by

no test coverage detected