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

Method TreeObject

repository.go:1410–1412  ·  view source on GitHub ↗

TreeObject return a Tree with the given hash. If not found plumbing.ErrObjectNotFound is returned

(h plumbing.Hash)

Source from the content-addressed store, hash-verified

1408// TreeObject return a Tree with the given hash. If not found
1409// plumbing.ErrObjectNotFound is returned
1410func (r *Repository) TreeObject(h plumbing.Hash) (*object.Tree, error) {
1411 return object.GetTree(r.Storer, h)
1412}
1413
1414// TreeObjects returns an unsorted TreeIter with all the trees in the repository
1415func (r *Repository) TreeObjects() (*object.TreeIter, error) {

Callers 1

TestTreeMethod · 0.80

Calls 1

GetTreeFunction · 0.92

Tested by 1

TestTreeMethod · 0.64