MCPcopy Create free account
hub / github.com/go-git/go-git / CommitObject

Method CommitObject

repository.go:1426–1428  ·  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

1424// CommitObject return a Commit with the given hash. If not found
1425// plumbing.ErrObjectNotFound is returned.
1426func (r *Repository) CommitObject(h plumbing.Hash) (*object.Commit, error) {
1427 return object.GetCommit(r.Storer, h)
1428}
1429
1430// CommitObjects returns an unsorted CommitIter with all the commits in the repository.
1431func (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 14

TestBlameMethod · 0.64
mockBlameMethod · 0.64
TestCommitMethod · 0.64
TestAlternatesRepoFunction · 0.64
ExampleSignerFunction · 0.64
TestCommitAmendMethod · 0.64
TestCommitSignMethod · 0.64
TestStatsWithRenameMethod · 0.64
TestStatsMethod · 0.64