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

Method CommitObjects

repository.go:1440–1447  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

1438
1439// CommitObjects returns an unsorted CommitIter with all the commits in the repository.
1440func (r *Repository) CommitObjects() (object.CommitIter, error) {
1441 iter, err := r.Storer.IterEncodedObjects(plumbing.CommitObject)
1442 if err != nil {
1443 return nil, err
1444 }
1445
1446 return object.NewCommitIter(r.Storer, iter), nil
1447}
1448
1449// BlobObject returns a Blob with the given hash. If not found
1450// plumbing.ErrObjectNotFound is returned.

Callers 2

TestCommitsMethod · 0.80

Calls 2

NewCommitIterFunction · 0.92
IterEncodedObjectsMethod · 0.65

Tested by 2

TestCommitsMethod · 0.64