MCPcopy
hub / github.com/github/git-sizer / AddRoot

Method AddRoot

git/obj_iter.go:126–133  ·  view source on GitHub ↗

AddRoot adds another OID to be included in the walk.

(oid OID)

Source from the content-addressed store, hash-verified

124
125// AddRoot adds another OID to be included in the walk.
126func (iter *ObjectIter) AddRoot(oid OID) error {
127 select {
128 case iter.oidCh <- oid:
129 return nil
130 case <-iter.ctx.Done():
131 return iter.ctx.Err()
132 }
133}
134
135// Close closes the iterator and frees up resources.
136func (iter *ObjectIter) Close() {

Callers 1

ScanRepositoryUsingGraphFunction · 0.95

Calls 2

ErrMethod · 0.80
DoneMethod · 0.65

Tested by

no test coverage detected