Re: git silently ignores include directive with single quotes
- Date: Sat, 8 Sep 2018 23:10:44 +0100
- From: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: git silently ignores include directive with single quotes
On 08/09/18 22:14, Jeff King wrote:
> On Sat, Sep 08, 2018 at 09:54:14PM +0200, Ævar Arnfjörð Bjarmason wrote:
>> The reason missing includes are ignored is that the way this is expected
>> to be used is e.g.:
>> path ~/.gitconfig.work
>> Where .gitconfig.work is some configuration you're going to drop into
>> place on your $dayjob servers, but not on your personal machine, even
>> though you sync the same ~/.gitconfig everywhere.
>> A lot of people who use includes rely on this, but I see from this
>> thread this should be better documented.
> Right, this was an intentional choice at the time the feature was added,
> to support this kind of feature. I'd note also that it mirrors other
> misspelled keys. E.g.:
> psth = whatever
> That said, it _does_ behave the same and people are likely depending on
> it at this point. So if we introduce a warning, for example, there needs
> to be some way to suppress it.
> warnOnMissing = false
> path = ...
I was going to suggest, inspired by Makefile syntax, that
[-include] would not complain if the file was missing ...
except, of course, it's too late for that! ;-)
I suppose [+include] could complain if the file is missing
instead, ... dunno.