2.6 KiB
Checked-in fixture packs
These packfiles were generated once by the real git CLI and are committed
verbatim — they are never regenerated at test time (per DESIGN.md §9 Tier 1).
pack.test.ts reads them via the Effect FileSystem service and uses them as
parse/write round-trip oracles for src/Git/Protocol/PackParser.ts / PackWriter.ts.
The fixture repository
A three-commit repo built with a fixed identity and fixed timestamps so every object id is deterministic across regenerations:
- identity:
Fixture Author <fixture@example.com> - commit dates:
1700000000 +0000,1700000100 +0000,1700000200 +0000 - tree:
data.txt(128 → 160 repeated lines, delta-friendly),hello.txt,sub/nested.txt; annotated tagv1on the third commit
Head oids (also recorded in manifest.json):
| ref | oid |
|---|---|
| c1 | 9e0b5a0bd293f9feda554193a204193a2c3c5d9c |
| c2 | a54aa1a4d1bad30627948f555da8f1790e720054 |
| c3 | 6609ad4f494d317fbe0f82ac178029fa4260a3f9 |
tag v1 |
7062b0b73810cec6760d5ff12342082075b62e4f |
The packs
| file | generated by | contents |
|---|---|---|
empty.pack |
git pack-objects --stdout </dev/null |
header (count 0) + SHA-1 trailer only |
simple.pack |
git rev-list --objects --all | git pack-objects --window=0 --depth=0 --stdout |
every object, no deltas |
ofs-delta.pack |
same rev-list, git pack-objects --delta-base-offset --window=50 --depth=50 --stdout |
every object, OFS_DELTA entries present |
ref-delta.pack |
same rev-list, git pack-objects --window=50 --depth=50 --stdout (no --delta-base-offset) |
every object, REF_DELTA entries present |
base.pack |
git rev-list --objects <c1> | git pack-objects --window=0 --depth=0 --stdout |
c1's closure only — seeds the object store the thin pack resolves against |
thin.pack |
printf '%s\n^%s\n' <c2> <c1> | git pack-objects --thin --revs --stdout |
c2-only objects; thin REF_DELTA whose base lives only in base.pack |
manifest.json records, per pack, the exact object-id set (from
git rev-list --objects) and entry count that pack.test.ts asserts after
ingestion, plus the notable individual oids (commits, tag, first tree, the
delta-friendly blobs).
Regenerating (only if the fixture design changes)
The generation script lives in the coordinating session's scratchpad
(gen-packs.sh); it is a straight transcription of the table above: a temp
repo, three commits with the fixed dates, then the six git pack-objects
invocations. Because identity, dates, and content are pinned, regeneration
reproduces byte-identical object ids (pack bytes may differ across git
versions; the manifest oids may not).