From 362943bf4df40d31f66e12e225daee9d7a49bc0e Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 6 Mar 2026 11:32:17 +0800 Subject: reachability: Split files --- reachability/connected.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 reachability/connected.go (limited to 'reachability/connected.go') diff --git a/reachability/connected.go b/reachability/connected.go new file mode 100644 index 00000000..6496287d --- /dev/null +++ b/reachability/connected.go @@ -0,0 +1,19 @@ +package reachability + +import "codeberg.org/lindenii/furgit/objectid" + +// CheckConnected verifies that all objects reachable from wants (under the +// 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 { + walk := r.Walk(domain, haves, wants) + + walk.strict = true + for range walk.Seq() { + } + + return walk.Err() +} -- cgit v1.3.1-10-gc9f91