Subject: Re: [PATCH v2] config: add --comment option to add a comment

From: Dragan Simic <[email-masked]>
Date: Tue, 12 Mar 2024 03:27:05 +0100

On 2024-03-11 20:17, [email-masked] wrote:
> My take would be that all whitespace is ignored, but if you want a tab
> or other character in a value, be explicit about it:
> 
> 	variable = "value\ts" # comment
> 
> where all whitespace and comments are dropped from the parse to be
> functionally equivalent to
> 
> variable=value(TAB)s
> 
> when processing. Implicit quoting arbitrary whitespace can be
> interpreted in an ambiguous way. That's basically what the C parser
> does.

Oh, I fully agree, but I'm afraid that would be a breaking change at 
this
point.  Perhaps numerous configuration values in the field already use 
the
current (mis)behavior of the value parser in config.c.

I think the only right thing to do at this point is to document it 
properly
and correctly in the git-config(1) manual page.  A bit later I'll 
prepare
and send a patch that does it.