From 7af55d1f2bfafbe0fbc897e6f82a36d1e460b680 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Tue, 27 Dec 2016 11:36:04 -0800 Subject: t7411: quote URLs The variables may contain white spaces, so we need to quote them. By not quoting the variables we'd end up passing multiple arguments to git config, which doesn't fail for two arguments as value. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- t/t7411-submodule-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t7411-submodule-config.sh') diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh index d389ae5408..e4bb9851b1 100755 --- a/t/t7411-submodule-config.sh +++ b/t/t7411-submodule-config.sh @@ -134,8 +134,8 @@ test_expect_success 'reading of local configuration' ' "" submodule \ >actual && test_cmp expect_local_path actual && - git config submodule.a.url $old_a && - git config submodule.submodule.url $old_submodule && + git config submodule.a.url "$old_a" && + git config submodule.submodule.url "$old_submodule" && git config --unset submodule.a.path c ) ' -- cgit v1.2.3 From 239039bd703e9f2286699de5aedae4c17defbbf1 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Tue, 27 Dec 2016 11:36:05 -0800 Subject: t7411: test lookup of uninitialized submodules Sometimes we need to lookup information of uninitialized submodules. Make sure that works. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- t/t7411-submodule-config.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 't/t7411-submodule-config.sh') diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh index e4bb9851b1..eea36f1dbe 100755 --- a/t/t7411-submodule-config.sh +++ b/t/t7411-submodule-config.sh @@ -140,6 +140,27 @@ test_expect_success 'reading of local configuration' ' ) ' +cat >super/expect_url <actual && + test_cmp expect_url actual && + git config submodule.submodule.url "$old_submodule" && + git submodule init b + ) +' + cat >super/expect_fetchrecurse_die.err <