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

Function NewTreeIter

plumbing/object/tree.go:513–515  ·  view source on GitHub ↗

NewTreeIter takes a storer.EncodedObjectStorer and a storer.EncodedObjectIter and returns a *TreeIter that iterates over all tree contained in the storer.EncodedObjectIter. Any non-tree object returned by the storer.EncodedObjectIter is skipped.

(s storer.EncodedObjectStorer, iter storer.EncodedObjectIter)

Source from the content-addressed store, hash-verified

511//
512// Any non-tree object returned by the storer.EncodedObjectIter is skipped.
513func NewTreeIter(s storer.EncodedObjectStorer, iter storer.EncodedObjectIter) *TreeIter {
514 return &TreeIter{iter, s}
515}
516
517// Next moves the iterator to the next tree and returns a pointer to it. If
518// there are no more trees, it returns io.EOF.

Callers 2

TreeObjectsMethod · 0.92
TestTreeIterMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestTreeIterMethod · 0.68