git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 2/2] lint-docs: check the guide list in command-list.txt

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 5, 2026, 19:41 UTC
Message-ID
<xmqqcxsjt6b3.fsf@gitster.g>
In-Reply-To
<20261029184834.2273-3-taahol@utu.fi>
Tuomas Ahola <taahol@utu.fi> writes:
Show 13 quoted lines
>  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 ...
Show 5 quoted lines
> @@ -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.
Previous: Tuomas AholaNext: Tuomas Ahola
Message 16 of 17 in “guides: keep Documentation/Makefile and command-list.txt in sync”
  1. 0/2 guides: keep Documentation/Makefile and command-list.txt in syncTuomas Ahola, Sep 9, 2026
  2. 2/2 lint-docs: check the guide list in command-list.txtTuomas Ahola, Sep 9, 2026
  3. Junio C HamanoSep 9, 2026
  4. 1/2 command-list: add gitformat-loose(5) and gitpacking(7)Tuomas Ahola, Sep 9, 2026
  5. Junio C HamanoSep 9, 2026
  6. 0/2 guides: keep Documentation/Makefile and command-list.txt in syncTuomas Ahola, Sep 10, 2026
  7. 1/2 command-list.txt: add gitformat-loose(5) and gitpacking(7)Tuomas Ahola, Sep 10, 2026
  8. 2/2 lint-docs: check the guide list in command-list.txtTuomas Ahola, Sep 10, 2026
  9. 0/2 guides: keep Documentation/Makefile and command-list.txt in syncTuomas Ahola, Oct 29, 2026
  10. 1/2 command-list.txt: add gitformat-loose(5) and gitpacking(7)Tuomas Ahola, Oct 29, 2026
  11. Junio C HamanoNov 5, 2026
  12. Tuomas AholaNov 11, 2026
  13. 2/2 lint-docs: check the guide list in command-list.txtTuomas Ahola, Oct 29, 2026
  14. Julia EvansNov 2, 2026
  15. Tuomas AholaNov 3, 2026
  16. Junio C HamanoNov 5, 2026
  17. Tuomas AholaNov 11, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.