On Wed, Jul 23, 2025 at 02:51:50PM -0700, Junio C Hamano wrote: > When cache_ref_iterator_seek() "jumps" to a middle of the sorted ref > list, it forgets to set the .prefix_state member of the new > (i.e. deeper) level it just initialized. This later causes > cache_ref_iterator_advance() to look at this uninitialized member > to base its decision on what to do next. > > Kyle Lippincott [*] and Jeff King noticed this with MSAN and > Valgrind, and Karthik Nayak as the original author located exactly > where the missing initialization is. This explanation makes sense to me (from my admittedly rusty view of the ref iteration code). And certainly the patch looks right. -Peff