Re: [PATCH 18/18] alternates: use fspathcmp to detect duplicates
- From
Jeff King <peff@peff.net>
- Date
- Oct 5, 2016, 03:54 UTC
- Message-ID
- <20161005035447.xdnmilecg6p2uqrp@sigill.intra.peff.net>
- In-Reply-To
- <20161005023455.GA6215@pug.qqx.org>
On Tue, Oct 04, 2016 at 10:34:55PM -0400, Aaron Schrab wrote:
Show 9 quoted lines
> At 16:36 -0400 03 Oct 2016, Jeff King <peff@peff.net> wrote: > > On a case-insensitive filesystem, we should realize that > > "a/objects" and "A/objects" are the same path. > > The current repository being on a case-insensitive filesystem doesn't > guarantee that the alternates are as well. > > On the other hand, I suspect that people who use a case-insensitive > filesystem would be less likely to use names which differ only by case.
True. I don't think we actually have enough information to make the correct comparison (not only that, but I think that fspathcmp() can sometimes be fooled by a path which is only partially case-insensitive due to a case-insensitive filesystem mounted on a case-sensitive one).
Still, I think in practice this is likely to do more good than harm, as I'd guess that being on a single filesystem is the common case.
-Peff