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.