class documentation
class GraphTraversalReachability:
Constructor: GraphTraversalReachability(object_store)
Naive graph traversal implementation of ObjectReachabilityProvider.
This implementation wraps existing graph traversal functions (_collect_ancestors, _collect_filetree_revs) to provide the standard reachability interface without any performance optimizations.
| Method | __init__ |
Initialize the graph traversal provider. |
| Method | get |
Get all commits reachable from heads, excluding those in exclude. |
| Method | get |
Get all objects (commits + trees + blobs) reachable from commits. |
| Method | get |
Get all trees and blobs reachable from the given trees. |
| Instance Variable | store |
Undocumented |
def get_reachable_commits(self, heads:
Iterable[ ObjectID], exclude: Iterable[ ObjectID] | None = None, shallow: Set[ ObjectID] | None = None) -> set[ ObjectID]:
¶
Get all commits reachable from heads, excluding those in exclude.
Uses _collect_ancestors for commit traversal.
| Parameters | |
heads:Iterable[ | Starting commit SHAs |
exclude:Iterable[ | Commit SHAs to exclude (and their ancestors) |
shallow:Set[ | Set of shallow commit boundaries |
| Returns | |
set[ | Set of commit SHAs reachable from heads but not from exclude |