From: Junio C Hamano <gitster@pobox.com>
To: Tuomas Ahola <taahol@utu.fi>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH 3/3] doc: git-config: escape erroneous adoc markup
Date: Wed, 10 Jun 2026 13:07:22 -0700 [thread overview]
Message-ID: <xmqqa4t2upl1.fsf@gitster.g> (raw)
In-Reply-To: <xmqqecieuqdm.fsf@gitster.g> (Junio C. Hamano's message of "Wed, 10 Jun 2026 12:50:13 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Thanks.
>
> What we see in
> https://git-scm.com/docs/git-config#Documentation/git-config.txt---commentmessage
> is rather embarrasing. This would be a vast improvement ;-)
>
>> diff --git a/Documentation/git-config.adoc b/Documentation/git-config.adoc
>> index 8439ce97df..708e88cdeb 100644
>> --- a/Documentation/git-config.adoc
>> +++ b/Documentation/git-config.adoc
>> @@ -119,10 +119,10 @@ OPTIONS
>> Append a comment at the end of new or modified lines.
>> +
>> If _<message>_ begins with one or more whitespaces followed
>> -by "#", it is used as-is. If it begins with "#", a space is
>> +by "\#", it is used as-is. If it begins with "#", a space is
>> prepended before it is used. Otherwise, a string " # " (a
With this change, I wonder if this '#' on the next line gets paired
as the closing element that corresponds to the second one on the
previous line, which is not quoted hence can be taken as the opening
element? Even if the one on the second line does not get taken as a
closing element now, if a future change adds some word with '#' that
does, the second "#" on the line left unquoted by this patch would
then require quoting, no? IOW, would it be better to do this
>> -by "#", it is used as-is. If it begins with "#", a space is
>> +by "\#", it is used as-is. If it begins with "\#", a space is
so that we do not have to worry about "special cases" where it
becomes unnecessary to quote "#"s?
>> space followed by a hash followed by a space) is prepended
>> -to it. And the resulting string is placed immediately after
>> +to it. The resulting string is placed immediately after
>> the value defined for the variable. The _<message>_ must
>> not contain linefeed characters (no multi-line comments are
>> permitted).
next prev parent reply other threads:[~2026-06-10 20:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 18:51 [PATCH 0/3] doc: config: fix AsciiDoc glitches Tuomas Ahola
2026-06-10 18:51 ` [PATCH 1/3] doc: config: terminate runaway lists Tuomas Ahola
2026-06-10 18:51 ` [PATCH 2/3] doc: config/sideband: fix typo in adoc markup Tuomas Ahola
2026-06-10 20:13 ` Kristoffer Haugsbakk
2026-06-10 18:51 ` [PATCH 3/3] doc: git-config: escape erroneous " Tuomas Ahola
2026-06-10 19:50 ` Junio C Hamano
2026-06-10 20:07 ` Junio C Hamano [this message]
2026-06-10 22:55 ` [PATCH v2 0/3] doc: config: fix AsciiDoc glitches Tuomas Ahola
2026-06-10 22:55 ` [PATCH v2 1/3] doc: config: terminate runaway lists Tuomas Ahola
2026-06-10 22:55 ` [PATCH v2 2/3] doc: config/sideband: fix description list delimiter Tuomas Ahola
2026-06-10 22:55 ` [PATCH v2 3/3] doc: git-config: escape erroneous highlight markup Tuomas Ahola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa4t2upl1.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=taahol@utu.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox