MCPcopy Index your code
hub / github.com/go-git/go-git / Objects

Method Objects

repository.go:1495–1502  ·  view source on GitHub ↗

Objects returns an unsorted ObjectIter with all the objects in the repository.

()

Source from the content-addressed store, hash-verified

1493
1494// Objects returns an unsorted ObjectIter with all the objects in the repository.
1495func (r *Repository) Objects() (*object.ObjectIter, error) {
1496 iter, err := r.Storer.IterEncodedObjects(plumbing.AnyObject)
1497 if err != nil {
1498 return nil, err
1499 }
1500
1501 return object.NewObjectIter(r.Storer, iter), nil
1502}
1503
1504// Head returns the reference where HEAD is pointing to.
1505func (r *Repository) Head() (*plumbing.Reference, error) {

Callers 6

TestCloneDetachedHEADMethod · 0.45
TestObjectsMethod · 0.45
BenchmarkObjectsFunction · 0.45

Calls 2

NewObjectIterFunction · 0.92
IterEncodedObjectsMethod · 0.65

Tested by 6

TestCloneDetachedHEADMethod · 0.36
TestObjectsMethod · 0.36
BenchmarkObjectsFunction · 0.36