t: local VAR="VAL" (quote positional parameters)
Future-proof test scripts that do local VAR=VAL without quoting VAL (which is OK in POSIX but broken in some shells) that is a positional parameter, e.g. $4. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -1765,7 +1765,7 @@ test_parse_ls_tree_oids () {
|
||||
# Choose a port number based on the test script's number and store it in
|
||||
# the given variable name, unless that variable already contains a number.
|
||||
test_set_port () {
|
||||
local var=$1 port
|
||||
local var="$1" port
|
||||
|
||||
if test $# -ne 1 || test -z "$var"
|
||||
then
|
||||
|
Reference in New Issue
Block a user