git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/3] doc: git-config: escape erroneous highlight markup

From
Jeff King <peff@peff.net>
Date
Jun 12, 2026, 05:16 UTC
Message-ID
<20260612051605.GB593075@coredump.intra.peff.net>
In-Reply-To
<5106812.31r3eYUQgx@piment-oiseau>
On Thu, Jun 11, 2026 at 10:43:44PM +0200, Jean-Noël AVILA wrote:
> Oh, this is the black magic regexp that is not considering # for keyword
> character. Should be solved by something like (and I really hate these .in 
> files):

Your patch looks reasonable to me, but for some reason I get this doc-diff output when comparing before/after (what we don't see is the improved output from bolding those chars, since doc-diff doesn't show any markup):

diff --git a/73bccdb573fbdf3df4abf37570be486fc0f53d4a/home/peff/share/man/man1/git-config.1 b/926d9be4ab7ee1a57d4c570ec0f8aba28b3c2af5/home/peff/share/man/man1/git-config.1
index b77d79f..b2bced2 100644
--- a/73bccdb573fbdf3df4abf37570be486fc0f53d4a/home/peff/share/man/man1/git-config.1
+++ b/926d9be4ab7ee1a57d4c570ec0f8aba28b3c2af5/home/peff/share/man/man1/git-config.1
@@ -6983,7 +6983,7 @@ CONFIGURATION FILE
 
      status.displayCommentPrefix
          If set to true, git-status(1) will insert a comment prefix before each
-         output line (starting with core.commentChar, i.e. # by default). This
+         output line (starting with core.commentChar, i.e.  # by default). This
          was the behavior of git-status(1) in Git 1.8.4 and previous. Defaults
          to false.

And I can see the extra space when looking at the rendered manpage. The
XML output looks reasonable, though:

  (starting with <literal>core.commentChar</literal>, i.e. <literal>#</literal> by default

as does the HTML. So perhaps it is happening at the roff level? But that
looks like:

  will insert a comment prefix before each output line (starting with
  \fBcore\&.commentChar\fR, i\&.e\&.
  \fB#\fR
  by default)\&. This was the behavior of

So...weird. groff wants to add extra space for some reason. It happens
even if I drop the bolding, and just have "#" on a line by itself. I
guess maybe it is the trailing "." of the previous line putting groff
into "oh, I'm starting a new sentence" mode and it uses two spaces.

But I think that is all outside the scope of your fix, and this is an
existing issue that we are now just unlucky enough to hit. I'd be
tempted to ignore it and possibly fix it later.

-Peff
Previous: Jean-Noël AVILANext: Jeff King
Message 17 of 30 in “doc: config: fix AsciiDoc glitches”
  1. 0/3 doc: config: fix AsciiDoc glitchesTuomas Ahola, Jun 10, 2026
  2. 2/3 doc: config/sideband: fix typo in adoc markupTuomas Ahola, Jun 10, 2026
  3. Kristoffer HaugsbakkJun 10, 2026
  4. 3/3 doc: git-config: escape erroneous adoc markupTuomas Ahola, Jun 10, 2026
  5. Junio C HamanoJun 10, 2026
  6. Junio C HamanoJun 10, 2026
  7. 1/3 doc: config: terminate runaway listsTuomas Ahola, Jun 10, 2026
  8. 0/3 doc: config: fix AsciiDoc glitchesTuomas Ahola, Jun 10, 2026
  9. 1/3 doc: config: terminate runaway listsTuomas Ahola, Jun 10, 2026
  10. Jeff KingJun 11, 2026
  11. 2/3 doc: config/sideband: fix description list delimiterTuomas Ahola, Jun 10, 2026
  12. 3/3 doc: git-config: escape erroneous highlight markupTuomas Ahola, Jun 10, 2026
  13. Jeff KingJun 11, 2026
  14. Jeff KingJun 11, 2026
  15. Jeff KingJun 11, 2026
  16. Jean-Noël AVILAJun 11, 2026
  17. Jeff KingJun 12, 2026
  18. Jeff KingJun 12, 2026
  19. Tuomas AholaJun 11, 2026
  20. Jeff KingJun 11, 2026
  21. Tuomas AholaJun 11, 2026
  22. Junio C HamanoJun 11, 2026
  23. 0/3 doc: config: fix AsciiDoc glitchesTuomas Ahola, Jun 11, 2026
  24. 3/3 doc: git-config: escape erroneous highlight markupTuomas Ahola, Jun 11, 2026
  25. 1/3 doc: config: terminate runaway listsTuomas Ahola, Jun 11, 2026
  26. 2/3 doc: config/sideband: fix description list delimiterTuomas Ahola, Jun 11, 2026
  27. Jeff KingJun 12, 2026
  28. Junio C HamanoJun 12, 2026
  29. Junio C HamanoJun 12, 2026
  30. Junio C HamanoJun 12, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.