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

Method TreeObjects

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

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

()

Source from the content-addressed store, hash-verified

1422
1423// TreeObjects returns an unsorted TreeIter with all the trees in the repository
1424func (r *Repository) TreeObjects() (*object.TreeIter, error) {
1425 iter, err := r.Storer.IterEncodedObjects(plumbing.TreeObject)
1426 if err != nil {
1427 return nil, err
1428 }
1429
1430 return object.NewTreeIter(r.Storer, iter), nil
1431}
1432
1433// CommitObject return a Commit with the given hash. If not found
1434// plumbing.ErrObjectNotFound is returned.

Callers 1

TestTreesMethod · 0.80

Calls 2

NewTreeIterFunction · 0.92
IterEncodedObjectsMethod · 0.65

Tested by 1

TestTreesMethod · 0.64