From: Ralph Seichter Date: Tue, 12 Mar 2024 06:19:26 GMT Subject: Re: [PATCH v2] config: add --comment option to add a comment Message-ID: In-Reply-To: <9166fa83-4ed5-41fd-83f7-337fd524d0e2@seichter.de> * Ralph Seichter: > LF is a more interesting question. I haven't yet tried actively > introducing a linefeed. Does strbuf_addf() have any related > filtering logic? I have now tried several times to inject a LF into a comment string, and did not manage to break the resulting config file. For example, ./git config --comment "foo\012bar" --add section.key value leads to this entry: [section] key = value #foo\012bar Variable expansion with LF="\012" and --comment "foo${LF}bar" did not introduce a linefeed either. Have you guys perhaps managed to create an invalid config file? -Ralph