All of lore.kernel.org
 help / color / mirror / Atom feed
From: kristofferhaugsbakk@fastmail.com
To: git@vger.kernel.org
Cc: "Kristoffer Haugsbakk" <code@khaugsbakk.name>,
	"Patrick Steinhardt" <ps@pks.im>,
	"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH v4 0/2] doc: format-rev: use [synopsis] on code block
Date: Mon, 17 Aug 2026 20:51:47 +0200	[thread overview]
Message-ID: <V4_CV_synopsis_block.b8e@msgid.xyz> (raw)
In-Reply-To: <synopsis_block.af9@msgid.xyz>

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

Topic name (applied): kh/format-rev-doc-synopsis

Topic summary: Use '[synopsis]' on block in order to highlight
placeholder properly. Also quote the subject consistently.

§ Changes in v4

Sorry about not reading carefully. An open block is not a code block.

(copied from the patch note)

Fix block: use open block, not code block.[1] This is what was done for the
synopsis blocks in commit a34d1d53, the commit mentioned here. I have
tested this with what I believe are the use-asciidoc (tool) and
use-asciidoctor (tool):

    make doc
    make USE_ASCIIDOCTOR=1 doc

And they didn’t give any warnings. And they produced the correct result.

  🔗 1: https://lore.kernel.org/git/xmqqfr0hqzvl.fsf@gitster.g/

Rewrite or flesh out the commit message to reflect this newfound knowledge.

Also remove the Ack since this change invalidates it.

§ Cc

(See v2)

§ Link to v3

https://lore.kernel.org/git/V3_CV_synopsis_block.b64@msgid.xyz/

[1/2] doc: format-rev: quote subject placeholder before and after
[2/2] doc: format-rev: use [synopsis] on code block

 Documentation/git-format-rev.adoc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Interdiff against v3:
diff --git a/Documentation/git-format-rev.adoc b/Documentation/git-format-rev.adoc
index d6c2e4aec1a..c2268c92b56 100644
--- a/Documentation/git-format-rev.adoc
+++ b/Documentation/git-format-rev.adoc
@@ -97,9 +97,9 @@ 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.
Range-diff against v3:
1:  c82aec7969f = 1:  c82aec7969f doc: format-rev: quote subject placeholder before and after
2:  b9a93c83c88 ! 2:  16d7bea804a doc: format-rev: use [synopsis] on code block
    @@ Commit message
         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` block definition which was
    -    introduced in a34d1d53 (doc: convert git-show to synopsis style,
    -    2026-02-06).
    +    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 code blocks since commit a34d1d53 can, on synopsis-style
    +    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:
     
    @@ Commit message
             [verse]
             'git name-rev' [...]
     
    -    Acked-by: Patrick Steinhardt <ps@pks.im>
         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
      ## Documentation/git-format-rev.adoc ##
    @@ Documentation/git-format-rev.adoc: The mode `--stdin-mode=text` replaces each ob
      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.

base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc
-- 
2.55.0.13.g85d2d65e389


  parent reply	other threads:[~2026-08-17 18:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 12:02 [PATCH] doc: format-rev: use [synopsis] on code block kristofferhaugsbakk
2026-08-10 16:58 ` [PATCH resend] " kristofferhaugsbakk
2026-08-11 12:32   ` Patrick Steinhardt
2026-08-11 16:23     ` Kristoffer Haugsbakk
2026-08-11 16:27       ` Patrick Steinhardt
2026-08-11 16:30         ` Kristoffer Haugsbakk
2026-08-11 19:38       ` Kristoffer Haugsbakk
2026-08-13  9:57 ` [PATCH v2 0/2] " kristofferhaugsbakk
2026-08-13  9:57   ` [PATCH v2 1/2] doc: format-rev: quote subject placeholder before and after kristofferhaugsbakk
2026-08-13  9:57   ` [PATCH v2 2/2] doc: format-rev: use [synopsis] on code block kristofferhaugsbakk
2026-08-13 10:04     ` Patrick Steinhardt
2026-08-13 14:23 ` [PATCH v3 0/2] " kristofferhaugsbakk
2026-08-13 14:23   ` [PATCH v3 1/2] doc: format-rev: quote subject placeholder before and after kristofferhaugsbakk
2026-08-13 14:23   ` [PATCH v3 2/2] doc: format-rev: use [synopsis] on code block kristofferhaugsbakk
2026-08-14  1:01     ` Junio C Hamano
2026-08-14  7:45       ` Kristoffer Haugsbakk
2026-08-14 14:47         ` Junio C Hamano
2026-08-17 18:51 ` kristofferhaugsbakk [this message]
2026-08-17 18:51   ` [PATCH v4 1/2] doc: format-rev: quote subject placeholder before and after kristofferhaugsbakk
2026-08-17 18:51   ` [PATCH v4 2/2] doc: format-rev: use [synopsis] on code block kristofferhaugsbakk
2026-08-17 21:46   ` [PATCH v4 0/2] " Junio C Hamano

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=V4_CV_synopsis_block.b8e@msgid.xyz \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=jn.avila@free.fr \
    --cc=ps@pks.im \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.