From: Duy Nguyen Date: Wed, 29 Jun 2016 04:09:36 GMT Subject: Re: [PATCH v2 0/2] Config conditional include Message-ID: In-Reply-To: <20160628202809.GA21002@sigill.intra.peff.net> On Tue, Jun 28, 2016 at 10:28 PM, Jeff King wrote: > On Tue, Jun 28, 2016 at 07:26:39PM +0200, Nguyễn Thái Ngọc Duy wrote: > >> There's a surprise about core.ignorecase. We are matching paths, so we >> should match case-insensitively if core.ignorecase tells us so. And it >> gets a bit tricky if core.ignorecase is defined in the same config >> file. I don't think we have ever told the user that keys are processed >> from top down. We do now. > > Hrm. I'm not excited about introducing ordering issues into the config > parsing. But I think it's actually even more complicated than that. > > core.ignorecase is generally about the working tree, not the git > repository directory, which may reside on another filesystem entirely > (though I would not be surprised if we've blurred that line already). > > I wonder if it would be that bad to just punt on the issue, and say that > these include-match globs are always case-insensitive, or something. > True, that does not allow one to distinguish between config for "foo" > and "Foo" directories, but I find it unlikely anybody would ever want > to. And if we define it that way from day one, then nobody expects it to > work. You already opened a path for this with your gitdir/regexp suggestion: we could support case-sensitive match with "gitdir:" then case-insensitive match with "gitdir/i:". Everybody is happy. -- Duy