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

Method CommitObjects

repository.go:1431–1438  ·  view source on GitHub ↗

CommitObjects returns an unsorted CommitIter with all the commits in the repository.

()

Source from the content-addressed store, hash-verified

1429
1430// CommitObjects returns an unsorted CommitIter with all the commits in the repository.
1431func (r *Repository) CommitObjects() (object.CommitIter, error) {
1432 iter, err := r.Storer.IterEncodedObjects(plumbing.CommitObject)
1433 if err != nil {
1434 return nil, err
1435 }
1436
1437 return object.NewCommitIter(r.Storer, iter), nil
1438}
1439
1440// BlobObject returns a Blob with the given hash. If not found
1441// plumbing.ErrObjectNotFound is returned.

Callers 2

TestCommitsMethod · 0.80

Calls 2

NewCommitIterFunction · 0.92
IterEncodedObjectsMethod · 0.65

Tested by 2

TestCommitsMethod · 0.64