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

Method GetRepoStateHash

repository/git.go:148–151  ·  view source on GitHub ↗

GetRepoStateHash returns a hash which embodies the entire current state of a repository.

()

Source from the content-addressed store, hash-verified

146
147// GetRepoStateHash returns a hash which embodies the entire current state of a repository.
148func (repo *GitRepo) GetRepoStateHash() (string, error) {
149 stateSummary, error := repo.runGitCommand("show-ref")
150 return fmt.Sprintf("%x", sha1.Sum([]byte(stateSummary))), error
151}
152
153// GetUserEmail returns the email address that the user has used to configure git.
154func (repo *GitRepo) GetUserEmail() (string, error) {

Callers

nothing calls this directly

Calls 1

runGitCommandMethod · 0.95

Tested by

no test coverage detected