From ddd7de134192fe287a2d1305227c99392b7cd8c7 Mon Sep 17 00:00:00 2001 From: Kristoffer Haugsbakk Date: Mon, 17 Aug 2026 20:51:48 +0200 Subject: [PATCH 1/2] doc: format-rev: quote subject placeholder before and after MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We first talk about just `%s`, but then show the result with quotes. That is inconsistent. Let’s use quotes both in the format as well as in the result. The implied input here, which is not spelled out for brevity, is: Did we not fix this in ? Which is then supposed to be formatted to `""`. Signed-off-by: Kristoffer Haugsbakk Signed-off-by: Junio C Hamano --- Documentation/git-format-rev.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-format-rev.adoc b/Documentation/git-format-rev.adoc index 505a52fecc..1924183734 100644 --- a/Documentation/git-format-rev.adoc +++ b/Documentation/git-format-rev.adoc @@ -93,8 +93,8 @@ acts as a _terminator_, not a _separator_. In other words, the final line or record is also terminated by the terminator character. 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 `` without any termination. Like this: +formatted commit, i.e. the format `"%s"` would transform some commit +object name to `""` without any termination. Like this: ---- Did we not fix this in ""? From 634257a89b4619ff14f9e7c75cc2645e52d8702b Mon Sep 17 00:00:00 2001 From: Kristoffer Haugsbakk Date: Mon, 17 Aug 2026 20:51:49 +0200 Subject: [PATCH 2/2] doc: format-rev: use [synopsis] on code block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code block uses the placeholder ``. 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 Signed-off-by: Junio C Hamano --- Documentation/git-format-rev.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-format-rev.adoc b/Documentation/git-format-rev.adoc index 1924183734..c2268c92b5 100644 --- a/Documentation/git-format-rev.adoc +++ b/Documentation/git-format-rev.adoc @@ -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 `""` without any termination. Like this: ----- +[synopsis] +-- Did we not fix this in ""? ----- +-- It is safe to interactively read and write from this command since each record is immediately flushed.