On Sat, Jul 28, 2018 at 05:56:59AM -0400, Jeff King wrote: > strcasecmp() will only catch a subset of the cases. We really need to > follow the same folding rules that the filesystem would. > > For the case of clone, I actually wonder if we could detect during the > checkout step that a file already exists. Since we know that the > directory we started with was empty, then if it does, either: > > - there's some funny case-folding going on that means two paths in the > repository map to the same name in the filesystem; or > > - somebody else is writing to the directory at the same time as us > > Either of which I think would be worth warning about. I'm not sure if we > already lstat() the paths we're writing anyway as part of the checkout, > so we might even get the feature "for free". This is possible to do. From the bug I accidentally introduced in 2.16, we know that on clone, there is a code path that is only traversed when we hit this case and only on case-insensitive file systems. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204
Attachment:
signature.asc
Description: PGP signature