Subject: Re: Confused about git-config's description of escaping

From: Kyle Meyer <[email-masked]>
Date: Mon, 03 Aug 2020 16:58:42 -0400

Junio C Hamano writes:

> Kyle Meyer <[email-masked]> writes:
[...]
>> What's gained by specifying "Inside double quotes"?  Are there any cases
>> where a value, whether enclosed in double quotes or not, doesn't need "
>> or \ characters escaped?
>
> Perhaps there is another description missing, either from the
> written docs or from your reading of it, that says that a value with
> these characters must be enclosed in double quotes pair?

Thanks for the reply.

I'm not spotting anything in the current git-config documentation that
says that.  And it would be an incorrect description of the syntax,
wouldn't it?  When entering a value containing a quote with 'git
config', enclosing double quotes aren't inserted:

    $ git config a.b 'c"d'
    $ tail -n2 .git/config
    [a]
    	b = c\"d
    $ git config a.b
    c"d

So, it seems valid for a value to have these characters escaped without
having them enclosed in a pair of double quotes.