doc: format-rev: use [synopsis] on code block

This code block uses the placeholder `<subject>`. Let’s highlight this
placeholder properly by using the `synopsis` open block definition which
was introduced in a34d1d53 (doc: convert git-show to synopsis style,
2026-02-06). This renders the block like a code block but with emphasis
styling on placeholders, just like inline-verbatim (`) in running text.

Yes, note that open 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' [...]

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
main
Kristoffer Haugsbakk 2026-08-17 20:51:49 +02:00 committed by Junio C Hamano
parent ddd7de1341
commit 634257a89b
1 changed files with 3 additions and 2 deletions

View File

@ -96,9 +96,10 @@ The mode `--stdin-mode=text` replaces each object name with the
formatted commit, i.e. the format `"%s"` would transform some commit
object name to `"<subject>"` without any termination. Like this:

----
[synopsis]
--
Did we not fix this in "<subject>"?
----
--

It is safe to interactively read and write from this command since each
record is immediately flushed.