pub struct GitOverlayBlobHydrator { /* private fields */ }Expand description
Read-time blob hydrator for Git-overlay lazy clones (issue #50).
Plugs into repo::Repository::set_blob_hydrator. When
Repository::require_blob hits a missing-blob marker — i.e. the
blake3-hashed blob is recorded in .heddle/partial-fetch but is
absent from the local object store — the read path delegates here.
This hydrator looks up the corresponding Git object id, fetches the
blob from the underlying sley repo when it is already present locally
and writes the bytes into the heddle store. Native promisor fetching
for absent Git blobs is not implemented yet; Heddle rejects public
Git-overlay lazy/filtered clones until that path can run without a
git executable.
§Why a side-table?
PartialFetchMetadata records blake3 hashes only, but
Repository::read_object is keyed by Git OID. The bridge
already computes blake3↔git mappings for commits (see
SyncMapping in git_projection_engine/git_core.rs); blob mappings are
constructed on-the-fly during import. We accept the same shape of
mapping here, populated by the caller (clone-time or test-time)
before Self::hydrate fires. Future work: persist a sidecar
blob mapping during import so a fresh Repository::open in a
separate process can rebuild this map without re-walking history.
Implementations§
Source§impl GitOverlayBlobHydrator
impl GitOverlayBlobHydrator
pub fn new(git_repo_path: PathBuf) -> Self
Sourcepub fn record_blob_oid(&self, hash: ContentHash, oid: ObjectId)
pub fn record_blob_oid(&self, hash: ContentHash, oid: ObjectId)
Pre-seed the blake3 → git OID mapping. Called by the importer (or by tests) as missing blobs are discovered.
Trait Implementations§
Source§impl BlobHydrator for GitOverlayBlobHydrator
impl BlobHydrator for GitOverlayBlobHydrator
fn hydrate(&self, repo: &Repository, hash: &ContentHash) -> HeddleResult<()>
Auto Trait Implementations§
impl !Freeze for GitOverlayBlobHydrator
impl RefUnwindSafe for GitOverlayBlobHydrator
impl Send for GitOverlayBlobHydrator
impl Sync for GitOverlayBlobHydrator
impl Unpin for GitOverlayBlobHydrator
impl UnsafeUnpin for GitOverlayBlobHydrator
impl UnwindSafe for GitOverlayBlobHydrator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request