From: Junio C Hamano <gitster@pobox.com>
To: Tuomas Ahola <taahol@utu.fi>
Cc: <git@vger.kernel.org>, Julia Evans <julia@jvns.ca>,
Patrick Steinhardt <ps@pks.im>,
Kristoffer Haugsbakk <code@khaugsbakk.name>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH v3 2/2] lint-docs: check the guide list in command-list.txt
Date: Thu, 05 Nov 2026 11:41:04 -0800 [thread overview]
Message-ID: <xmqqcxsjt6b3.fsf@gitster.g> (raw)
In-Reply-To: <20261029184834.2273-3-taahol@utu.fi> (Tuomas Ahola's message of "Thu, 29 Oct 2026 20:48:34 +0200")
Tuomas Ahola <taahol@utu.fi> writes:
> extract_variable () {
> + file="${2:-../Makefile}"
> + directory="$(dirname "$file")"
> (
> - cat ../Makefile
> + cat "$file"
> cat <<EOF
> print_variable:
> @\$(foreach b,\$($1),echo XXX \$(b:\$X=) YYY;)
> EOF
> ) |
> - make -C .. -f - print_variable 2>/dev/null |
> + make -C "$directory" -f - print_variable 2>/dev/null |
I like this sayIt pattern to prepend a snippet in front of the
Makefile. As we allow extracting from different Makefile with this
change, it would make more sense to (1) make the path to the Makefile
mandatory, (2) move the path to the Makefile first, and (3) use not
just the $1 but all the remainder of the command line as listing the
symbols we are inquiring.
which would mean ...
> @@ -87,6 +91,7 @@ check_extraneous_docs () {
> BUILT_INS="$(extract_variable BUILT_INS)"
> ALL_COMMANDS="$(extract_variable ALL_COMMANDS)"
> EXCLUDED_PROGRAMS="$(extract_variable EXCLUDED_PROGRAMS)"
> +MAN_GUIDES="$(extract_variable MAN_GUIDES ./Makefile)"
These would become
BUILT_INS="$(extract_variable ../Makefile BUILT_INS)"
ALL_COMMANDS="$(extract_variable ../Makefile ALL_COMMANDS)"
EXCLUDED_PROGRAMS="$(extract_variable ../Makefile EXCLUDED_PROGRAMS)"
MAN_GUIDES="$(extract_variable Makefile MAN_GUIDES)"
Other than that, looking good.
Thanks.
next prev parent reply other threads:[~2026-11-05 19:41 UTC|newest]
Thread overview: 17+ 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 [this message]
2026-11-11 22:00 ` 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=xmqqcxsjt6b3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=code@khaugsbakk.name \
--cc=git@vger.kernel.org \
--cc=julia@jvns.ca \
--cc=peff@peff.net \
--cc=ps@pks.im \
--cc=taahol@utu.fi \
/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.