Skip to main content

Module blob_batch

Module blob_batch 

Source
Expand description

Loading many blobs through one git cat-file --batch. What: Loading many blobs through one git cat-file --batch, optionally from a private object store, with strict parsing of the batch output. Why: Post-landing completion reads the original and intended bytes of every added path; one batch replaces a Git start per object (src/policy-engine/blob-batch.ts).

In TS you’d write (pseudocode):

const blobs = await loadBlobBatch({ gitPath, cwd, oids, objectDirectory, createError });

Functions§

load_blob_batch
What: Load every distinct requested blob through one batch, optionally reading a private object store (whose alternates still reach the real one). Why: loadBlobBatch; request order is first-seen order.
parse_batch_header
What: One successful batch header: the object ID and its byte length. Why: parseBatchHeader: <oid> blob <size>, exactly three space-separated fields, a blob, and a canonical decimal size.
parse_batch_output
What: Parse ordered batch output for the requested objects, never reading blob bytes as delimiters. Why: parseBatchOutput: every header names the requested object, every content ends with a newline, and nothing trails.