All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tuomas Ahola <taahol@utu.fi>
To: Tuomas Ahola <taahol@utu.fi>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	Julia Evans <julia@jvns.ca>
Subject: Re: [PATCH v4 2/2] lint-docs: ensure command-list.txt lists all guides
Date: Fri, 27 Nov 2026 12:33:46 +0200	[thread overview]
Message-ID: <20261127103346.vPrBT%taahol@utu.fi> (raw)
In-Reply-To: <20261126201110.9046-3-taahol@utu.fi>

Tuomas Ahola <taahol@utu.fi> wrote:

> Since 2135e1ad70 (command-list.txt: add missing 'gitcredentials' and
> 'gitremote-helpers', 2020-08-05) there has been a comment in
> Documentation/Makefile reminding developers to add new guides also to
> command-list.txt.  However, there is no linter script to enforce that.
> 
> Adapt Documentation/lint-manpages.sh to fill that role.  Extract
> MAN5_TXT and MAN7_TXT from the docs Makefile and check command-list.txt
> against them.  Exempt gitweb.conf(5) and gittutorial-2(7) from the
> new linter routine as deliberate omissions.
> 
> Signed-off-by: Tuomas Ahola <taahol@utu.fi>
> ---
>  Documentation/lint-manpages.sh | 29 +++++++++++++++++++----------
>  1 file changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/lint-manpages.sh b/Documentation/lint-manpages.sh
> index a0ea572382..87a652bd22 100755
> --- a/Documentation/lint-manpages.sh
> +++ b/Documentation/lint-manpages.sh
> @@ -1,21 +1,27 @@
>  #!/bin/sh
>  
>  extract_variable () {
> -	(
> -		cat ../Makefile
> -		cat <<EOF
> +	file="$1"
> +	directory="$(dirname "$file")"
> +	shift
> +	for i in "$@"
> +	do
> +		(
> +			cat "$file"
> +			cat <<EOF
>  print_variable:
>  	@\$(foreach b,\$($1),echo XXX \$(b:\$X=) YYY;)
>  EOF

Well, that is obviously incorrect.  Sorry.  Besides, $i isn't a very eloquent
name for the iterator...

Junio, could you please squash this locally?

-----8<-----
Subject: [PATCH] fixup! lint-docs: ensure command-list.txt lists all guides

Signed-off-by: Tuomas Ahola <taahol@utu.fi>
---
 Documentation/lint-manpages.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/lint-manpages.sh b/Documentation/lint-manpages.sh
index 87a652bd22..0b123f487c 100755
--- a/Documentation/lint-manpages.sh
+++ b/Documentation/lint-manpages.sh
@@ -4,13 +4,13 @@ extract_variable () {
 	file="$1"
 	directory="$(dirname "$file")"
 	shift
-	for i in "$@"
+	for v in "$@"
 	do
 		(
 			cat "$file"
 			cat <<EOF
 print_variable:
-	@\$(foreach b,\$($1),echo XXX \$(b:\$X=) YYY;)
+	@\$(foreach b,\$($v),echo XXX \$(b:\$X=) YYY;)
 EOF
 		) |
 		make -C "$directory" -f - print_variable 2>/dev/null |

base-commit: 0ffa3e35c7c82ab8d0de226149fb03b3f7674d05
prerequisite-patch-id: 55e8c49f2de1f1bbd117386712fd07a30f2641c7
prerequisite-patch-id: d5b07233f2f991f22c53c1a177690660f8f463ab
-- 
fixup/ta/command-list-guides-sync-lint

  reply	other threads:[~2026-11-27 10:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  5:24 [PATCH 0/2] guides: keep Documentation/Makefile and command-list.txt in sync Tuomas Ahola
2026-09-09  5:25 ` [PATCH 1/2] command-list: add gitformat-loose(5) and gitpacking(7) Tuomas Ahola
2026-09-09 18:15   ` Junio C Hamano
2026-09-09  5:25 ` [PATCH 2/2] lint-docs: check the guide list in command-list.txt Tuomas Ahola
2026-09-09 18:15   ` Junio C Hamano
2026-09-10 19:43 ` [PATCH v2 0/2] guides: keep Documentation/Makefile and command-list.txt in sync Tuomas Ahola
2026-09-10 19:43   ` [PATCH v2 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7) Tuomas Ahola
2026-09-10 19:43   ` [PATCH v2 2/2] lint-docs: check the guide list in command-list.txt Tuomas Ahola
2026-10-29 18:48 ` [PATCH v3 0/2] guides: keep Documentation/Makefile and command-list.txt in sync Tuomas Ahola
2026-10-29 18:48   ` [PATCH v3 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7) Tuomas Ahola
2026-11-05 19:32     ` Junio C Hamano
2026-11-11 21:57       ` Tuomas Ahola
2026-10-29 18:48   ` [PATCH v3 2/2] lint-docs: check the guide list in command-list.txt Tuomas Ahola
2026-11-02 18:39     ` Julia Evans
2026-11-03 17:09       ` Tuomas Ahola
2026-11-05 19:41     ` Junio C Hamano
2026-11-11 22:00       ` Tuomas Ahola
2026-11-26 20:11 ` [PATCH v4 0/2] guides: keep Documentation/Makefile and command-list.txt in sync Tuomas Ahola
2026-11-26 20:11   ` [PATCH v4 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7) Tuomas Ahola
2026-11-27 14:17     ` Junio C Hamano
2026-11-27 21:02       ` Kristoffer Haugsbakk
2026-11-27 22:14         ` Junio C Hamano
2026-11-26 20:11   ` [PATCH v4 2/2] lint-docs: ensure command-list.txt lists all guides Tuomas Ahola
2026-11-27 10:33     ` Tuomas Ahola [this message]
2026-11-27 15:07     ` Junio C Hamano
2026-11-27 17:42       ` Tuomas Ahola
2026-11-27 19:13         ` Junio C Hamano
2026-11-30 16:22 ` [PATCH v5 0/2] guides: keep Documentation/Makefile and command-list.txt in sync Tuomas Ahola
2026-11-30 16:22   ` [PATCH v5 1/2] command-list.txt: add gitformat-loose(5) and gitpacking(7) Tuomas Ahola
2026-11-30 21:44     ` Tuomas Ahola
2026-11-30 16:22   ` [PATCH v5 2/2] lint-docs: ensure command-list.txt lists all guides Tuomas Ahola

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=20261127103346.vPrBT%taahol@utu.fi \
    --to=taahol@utu.fi \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=julia@jvns.ca \
    /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.