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

Re: [PATCH] doc: add more AsciiDoc cross-references

From
Jeff King <peff@peff.net>
Date
Sep 24, 2026, 18:42 UTC
Message-ID
<20260924184220.GA747880@coredump.intra.peff.net>
In-Reply-To
<31577b6f-79b6-456f-9ecd-d1a3df6209e2@app.fastmail.com>
On Thu, Sep 24, 2026 at 01:22:49PM -0400, Julia Evans wrote:
Show 10 quoted lines
> I meant something different, let me try again (with Peff's corrections as well):
> 
>     The reason for using the more verbose <<EXAMPLES,EXAMPLES>>
>     (instead of <<EXAMPLES>>) is that in some cases, <<EXAMPLES>> is
>     rendered as `the section called "EXAMPLES"` or `[EXAMPLES]`.
>     <<EXAMPLES,EXAMPLES>> is rendered as just `EXAMPLES`, which gives us
>     more control over the output.
> 
> ("in some cases" is code for "I still don't fully understand
> exactly when each one happens and why")

I think it's just "depending on the implementation and output backends". The complete table I saw is:

              |  HTML   | manpage
  ----------------------------------------------
  asciidoc    |  [FOO]  | the section called "FOO"
  asciidoctor |  FOO    | the section called "FOO"

I'm not sure if the manpage expansion is asciidoc itself, though, or docbook. I guess that should be easy to test...

Ah, yeah, it's docbook. Using <<PRUNING>>, the xml generated by asciidoc looks like this:

  and the <xref linkend="PRUNING"/> section of
and then the roff output from docbook becomes:
  and the
  the section called \(lqPRUNING\(rq
  section of

So if we wanted to override that, we'd do it at the docbook layer. If you use <<PRUNING,PRUNING>> instead, then the xml looks like:

  and the <link linkend="PRUNING">PRUNING</link> section of
which takes the decision away from docbook and uses the text we provide.

I don't think your commit message needs to go into that detail, but I thought it worth documenting in case we revisit this later.

-Peff
Previous: Junio C HamanoNext: Jean-Noël AVILA
Message 10 of 23 in “doc: add more AsciiDoc cross-references”
  1. doc: add more AsciiDoc cross-referencesJulia Evans via GitGitGadget, Sep 22, 2026
  2. Junio C HamanoSep 22, 2026
  3. Julia EvansSep 22, 2026
  4. Jeff KingSep 23, 2026
  5. Julia EvansSep 24, 2026
  6. Jeff KingSep 24, 2026
  7. Junio C HamanoSep 24, 2026
  8. Julia EvansSep 24, 2026
  9. Junio C HamanoSep 24, 2026
  10. Jeff KingSep 24, 2026
  11. Jean-Noël AVILAOct 18, 2026
  12. Kristoffer HaugsbakkSep 23, 2026
  13. Jeff KingSep 23, 2026
  14. doc: add more AsciiDoc cross-referencesJulia Evans via GitGitGadget, Sep 25, 2026
  15. Jeff KingSep 25, 2026
  16. Rewriting the Git tutorial to cover less contentJulia Evans, Sep 25, 2026
  17. Junio C HamanoSep 25, 2026
  18. Julia EvansSep 25, 2026
  19. Junio C HamanoSep 25, 2026
  20. Julia EvansSep 25, 2026
  21. Junio C HamanoSep 25, 2026
  22. Julia EvansSep 28, 2026
  23. Junio C HamanoSep 28, 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.