- Owner: @mahis1067 · `minigit/objects.py`, `tests/test_objects.py` - Docs: `docs/packfiles.md` - Depends on: #22 - Branch from updated `main`: `feat/packfile-compression` ### Steps 1. Review Week 4's packfile proposal. 2. Read selected objects through `read_object`; deduplicate hashes. 3. Write a compressed pack + hash-to-offset index under `.minigit/objects/`. 4. Store each object's type + exact bytes; keep original hashes. 5. Write temporary files first; publish only a complete pack + index. 6. Keep loose originals. New writes can stay loose; pruning/delta compression later. 7. Extend `read_object`: loose + packed lookup, same return type. 8. Validate type, lengths, offsets, compression, and hash. - Missing -> `ObjectNotFoundError` - Corrupt -> `ObjectCorruptError` 9. Keep `has_object` and duplicate writes working for packed-only objects. 10. Document format, lookup order, packing method, and one usage example. 11. `scripts/quality-check.sh` -> linked PR -> teammate review. ### Tests - Fresh store: packed blobs, trees, commits -> original bytes - Packed-only reads; mixed loose/packed reads - Empty/binary/Unicode content; repeated hashes - Truncated pack, bad index, broken zlib, wrong hash - Interrupted write -> old objects still readable - Existing tree/history tests still pass ### Done when - [ ] Pack round-trip works; hashes unchanged - [ ] Packed-only lookup + corruption checks work - [ ] Format + usage documented - [ ] Quality check green; PR open; review requested
Activity