Expand description
mkit→git object translation (SPEC-GIT-BRIDGE §3–§8).
translate_closure walks the reachable closure of a root object
bottom-up (children before parents, so a mirror is always
connectivity-valid mid-write) and emits each translated git object
exactly once through a caller-supplied sink. All per-object
mappings are pure functions; the only state is the blake3→sha1
cache the caller threads through, and that cache is rebuildable by
construction.
Structs§
- Translation
Batch - Result of translating one closure: the root’s git id plus how many
new objects were emitted (objects already in
knownare skipped).
Traits§
- Object
Source - Anything that can hand the translator deserialized mkit objects.
Functions§
- git_
mode - git mode string for an mkit tree-entry mode (§5).
- git_
type_ of - The git type a translated mkit object carries (§7.1).
- translate_
blob - §3: blob body is the data, verbatim.
- translate_
chunked - §4: flatten a content-defined chunked blob.
- translate_
closure - Translate the reachable closure of
root, emitting every newly translated object throughsinkin dependency order (children first).knownis the blake3→sha1 cache; it is consulted to skip already-translated subgraphs and updated with every emission. - translate_
commit - §6: commit with the pinned header layout.
- translate_
tag - §7: annotated/signed tag object.
- translate_
tree - §5: tree with entries re-sorted into git order.