ref:main
Configurable object size limits and docs update #3
merged
cole.christensen@gmail.com wants to merge
feat/configurable-size-limits-and-docs
into main
No CI
Summary
- Add per-repo
max_object_sizeoption toRepo.new/2(default 128MB unchanged) - Enforce limit in object decode, pack reader (via ObjectResolver), and receive-pack
- Error messages include the configured limit for clarity
- Update CHANGELOG and README for recent features (fsck, dialyzer)
Closes #19
Changes
- lib/ex_git_objectstore/repo.ex — New
max_object_sizefield with 128MB default - lib/ex_git_objectstore/object.ex —
decode/2acceptsmax_size:option;read/2uses repo limit; error tuple simplified to{:object_too_large, detail_string} - lib/ex_git_objectstore/object_resolver.ex — Pack object size check against repo limit
- lib/ex_git_objectstore/protocol/receive_pack.ex — Incoming push object size validation
- CHANGELOG.md — Unreleased section with recent additions
- README.md — Added fsck to features list
Test plan
- Default max_object_size is 128MB
- Custom limit stored in repo struct
- Object.read rejects objects exceeding custom limit
- Object.decode respects custom max_size option
- Error message includes the configured limit
- All 547 tests pass, dialyzer clean
Created Apr 09, 2026 at 12:58 UTC
| Merged Apr 09, 2026 at 13:02 UTC
by
cole.christensen@gmail.com