Re: git silently ignores include directive with single quotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

>  1. Treat single-quote as worth quoting in config.c::write_pair (line
>     2516).  This would already help with the original issue, since the
>     config would say
>
> 	[foo]
> 		bar = \'baz\'
>
>     allowing a quick diagnosis.

I am mildly against this, as long as you feel that all the remaining
steps need to be marked with "(optional)", because this will give
readers an impression that somehow single-quote is special.  If we
do not intend to make it special at all, we shouldn't.

If we do commit to make it special, then this is a very sensible
first step that is backward compatible, of course, and I find that
the following steps form a reasonable transition plan, if we intend
to follow all the way through.

>  2. (optional) Warn if a value is surrounded in single-quotes,
>     encouraging using backslash to disambiguate.
>
>  3. (optional) Error out if a value is surrounded in single-quotes,
>     encouraging using double-quote or backslash, depending on the
>     user's intention.
>
>  4. (optional) Start treating wrapping single-quotes specially
>     somehow.
>
> I think step 1 is a good idea, but I'm not convinced about any of the
> later steps.
>
> I also agree with the comments upthread about wanting a way to do a
> '[include] path' that errors out if the file doesn't exist, and maybe
> even starting a transition to repurpose standard [include] path to do
> that.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux