Re: Confused about git-config's description of escaping
- From
Kyle Meyer <kyle@kyleam.com>
- Date
- Aug 3, 2020, 20:58 UTC
- Message-ID
- <874kpjwinx.fsf@kyleam.com>
- In-Reply-To
- <xmqqd047v62u.fsf@gitster.c.googlers.com>
Junio C Hamano writes:
> Kyle Meyer <kyle@kyleam.com> writes:
[...]
Show 7 quoted lines
>> 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"dSo, it seems valid for a value to have these characters escaped without having them enclosed in a pair of double quotes.