···8899// Reachability provides graph traversal over objects in one object store.
1010//
1111-// It is not safe for concurrent use.
1111+// Labels: MT-Unsafe.
1212type Reachability struct {
1313 store objectstore.ReadingStore
1414 graph *commitgraphread.Reader
1515}
16161717// New builds a Reachability over one object store.
1818+//
1919+// Labels: Deps-Borrowed.
1820func New(store objectstore.ReadingStore) *Reachability {
1921 return &Reachability{store: store}
2022}
21232224// NewWithCommitGraph builds a Reachability over one object store with an
2325// optional commit-graph reader for faster commit-domain traversal.
2626+//
2727+// Labels: Deps-Borrowed.
2428func NewWithCommitGraph(store objectstore.ReadingStore, graph *commitgraphread.Reader) *Reachability {
2529 return &Reachability{store: store, graph: graph}
2630}
+6
reachability/walk.go
···55)
6677// Walk is one single-use iterator traversal.
88+//
99+// Labels: MT-Unsafe.
810type Walk struct {
911 reachability *Reachability
1012 domain Domain
···2022//
2123// In DomainCommits, when a commit-graph reader is attached, parent expansion
2224// may use commit-graph metadata for speed.
2525+//
2626+// Walk retains haves and wants as provided.
2727+//
2828+// Labels: Life-Parent.
2329func (r *Reachability) Walk(domain Domain, haves, wants map[objectid.ObjectID]struct{}) *Walk {
2430 walk := &Walk{
2531 reachability: r,
+2
reachability/walk_seq.go
···88)
991010// Seq returns the traversal sequence. It is single-use.
1111+//
1212+// Labels: Life-Parent.
1113func (walk *Walk) Seq() iter.Seq[objectid.ObjectID] {
1214 if walk.seqUsed {
1315 return func(yield func(objectid.ObjectID) bool) {