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

Method TreeObjects

repository.go:1415–1422  ·  view source on GitHub ↗

TreeObjects returns an unsorted TreeIter with all the trees in the repository

()

Source from the content-addressed store, hash-verified

1413
1414// TreeObjects returns an unsorted TreeIter with all the trees in the repository
1415func (r *Repository) TreeObjects() (*object.TreeIter, error) {
1416 iter, err := r.Storer.IterEncodedObjects(plumbing.TreeObject)
1417 if err != nil {
1418 return nil, err
1419 }
1420
1421 return object.NewTreeIter(r.Storer, iter), nil
1422}
1423
1424// CommitObject return a Commit with the given hash. If not found
1425// plumbing.ErrObjectNotFound is returned.

Callers 1

TestTreesMethod · 0.80

Calls 2

NewTreeIterFunction · 0.92
IterEncodedObjectsMethod · 0.65

Tested by 1

TestTreesMethod · 0.64