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

Method Objects

repository.go:1486–1493  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

1484
1485// Objects returns an unsorted ObjectIter with all the objects in the repository.
1486func (r *Repository) Objects() (*object.ObjectIter, error) {
1487 iter, err := r.Storer.IterEncodedObjects(plumbing.AnyObject)
1488 if err != nil {
1489 return nil, err
1490 }
1491
1492 return object.NewObjectIter(r.Storer, iter), nil
1493}
1494
1495// Head returns the reference where HEAD is pointing to.
1496func (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