From: Dragan Simic Date: Tue, 12 Mar 2024 02:27:05 GMT Subject: Re: [PATCH v2] config: add --comment option to add a comment Message-ID: <41c7cfa73dc0b4e7345ba788c45beead@manjaro.org> In-Reply-To: <0b9a01da73e8$b7cd8f80$2768ae80$@nexbridge.com> On 2024-03-11 20:17, rsbecker@nexbridge.com 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.