Re: [PATCH v2 0/2] Config conditional include
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 28, 2016, 20:51 UTC
- Message-ID
- <vpqk2h9qbp8.fsf@anie.imag.fr>
- In-Reply-To
- <20160628202809.GA21002@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> 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.
There's already at least one case of ordering-sensitive variables, that we encountered when writting the config cache during Tanay Abhra's GSoC: diff.<driver>.funcname Vs diff.<driver>.xfuncname. Git applies the "last one wins" policy, which is the normal rule for a single-valued variable, but in this case, a "funcname" definition can override an "xfuncname" def. To preserve this behavior we had to introduce ordering in the cache, but to me this was a design mistake to rely on order.
In short: we already have one, but I'm not excited either about introducing new ones.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/