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 $fileNow 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.