aboutsummaryrefslogtreecommitdiff
path: root/reachability/connected.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-06 11:32:17 +0800
committerGravatar Runxi Yu2026-03-06 11:32:17 +0800
commit362943bf4df40d31f66e12e225daee9d7a49bc0e (patch)
treeda19d49b59a5ba9a245f6698c51d4a3d35e70956 /reachability/connected.go
parentobjectstore/packed: Split files (diff)
signatureNo signature
reachability: Split files v0.1.58
Diffstat (limited to 'reachability/connected.go')
-rw-r--r--reachability/connected.go19
1 files changed, 19 insertions, 0 deletions
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()
+}