Junio C Hamano <gitster@xxxxxxxxx> writes: > These are two other offenders. > > $ git grep '^[ ]local[ ]' \*.sh > t/t5500-fetch-pack.sh: local diagport > t/t7403-submodule-sync.sh: local root > > The grep gives many other hits, but those in completion are OK; it > is designed to be specific to bash, and whose tests in t9902 is in > the same boat. A few more near the end of t/test-lib-functions are > only for mingw where bash is the only supported shell at least for > running tests. I think this should be sufficient (extra sets of eyeballs are appreciated). For 5500, diagport is not a variable used elsewhere and can simply lose the "local". 7403 overrides the "root" variable used in the test framework for no good reason (its use is not about temporarily relocating where the test repositories are created), but they can be made not to clobber the varible by moving them into the subshells it already uses. t/t5500-fetch-pack.sh | 1 - t/t7403-submodule-sync.sh | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 9b9bec4..dc305d6 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -556,7 +556,6 @@ check_prot_path () { } check_prot_host_port_path () { - local diagport case "$2" in *ssh*) pp=ssh diff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh index 79bc135..5503ec0 100755 --- a/t/t7403-submodule-sync.sh +++ b/t/t7403-submodule-sync.sh @@ -62,13 +62,13 @@ test_expect_success 'change submodule' ' ' reset_submodule_urls () { - local root - root=$(pwd) && ( + root=$(pwd) && cd super-clone/submodule && git config remote.origin.url "$root/submodule" ) && ( + root=$(pwd) && cd super-clone/submodule/sub-submodule && git config remote.origin.url "$root/submodule" ) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html