MCPcopy
hub / github.com/go-git/go-git / CommitObject

Method CommitObject

repository.go:1435–1437  ·  view source on GitHub ↗

CommitObject return a Commit with the given hash. If not found plumbing.ErrObjectNotFound is returned.

(h plumbing.Hash)

Source from the content-addressed store, hash-verified

1433// CommitObject return a Commit with the given hash. If not found
1434// plumbing.ErrObjectNotFound is returned.
1435func (r *Repository) CommitObject(h plumbing.Hash) (*object.Commit, error) {
1436 return object.GetCommit(r.Storer, h)
1437}
1438
1439// CommitObjects returns an unsorted CommitIter with all the commits in the repository.
1440func (r *Repository) CommitObjects() (object.CommitIter, error) {

Callers 15

logMethod · 0.95
ResolveRevisionMethod · 0.95
getTreeFromCommitHashMethod · 0.95
TestBlameMethod · 0.80
mockBlameMethod · 0.80
TestCommitMethod · 0.80
CommitMethod · 0.80
ValidateMethod · 0.80
TestAlternatesRepoFunction · 0.80
ExampleSignerFunction · 0.80

Calls 1

GetCommitFunction · 0.92

Tested by 15

TestBlameMethod · 0.64
mockBlameMethod · 0.64
TestCommitMethod · 0.64
TestAlternatesRepoFunction · 0.64
ExampleSignerFunction · 0.64
TestCommitSignMethod · 0.64