Git fork

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>

+5 -5
+1 -1
t/lib-parallel-checkout.sh
··· 20 20 BUG "too few arguments to test_checkout_workers" 21 21 fi && 22 22 23 - local expected_workers=$1 && 23 + local expected_workers="$1" && 24 24 shift && 25 25 26 26 local trace_file=trace-test-checkout-workers &&
+1 -1
t/t2400-worktree-add.sh
··· 427 427 # Note: Quoted arguments containing spaces are not supported. 428 428 test_wt_add_orphan_hint () { 429 429 local context="$1" && 430 - local use_branch=$2 && 430 + local use_branch="$2" && 431 431 shift 2 && 432 432 local opts="$*" && 433 433 test_expect_success "'worktree add' show orphan hint in bad/orphan HEAD w/ $context" '
+2 -2
t/t4210-log-i18n.sh
··· 64 64 ' 65 65 66 66 triggers_undefined_behaviour () { 67 - local engine=$1 67 + local engine="$1" 68 68 69 69 case $engine in 70 70 fixed) ··· 85 85 } 86 86 87 87 mismatched_git_log () { 88 - local pattern=$1 88 + local pattern="$1" 89 89 90 90 LC_ALL=$is_IS_locale git log --encoding=ISO-8859-1 --format=%s \ 91 91 --grep=$pattern
+1 -1
t/test-lib-functions.sh
··· 1765 1765 # Choose a port number based on the test script's number and store it in 1766 1766 # the given variable name, unless that variable already contains a number. 1767 1767 test_set_port () { 1768 - local var=$1 port 1768 + local var="$1" port 1769 1769 1770 1770 if test $# -ne 1 || test -z "$var" 1771 1771 then