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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2026, 18:15 UTC
Message-ID
<xmqq5x0es33y.fsf@gitster.g>
In-Reply-To
<20260909052501.8448-3-taahol@utu.fi>
Tuomas Ahola <taahol@utu.fi> writes:
Show 5 quoted lines
>  extract_variable () {
> +	file=${2:-../Makefile}
>  	(
> -		cat ../Makefile
> +		cat $file

Now you are allowing arbitrary path to be fed to this function, you should prepare to accept arbitrary path, without assuming that $file has no $IFS whitespaces. I.e.,

		cat "$file"
>  	) |
> -	make -C .. -f - print_variable 2>/dev/null |
> +	make -C $(dirname $file) -f - print_variable 2>/dev/null |

Ditto. $file itself may have $IFS whitespaces, and the result of running dirname on it may too.

Previous: Tuomas AholaNext: Tuomas Ahola
Message 3 of 8 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

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.