class documentation
Bitmap-accelerated implementation of ObjectReachabilityProvider.
This implementation uses packfile bitmap indexes where available to accelerate reachability queries. Falls back to graph traversal when bitmaps don't cover the requested commits.
| Method | __init__ |
Initialize the bitmap provider. |
| Method | get |
Get all commits reachable from heads using bitmaps where possible. |
| Method | get |
Get all objects reachable from commits using bitmaps. |
| Method | get |
Get all trees and blobs reachable from the given trees. |
| Instance Variable | store |
Undocumented |
| Method | _combine |
Combine bitmaps for multiple commits using OR, with optional exclusion. |
| Instance Variable | _fallback |
Undocumented |
Initialize the bitmap provider.
| Parameters | |
objectPackBasedObjectStore | Pack-based object store with bitmap support |
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 using bitmaps where possible.
| 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 |
def _combine_commit_bitmaps(self, commit_shas:
set[ ObjectID], exclude_shas: set[ ObjectID] | None = None) -> tuple[ EWAHBitmap, Pack] | None:
¶
Combine bitmaps for multiple commits using OR, with optional exclusion.
| Parameters | |
commitset[ | Set of commit SHAs to combine |
excludeset[ | Optional set of commit SHAs to exclude |
| Returns | |
tuple[ | Tuple of (combined_bitmap, pack) or None if bitmaps unavailable |