From 7e1f61e1e6ce9c09fef68be6818d4c7162b54fa8 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 20 May 2026 16:52:22 +0000 Subject: reachability: CheckConnected should get a strict option --- reachability/connected.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'reachability/connected.go') 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() { } -- cgit v1.3.1-10-gc9f91