Merge branch 'sb/submodule-config-tests'

Test updates.

* sb/submodule-config-tests:
  t7411: test lookup of uninitialized submodules
  t7411: quote URLs
This commit is contained in:
Junio C Hamano 2017-01-23 15:59:20 -08:00
commit 972dfda5f6

View File

@ -134,12 +134,33 @@ 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
)
'
cat >super/expect_url <<EOF
Submodule url: '../submodule' for path 'b'
Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule'
EOF
test_expect_success 'reading of local configuration for uninitialized submodules' '
(
cd super &&
git submodule deinit -f b &&
old_submodule=$(git config submodule.submodule.url) &&
git config submodule.submodule.url git@somewhere.else.net:submodule.git &&
test-submodule-config --url \
"" b \
"" submodule \
>actual &&
test_cmp expect_url actual &&
git config submodule.submodule.url "$old_submodule" &&
git submodule init b
)
'
cat >super/expect_fetchrecurse_die.err <<EOF
fatal: bad submodule.submodule.fetchrecursesubmodules argument: blabla
EOF