t7411: test lookup of uninitialized submodules

Sometimes we need to lookup information of uninitialized submodules. Make
sure that works.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller 2016-12-27 11:36:05 -08:00 committed by Junio C Hamano
parent 7af55d1f2b
commit 239039bd70

View File

@ -140,6 +140,27 @@ test_expect_success 'reading of local configuration' '
)
'
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