diff options
| author | 2026-05-20 16:52:22 +0000 | |
|---|---|---|
| committer | 2026-05-20 16:52:22 +0000 | |
| commit | 7e1f61e1e6ce9c09fef68be6818d4c7162b54fa8 (patch) | |
| tree | 583713861f5df7a05fdb93d172545cc1ae8fdd25 /reachability/connected.go | |
| parent | ref/store: More bikeshedding (diff) | |
| signature | No signature | |
reachability: CheckConnected should get a strict option
Diffstat (limited to 'reachability/connected.go')
| -rw-r--r-- | reachability/connected.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/reachability/connected.go b/reachability/connected.go index 96211079..655c40b9 100644 --- a/reachability/connected.go +++ b/reachability/connected.go @@ -6,12 +6,13 @@ import objectid "codeberg.org/lindenii/furgit/object/id" // selected domain) can be fully traversed without missing-object/type/parse // errors, excluding subgraphs rooted at haves. // -// Even with commit-graph acceleration available, each visited commit is -// still validated against the object store. -func (r *Reachability) CheckConnected(domain Domain, haves, wants map[objectid.ObjectID]struct{}) error { +// With commit-graph acceleration available, +// each visited commit is validated against the object store +// iff struct is set to true. +func (r *Reachability) CheckConnected(domain Domain, haves, wants map[objectid.ObjectID]struct{}, strict bool) error { walk := r.Walk(domain, haves, wants) - walk.strict = true + walk.strict = strict for range walk.Seq() { } |
