Skip to main content

Crate sley_odb

Crate sley_odb 

Source

Structs§

Alternate
AtomicCancel
Shared atomic cancellation flag.
BitmapPseudoMergeGroup
BitmapPseudoMergePartition
BitmapWalkResult
Result of a bitmap-assisted reachability walk: pack-position bits for in-pack objects plus the “extended” objects encountered outside the bitmapped pack (in first-seen order, like upstream’s extended index).
BundleUnbundleResult
CancelFlag
Cheap cooperative cancel handle for long-running I/O.
CancellableRead
Read adapter that polls a CancelFlag before each underlying read.
CruftPack
The bytes of one cruft .mtimes pack plus its sidecars and checksum, ready to install under objects/pack/.
CruftPackOptions
Pack-writing policy specific to the unreachable-object side of a cruft repack. Keeping this separate from RepackOptions lets callers resolve command/config precedence once while the engine applies the same policy to both the surviving and expired cruft packs.
CruftRepackResult
Outcome of git repack --cruft: the reachable pack (if any) plus the cruft .mtimes pack of surviving unreachable objects.
FileObjectDatabase
One registered .idx/.pack pair from a pack directory. The index is parsed when the registry snapshot is built; pack bytes and per-pack decode/header caches hang directly off this record so repeated object lookups do not bounce through path-keyed maps.
GcRepackPlanOptions
Inputs which determine GC’s repack strategy and child-command trace.
GcRepackPlanOutcome
Planned engine strategy and Git-compatible repack argv.
GeometricRepackMidxSelection
Exact pack table and preferred pack for a MIDX written by git repack.
GeometricRepackOptions
Additional object-selection policy for a geometric repack.
GeometricRepackPlan
GeometricRepackResult
The outcome of a geometric rollup: the new pack (if one was written) plus the rolled-up packs whose objects it now serves.
IncomingPackQuarantine
Disposable object database for an untrusted incoming pack.
LoadedPackBitmap
A pack’s .bitmap loaded for consultation: oid <-> pack-position mappings, resolved (XOR-expanded) per-commit reachability bitsets, and the four object type bitmaps. Bit numbering follows pack order throughout.
LooseObjectStore
MultiPackIndexBitmapInputs
Runtime inputs needed only when a MIDX bitmap is actually built.
MultiPackIndexEntryLayerOptions
Inputs for serializing a MIDX layer whose pack table and object locations have already been selected by an incremental compaction operation.
MultiPackIndexLayerOptions
Semantic inputs for building one MIDX layer from pack indexes.
MultiPackIndexLayerOutcome
Fully materialized bytes and selection metadata for one MIDX layer.
ObjectDatabase
ObjectPresenceChecker
ObjectReplacements
Explicit replacement-object policy injected by repository setup.
ObjectStorageInfo
PackInstallProgress
Monotonic receipt and indexing counters for one staged pack installation.
PackInstallResult
PackUnpackResult
PartialClonePolicy
PreparedRepackResult
A repack whose pack payload is staged on the destination filesystem.
RawPackIndexResult
RawPackIndexedObject
RawPackInstallOptions
RawPackInstallResult
RawPackStreamingInstall
ReachabilityBitmapOptions
Optional extensions for a reachability bitmap write. The hash cache is in oid-sorted index order (pack index or MIDX OIDL order), independent of the bitmap’s pack-order bit numbering.
ReachablePackBuild
A reachable pack together with evidence that its reuse path engaged.
ReachablePackFile
ReachablePackInstallOutcome
Result of one reachable transfer installation. object_count describes equal work independently of storage policy: it is retained when a small transfer is unpacked into loose objects and install is therefore None.
ReachablePackReuseStats
Pack-reuse counters for one reachable-pack build.
ReachablePackReuseWrite
A reachable pack written directly to a caller-owned stream, together with its checksum/object-count evidence and retained-entry reuse counters.
ReachablePackThinBaseCandidates
Optional client-owned objects that upload-pack may use as external delta bases while building a thin transfer pack.
ReachablePackWriteSummary
RepackInstallOptions
Installation policy for pack companions produced by a repack.
RepackOptions
RepackResult
ReusablePackCandidate
One existing pack offered for transfer-pack entry reuse.
UnpackUnreachableRepackResult
Outcome for repack -A: a reachable pack plus packed-but-unreachable objects that must become loose before obsolete source packs are removed.

Enums§

BitmapHaveTraversal
Strategy used to compute the bitmap closure of the receiver’s have tips.
GcRepackMode
Repack strategy selected for one GC run.
GcRepackPlanError
Invalid GC planning input.
LooseObjectIntegrity
Integrity verdict for a single loose object file, as classified by LooseObjectStore::verify_object.
LooseObjectPruneOutcome
Whether installing a repack result accounts for every loose object that is duplicated by a surviving pack.
MissingMidxBitmapPolicy
Policy for a requested MIDX bitmap whose selected tips do not have complete closure in the packs represented by the new MIDX.
MultiPackIndexEvent
Non-fatal diagnostics discovered while selecting a MIDX layer.
MultiPackIndexLayerError
Engine-level failures which need command-specific exit codes/rendering.
ObjectPrefixResolution
PackObjectFilter
A partial-clone object filter applied while building a transfer pack.
PreparedRepackOutcome
Whether the staged path handled a request or deliberately deferred to the compatibility-preserving in-memory implementation.
ReachablePackMissingPolicy
How a transfer-pack walk treats objects promised by an incomplete source.

Traits§

ObjectReader
ObjectWriter
RawPackInstaller

Functions§

assemble_pack_with_verbatim_entries
Assemble a pack stream by copying already-encoded pack entries verbatim and appending freshly encoded undeltified entries.
assemble_pack_with_verbatim_reuse
Assemble a pack stream that reuses an existing pack’s object data verbatim (upstream pack-objects’ “pack reuse” fast path, full-pack case) and appends appended as freshly encoded undeltified entries.
assemble_pack_with_verbatim_reuses
Like assemble_pack_with_verbatim_reuse, but concatenates multiple whole packs before appending fresh entries.
bitmap_reachable
Computes the set of objects reachable from roots using stored bitmaps where available and a fill-in object walk where not — the consult half of the bitmap engine (upstream find_objects + fill_in_bitmap).
bitmap_reachable_excluding_haves
Compute wants minus haves using the selected have-side bitmap traversal. The trace2 region is emitted here, around real bitmap-engine work, so every transport/CLI consumer observes the same strategy decision.
build_and_install_reachable_pack
build_and_install_reachable_pack_filtered
build_and_install_reachable_pack_filtered_with_missing_policy
Build and install a filtered transfer pack with an explicit promised-object policy. The omission mode is reserved for a server whose client accepted a protocol-v2 promisor-remote advertisement.
build_and_install_reachable_pack_filtered_with_thin_bases
Build and install a filtered transfer pack, optionally considering objects from the client’s negotiated have closure as external thin-pack bases. Candidate selection is bounded per object type and deterministic so a large client repository cannot turn delta planning into an unbounded comparison.
build_cruft_pack_pub
Public wrapper over build_cruft_pack for the --expire-to limbo pack.
build_cruft_packs_from_mtimes
Build one or more self-contained cruft packs from per-object mtimes using the same encoded-size-aware splitter as repack --cruft.
build_empty_cruft_pack
Build the protocol-visible empty cruft pack emitted by pack-objects when expiration removes every candidate. Repository-level repack callers omit empty cruft output, but the plumbing command still prints a pack name and writes an empty .mtimes sidecar.
build_midx_bitmap
build_pack_bitmap’s multi-pack sibling: builds the serialised multi-pack-index-<checksum>.bitmap for midx_entries, with bits in pseudo-pack order (preferred pack first, then pack id, then offset — the same order MultiPackIndex::write_with_reverse_index records in RIDX) and the midx checksum in the BITM checksum field.
build_midx_bitmap_with_options
build_multi_pack_index_layer
Build an ordinary or incremental multi-pack-index layer.
build_multi_pack_index_layer_from_entries
Serialize one already-selected MIDX layer, including its optional bitmap and reverse index. Incremental compaction uses this after remapping entries from several source layers into a single pack table.
build_pack_bitmap
Builds a serialised .bitmap for the pack described by index_entries / pack_checksum, mirroring upstream pack-bitmap-write.c:
build_reachable_pack
build_reachable_pack_file
build_reachable_pack_filtered
Build a self-contained pack of the objects reachable from starts (excluding excluded) with a partial-clone filter applied, returning the packed bytes without installing them. This is the upload-pack server’s counterpart to build_reachable_pack: it honors filter blob:none / blob:limit=<n> / tree:<depth> requests so a filtered fetch omits the corresponding objects.
build_reachable_pack_filtered_with_reuse_stats
build_reachable_pack_filtered with explicit reuse counters.
build_reachable_pack_with_reuse_stats
build_reachable_pack with explicit reuse counters.
collect_reachable_object_ids
collect_reachable_object_ids_excluding
collect_reachable_object_ids with a stop set: objects in excluded are not visited and not expanded, so the walk never sees anything reachable only through them (used to truncate history at a shallow boundary).
collect_reachable_object_ids_tolerating_missing
collect_reachable_object_ids_tolerating_promised_missing
collect_reachable_object_ids_with_cut
collect_reachable_object_ids with a cut set: commits in cut are collected, but the walk does not continue to their parents — the view a shallow repository has of its own refs ($GIT_DIR/shallow of the other side, threaded explicitly because reader belongs to this side).
collect_reachable_objects
geometric_repack_midx_selection
Select the explicit pack list used by repack --write-midx after a geometric repack.
geometric_repack_plan
grafted_parents
Parents of a parsed commit with the graft seam applied: empty when the reader cuts history at oid (shallow boundary), the raw parsed parents otherwise.
index_raw_pack
index_raw_pack_file
install_bundle_pack
install_cruft_pack_at_prefix
Install an already-built cruft pack at a pack-file prefix such as expired.git/objects/pack/pack.
install_cruft_repack_result
Install a repack_cruft result: write the reachable pack and the cruft .mtimes pack, then under prune remove the superseded non-cruft packs, old cruft packs, and the loose objects now served.
install_cruft_repack_result_with_expire_to
Install an optional expired-object backup before committing the source cruft repack. Every output is validated before either destination is mutated; a destination failure therefore leaves all source packs intact.
install_geometric_repack_result
Install a repack_geometric result: write the new pack, then under prune remove EXACTLY the rolled-up packs (those below the geometric split) plus the loose objects now packed. Unlike install_repack_result, packs left in place above the split are never removed even though some of their objects may also live in the new pack.
install_prepared_repack_result_with_bitmap_options
Publish a file-backed repack after completing its requested sidecars.
install_reachable_pack
install_reachable_pack_excluding
install_repack_result
Write the consolidated pack from a RepackResult into objects/pack/ and, when prune is set, remove the now-redundant pre-existing packs and packed loose objects.
install_repack_result_with_bitmap
install_repack_result that additionally writes a pack-<checksum>.bitmap reachability bitmap alongside the new pack when bitmap_tips is Some. bitmap_tips carries the repository’s ref tips (peeled to commits): they receive selection preference, mirroring upstream’s NEEDS_BITMAP flagging of ref tips in git repack -b / pack-objects --write-bitmap-index.
install_repack_result_with_bitmap_options
Install a repack using an explicit sidecar policy.
install_repack_with_unpacked_unreachable
Install a repack -A outcome. Unreachable objects are written loose before pruning their source packs, so readers never observe them missing.
kept_pack_object_ids
load_pack_bitmap
Loads the single-pack .bitmap of objects_dir/pack, if a valid one exists. Scans pack-*.bitmap files (sorted, first valid wins, like upstream’s “first bitmap” behaviour), requires the sibling .idx, and verifies the recorded pack checksum. Any unreadable/corrupt bitmap yields Ok(None) — consumers fall back to a regular object walk, mirroring upstream’s warn-and-ignore on bitmap load failure.
object_ids_in_objects_dir
object_mtimes_on_disk_pub
Gather every object id on disk together with the best (max) mtime of any copy: a packed object contributes its pack’s mtime (or its own recorded mtime inside a cruft pack), a loose object contributes its file mtime.
packed_object_ids
plan_gc_repack
Select GC’s repack family without touching repository or process state.
prepare_repack_reachable_objects_with_options
Prepare an ordinary unfiltered all-reachable repack directly in the destination pack directory.
prune_unreachable_loose
List loose objects under git_dir that are not reachable from roots, optionally deleting them.
prune_unreachable_loose_tolerating_missing
Like prune_unreachable_loose, but missing links encountered while walking reachable roots are ignored. git gc uses this mode for pre-existing broken unreachable commits/trees/tags: the broken object itself is kept when recent, but its absent children do not make housekeeping fail.
repack_all_objects
repack_cruft
git repack --cruft [--cruft-expiration=<t>] [-d]: pack the reachable closure of roots into one new pack, then collect every unreachable object into a .mtimes-stamped cruft pack (honouring cruft_expiration). The caller installs the result and, under -d, removes the superseded non-cruft and old cruft packs.
repack_cruft_with_options
repack_cruft_with_options_and_max_size
repack_cruft_with_pack_options
Run a cruft repack with an explicit, typed cruft-pack policy.
repack_cruft_with_pack_options_and_recent_roots
Run a cruft repack while treating each explicit root and its closure as recent. This additive entry point keeps the original repack_cruft_with_pack_options signature stable for embedders.
repack_geometric
git repack --geometric=<factor>: roll up the smallest packs (plus loose unpacked objects) so the surviving packs form a geometric progression by object count. Objects in the rolled-up packs and loose objects are gathered into one new pack; packs at/above the split are left in place. The new pack excludes objects already served by a left-alone pack.
repack_geometric_with_options
repack_loose_objects
Gather only loose objects in git_dir and write them into a new pack.
repack_promisor_objects
Consolidate multiple existing promisor packs into one promisor pack.
repack_reachable_loose_objects
Pack only loose objects that belong to the reachability closure of roots. This is the engine for incremental git repack: unreachable loose objects remain loose so a later cruft repack can timestamp and collect them.
repack_reachable_objects
Gather every object in git_dir (loose objects and every existing pack) and write them into a single new delta-compressed pack.
repack_reachable_objects_unpack_unreachable
Build the -A form of an all-object repack.
repack_reachable_objects_with_blob_limit_to
Repack reachable objects while moving blobs at least limit bytes into a separate pack named <filter_to>-<checksum>.{pack,idx}. This is the native engine seam for repack --filter=blob:limit=<n> --filter-to=<prefix>.
repack_reachable_objects_with_object_filter
Repack reachable objects with a partial-clone style object filter.
repack_reachable_objects_with_options
repository_common_dir
Infallible adapter over the canonical resolver in sley_formats: on any resolution failure (missing/unreadable paths) fall back to the raw git dir rather than failing object-store access.
repository_object_ids
repository_objects_dir
unbundle_objects
unpack_packfile_objects
verify_bundle_prerequisites
write_object_id_pack_to_writer
write_object_id_pack_to_writer_with_cancel
Streaming object-id pack write that polls cancel between compression windows via PackFile::write_packed_from_source_to_writer_with_cancel.
write_reachable_pack_to_writer
write_reachable_pack_to_writer_with_cancel
Like write_reachable_pack_to_writer, polling cancel on the streaming path and once before a buffered known-ids write.
write_reachable_pack_with_reuse_stats_to_writer
Write a reachable pack directly to writer while preserving retained-pack entries. Large walks retain object metadata rather than every decoded body; fresh objects are compressed through the pack writer’s bounded window, and reused entries are copied to the destination as they are selected.