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

Method TreeObject

repository.go:1419–1421  ·  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

1417// TreeObject return a Tree with the given hash. If not found
1418// plumbing.ErrObjectNotFound is returned
1419func (r *Repository) TreeObject(h plumbing.Hash) (*object.Tree, error) {
1420 return object.GetTree(r.Storer, h)
1421}
1422
1423// TreeObjects returns an unsorted TreeIter with all the trees in the repository
1424func (r *Repository) TreeObjects() (*object.TreeIter, error) {

Callers 1

TestTreeMethod · 0.80

Calls 1

GetTreeFunction · 0.92

Tested by 1

TestTreeMethod · 0.64