Alessio Attilio's patch stores decoded tree entry path lengths as size_t. The tree buffer already uses size_t, but the lengths were kept in unsigned int and int. The commit message says that became visible after 53d5cfc3b8 ("tree-walk: use size_t for the size of tree buffers") stopped truncating the tree size. Tests 13-15 in t1600 then failed with --long, because index path length checks saw the wrong length.

Kristofer Karlsson, who sent a competing patch on a separate thread, notes that the length wrapped rather than the path being truncated. In the test it wraps to -2. update_tree_entry() then uses the wrapped length, lands in the middle of a name and dies with "malformed mode in tree entry". He says his patch fixes the same CI failure from the other direction, by rejecting names longer than INT32_MAX in decode_tree_entry(). He tested Attilio's patch and found t1600 tests 13-15 pass again. He points out that read_tree_at() in tree.c and emit_path() in tree-diff.c still narrow the length to an int, and he suggests more detail on how the break arose.

Attilio replied that he agrees this is the better approach. He says he updated the patch to parse max_tree_entry_len as a size_t, fix the narrowing in builtin/grep.c, add the 53d5cfc3b8 context to the commit message, and document that names longer than 4096 bytes are not portable. He will reroll and asked Karlsson to drop his patch in favor of this one.

The reroll had not appeared in the excerpts.