# Size_t conversion for pack receive and verify code draws calls for shorter commit messages

_Patrick Steinhardt and Junio C Hamano say the patches' explanations are too long, and Patrick raises questions about overflow checks and casts._

Section: Patches. Edition of 2026-11-19. Written by an AI editor from the thread "[PATCH 0/4] use size_t when receiving and verifying packs" (20 messages): https://gitlist.dev/t/66728

Elia Pinto's four-patch series continues a search for truncated object sizes, this time in the code that receives and verifies packs: unpack-objects, index-pack and pack verification in git fsck. These components keep object sizes as unsigned long, while the underlying pack code already uses size_t. The cover letter lists symptoms such as unpack-objects dying on Windows when it receives an object of 4GiB or more, and index-pack's write_compressed() using an unsigned int on all platforms.

Patrick Steinhardt said one commit message was extremely verbose and he lost steam reading it. He said it is worth documenting the unexpected parts of a patch, not what the diff already shows, and that it could be a half or a third of its size.

Junio C Hamano agreed that this matches his impression of recently proposed log messages from several authors. He suggested people could ask an LLM to condense their text by about 70% without losing substance, and then back off if too much is lost.

On the code, Patrick noted that the only caller of write_compressed() adds its result to an off_t offset field, which is signed. That seems unlikely to overflow, but he asked whether the code should check anyway. He also said some of the casts bother him because Elia has another series in flight that fixes odb_write_object(). In a different part of the thread he asked whether tools that only inspect a prefix of an object notice a size mismatch and report an error, and said it would be a bug if they do not.

Elia has not yet replied to these points in the excerpts.
