Re: [PATCH] CodingGuidelines: quote assigned value with "local" and "export"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 5, 2024, 16:21 UTC
- Message-ID
- <xmqqwmpbwzje.fsf@gitster.g>
- In-Reply-To
- <xmqqbk6nyej1.fsf_-_@gitster.g>
Somebody may want to inspect the output from
$ git grep -E -i -e '^ *(local|export) [a-z0-9_]*=\$'
and fix those that can be used with dash. I made a cursory scan and removed obviously safe ones whose RHS will never have $IFS whitespaces, and the following are remainders. #leftoverbits
t/t0610-reftable-basics.sh: local actual=$(ls -l "$file") && t/test-lib-functions.sh: local file=${2:-"$1.t"} && t/test-lib-functions.sh: local basename=${1#??} t/test-lib-functions.sh: local var=$1 port t/test-lib-functions.sh: local expr=$(printf '"%s",' "$@") t/test-lib-functions.sh: local inc=${2:-0} && t/test-lib-functions.sh: local inc=${2:-0} && t/test-lib-functions.sh: local ret=$?