Configurable object size limits and docs update #3

merged colechristensen cole.christensen@gmail.com wants to merge feat/configurable-size-limits-and-docs into main
No CI

Summary

  • Add per-repo max_object_size option to Repo.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_size field with 128MB default
  • lib/ex_git_objectstore/object.exdecode/2 accepts max_size: option; read/2 uses 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 colechristensen cole.christensen@gmail.com