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

Method GetCommitHash

repository/git.go:212–214  ·  view source on GitHub ↗

GetCommitHash returns the hash of the commit pointed to by the given ref.

(ref string)

Source from the content-addressed store, hash-verified

210
211// GetCommitHash returns the hash of the commit pointed to by the given ref.
212func (repo *GitRepo) GetCommitHash(ref string) (string, error) {
213 return repo.runGitCommand("show", "-s", "--format=%H", ref)
214}
215
216// ResolveRefCommit returns the commit pointed to by the given ref, which may be a remote ref.
217//

Callers 3

ResolveRefCommitMethod · 0.95
mergeArchivesMethod · 0.95
ArchiveRefMethod · 0.95

Calls 1

runGitCommandMethod · 0.95

Tested by

no test coverage detected