1# Checked-in fixture packs
2
3These packfiles were generated **once** by the real `git` CLI and are committed
4verbatim — they are never regenerated at test time (per DESIGN.md §9 Tier 1).
5`pack.test.ts` reads them via the Effect `FileSystem` service and uses them as
6parse/write round-trip oracles for `src/Git/Protocol/PackParser.ts` / `PackWriter.ts`.
7
8## The fixture repository
9
10A three-commit repo built with a fixed identity and fixed timestamps so every
11object id is deterministic across regenerations:
12
13- identity: `Fixture Author <fixture@example.com>`
14- commit dates: `1700000000 +0000`, `1700000100 +0000`, `1700000200 +0000`
15- tree: `data.txt` (128 → 160 repeated lines, delta-friendly), `hello.txt`,
16 `sub/nested.txt`; annotated tag `v1` on the third commit
17
18Head oids (also recorded in `manifest.json`):
19
20| ref | oid |
21|---|---|
22| c1 | `9e0b5a0bd293f9feda554193a204193a2c3c5d9c` |
23| c2 | `a54aa1a4d1bad30627948f555da8f1790e720054` |
24| c3 | `6609ad4f494d317fbe0f82ac178029fa4260a3f9` |
25| tag `v1` | `7062b0b73810cec6760d5ff12342082075b62e4f` |
26
27## The packs
28
29| file | generated by | contents |
30|---|---|---|
31| `empty.pack` | `git pack-objects --stdout </dev/null` | header (count 0) + SHA-1 trailer only |
32| `simple.pack` | `git rev-list --objects --all \| git pack-objects --window=0 --depth=0 --stdout` | every object, **no deltas** |
33| `ofs-delta.pack` | same rev-list, `git pack-objects --delta-base-offset --window=50 --depth=50 --stdout` | every object, **OFS_DELTA** entries present |
34| `ref-delta.pack` | same rev-list, `git pack-objects --window=50 --depth=50 --stdout` (no `--delta-base-offset`) | every object, **REF_DELTA** entries present |
35| `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 |
36| `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` |
37
38`manifest.json` records, per pack, the exact object-id set (from
39`git rev-list --objects`) and entry count that `pack.test.ts` asserts after
40ingestion, plus the notable individual oids (commits, tag, first tree, the
41delta-friendly blobs).
42
43## Regenerating (only if the fixture design changes)
44
45The generation script lives in the coordinating session's scratchpad
46(`gen-packs.sh`); it is a straight transcription of the table above: a temp
47repo, three commits with the fixed dates, then the six `git pack-objects`
48invocations. Because identity, dates, and content are pinned, regeneration
49reproduces byte-identical object ids (pack bytes may differ across git
50versions; the manifest oids may not).