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

Method NumChildren

plumbing/object/treenoder.go:135–142  ·  view source on GitHub ↗

len(t.tree.Entries) != the number of elements walked by treewalker for some reason because of empty directories, submodules, etc, so we have to walk here.

()

Source from the content-addressed store, hash-verified

133// for some reason because of empty directories, submodules, etc, so we
134// have to walk here.
135func (t *treeNoder) NumChildren() (int, error) {
136 children, err := t.Children()
137 if err != nil {
138 return 0, err
139 }
140
141 return len(children), nil
142}

Callers

nothing calls this directly

Calls 1

ChildrenMethod · 0.95

Tested by

no test coverage detected