Message ID | 20240726081522.28015-1-ericsunshine@charter.net (mailing list archive) |
---|---|
Headers | show |
Series | improve one-shot variable detection with shell function | expand |
Eric Sunshine <ericsunshine@charter.net> writes: > @@ t/t3430-rebase-merges.sh: test_expect_success 'refuse to merge ancestors of HEAD > git checkout --orphan unrelated && > - (GIT_AUTHOR_NAME="Parsnip" GIT_AUTHOR_EMAIL="root@example.com" \ > - test_commit second-root) && > -+ test_env GIT_AUTHOR_NAME="Parsnip" GIT_AUTHOR_EMAIL="root@example.com" \ > -+ test_commit second-root && > ++ test_commit --author "Parsnip <root@example.com>" second-root && Very pleasing to the eyes. > @@ t/check-non-portable-shell.pl: sub err { > err q(quote "$val" in 'local var=$val'); > - /^\s*([A-Z0-9_]+=(\w*|(["']).*?\3)\s+)+(\w+)/ and exists($func{$4}) and > + /\b([A-Z0-9_]+=(\w*|(["']).*?\3)\s+)+(\w+)/ and !/test_env.+=/ and exists($func{$4}) and > - err '"FOO=bar shell_func" assignment extends beyond "shell_func"'; > + err '"FOO=bar shell_func" is not portable (use test_env FOO=bar shell_func)'; OK. Thanks. Will queue.