diff options
author | Stefan Beller <sbeller@google.com> | 2016-12-27 11:36:05 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-12 14:18:22 -0800 |
commit | 239039bd703e9f2286699de5aedae4c17defbbf1 (patch) | |
tree | 39d730d4cc36f622aa16abaaacb2fbccd6b82ff8 /t | |
parent | 7af55d1f2bfafbe0fbc897e6f82a36d1e460b680 (diff) | |
download | git-239039bd703e9f2286699de5aedae4c17defbbf1.tar.gz |
t7411: test lookup of uninitialized submodulessb/submodule-config-tests
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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7411-submodule-config.sh | 21 |
1 files changed, 21 insertions, 0 deletions
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 <<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 |