diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-04-05 17:08:59 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-04-05 22:50:10 -0700 |
| commit | 341aad8d41ca8321d826e1ce012e4faf1a8be2a4 (patch) | |
| tree | 03549339b89260e4d5c3650ac78da77d63f301b8 /t/t2400-worktree-add.sh | |
| parent | be34b51049d1628d1ba4f17e3c087fd01f15f988 (diff) | |
| download | git-341aad8d41ca8321d826e1ce012e4faf1a8be2a4.tar.xz | |
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>
Diffstat (limited to 't/t2400-worktree-add.sh')
| -rwxr-xr-x | t/t2400-worktree-add.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh index c28c04133c..ba320dc417 100755 --- a/t/t2400-worktree-add.sh +++ b/t/t2400-worktree-add.sh @@ -427,7 +427,7 @@ test_expect_success '"add" worktree with orphan branch, lock, and reason' ' # Note: Quoted arguments containing spaces are not supported. test_wt_add_orphan_hint () { local context="$1" && - local use_branch=$2 && + local use_branch="$2" && shift 2 && local opts="$*" && test_expect_success "'worktree add' show orphan hint in bad/orphan HEAD w/ $context" ' |
