git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Jean-Noël Avila" <jn.avila@free.fr>,
	"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH 1/5] doc: fix t0450-txt-doc-vs-help to select only first synopsis block
Date: Sat, 20 Dec 2025 19:16:23 +0000	[thread overview]
Message-ID: <d470451c92b195f2b25f584722573bed1b54a154.1766258187.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2020.git.1766258187.gitgitgadget@gmail.com>

From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>

In case there are multiple synopsis blocks (declared with [synopsis]
or [verse] style) in the same file, the previous implementation was
incorrectly picking up text from all the blocks until the first empty
line. This commit modifies the sed command to stop processing upon
encountering the first empty line after the first block declaration,
thereby ensuring that only the intended block is captured.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
 t/t0450-txt-doc-vs-help.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh
index e12e18f97f..822b0d55a5 100755
--- a/t/t0450-txt-doc-vs-help.sh
+++ b/t/t0450-txt-doc-vs-help.sh
@@ -56,7 +56,7 @@ adoc_to_synopsis () {
 	b2t="$(builtin_to_adoc "$builtin")" &&
 	sed -n \
 		-E '/^\[(verse|synopsis)\]$/,/^$/ {
-			/^$/d;
+			/^$/q;
 			/^\[(verse|synopsis)\]$/d;
 			s/\{litdd\}/--/g;
 			s/'\''(git[ a-z-]*)'\''/\1/g;
-- 
gitgitgadget


  reply	other threads:[~2025-12-20 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-20 19:16 [PATCH 0/5] doc: convert git-status, git remote and git stage to synopsis style Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` Jean-Noël Avila via GitGitGadget [this message]
2025-12-20 19:16 ` [PATCH 2/5] doc: convert git-status " Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` [PATCH 3/5] doc: convert git-status tables to AsciiDoc format Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` [PATCH 4/5] doc: convert git stage to use synopsis block Jean-Noël Avila via GitGitGadget
2025-12-20 19:16 ` [PATCH 5/5] doc: convert git-remote to synopsis style Jean-Noël Avila via GitGitGadget

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=d470451c92b195f2b25f584722573bed1b54a154.1766258187.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jn.avila@free.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).