Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: > There are lots of suggestions on optimizing this stuff, but since this > problem does not affect me to begin with, I'm reluctant to make more > changes and going to stay simple, stupid and slow. I could continue to > do small updates if needed. But for bigger changes, consider this > patch dropped by me. > > v3 now uses inode on UNIXy platforms for checking colliding items. I > still don't try to separate colliding groups because it should be > quite obvious once you look at the colliding list (and most of the > time I suspect we only have one or two groups). I think that design decision is fine. We can extend it later if needed, but I would not be surprised if what you have here is sufficient. Another possible follow-up in the future may be to encapsulate the "I have a cache-entry 'dup', and stat data 'st' taken for a path in the working tree. Does it look likely that the latter is the result of checking out the former?" logic, which you currently has a hard-coded if() statement condition, into a helper function and make its implementation platform dependent.