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

Re: [PATCH v3 2/2] doc: format-rev: use [synopsis] on code block

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Aug 14, 2026, 07:45 UTC
Message-ID
<ef8ee6fb-ef3d-4a83-b8fc-121448d58e53@app.fastmail.com>
In-Reply-To
<xmqqfr0hqzvl.fsf@gitster.g>
On Fri, Aug 14, 2026, at 03:01, Junio C Hamano wrote:
Show 32 quoted lines
> kristofferhaugsbakk@fastmail.com writes:
>
>> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>>
>> This code block uses the placeholder `<subject>`. Let’s highlight this
>> placeholder properly by using the `synopsis` block definition which was
>> introduced in a34d1d53 (doc: convert git-show to synopsis style,
>> 2026-02-06).
>>
>> Yes, note that code blocks since commit a34d1d53 can, on synopsis-style
>> docs like this one, be immediately preceded by `[synopsis]`, just like
>> the command synopsis is:
>>
>>     [synopsis]
>>     (EXPERIMENTAL!) git format-rev - [...]
>>
>> Cf. verse-style:
>>
>>     [verse]
>>     'git name-rev' [...]
>>
>> Acked-by: Patrick Steinhardt <ps@pks.im>
>> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
>> ---
>
> Has this been tested with both AsciiDoc and AsciiDoctor?
>
>
> https://github.com/git/git/actions/runs/31751206776/job/94617158587#step:4:4886
>
> Curiously, it does not fail for me locally (by default my builds use
> AsciiDoctor).
Nope. :/
My change uses a code block:
    [synopsis]
    ----
    ...
    ----
But the ones in `pretty-formats.adoc` use open blocks:
    [synopsis]
    --
    ...
    --
I’ll do some better testing next.
Previous: Junio C HamanoNext: Junio C Hamano
Message 16 of 21 in “doc: format-rev: use [synopsis] on code block”
  1. doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Jul 30, 2026
  2. doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Aug 10, 2026
  3. Patrick SteinhardtAug 11, 2026
  4. Kristoffer HaugsbakkAug 11, 2026
  5. Patrick SteinhardtAug 11, 2026
  6. Kristoffer HaugsbakkAug 11, 2026
  7. Kristoffer HaugsbakkAug 11, 2026
  8. 0/2 doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Aug 13, 2026
  9. 1/2 doc: format-rev: quote subject placeholder before and afterkristofferhaugsbakk@fastmail.com, Aug 13, 2026
  10. 2/2 doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Aug 13, 2026
  11. Patrick SteinhardtAug 13, 2026
  12. 0/2 doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Aug 13, 2026
  13. 1/2 doc: format-rev: quote subject placeholder before and afterkristofferhaugsbakk@fastmail.com, Aug 13, 2026
  14. 2/2 doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Aug 13, 2026
  15. Junio C HamanoAug 14, 2026
  16. Kristoffer HaugsbakkAug 14, 2026
  17. Junio C HamanoAug 14, 2026
  18. 0/2 doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Aug 17, 2026
  19. 1/2 doc: format-rev: quote subject placeholder before and afterkristofferhaugsbakk@fastmail.com, Aug 17, 2026
  20. 2/2 doc: format-rev: use [synopsis] on code blockkristofferhaugsbakk@fastmail.com, Aug 17, 2026
  21. Junio C HamanoAug 17, 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.