On 6/15/2019 12:11 PM, Carlo Marcelo Arenas Belón wrote: > 883e248b8a ("fsmonitor: teach git to optionally utilize a file system > monitor to speed up detecting new or changed files.", 2017-09-22) uses > an int in a loop that would wrap if index_state->cache_nr (unsigned) > is bigger than INT_MAX Thanks for catching this. I wonder if there is a compiler setting or static analysis that caught this so we can avoid the issue in the future. Also, INT_MAX is ~2.1 billion, and the largest indexes I know about have around 4 million entries, so it is unlikely that you hit this as a runtime error. Still worth fixing! Thanks, -Stolee