diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-11-06 15:50:19 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-06 15:50:19 +0900 |
| commit | 3fc8522e68c00c899567c2877bb71aff75d9df3e (patch) | |
| tree | 973181da3f2a3b5f1694468c25adaff1014dc063 /t/t7400-submodule-basic.sh | |
| parent | ea100b6dcba03053baed5a1e20c1a2644957b02e (diff) | |
| parent | e0a862fdaf7628ceba4ea290b91ffd5d3c46b75b (diff) | |
| download | git-3fc8522e68c00c899567c2877bb71aff75d9df3e.tar.xz | |
Merge branch 'sb/submodule-url-to-absolute'
Some codepaths failed to form a proper URL when .gitmodules record
the URL to a submodule repository as relative to the repository of
superproject, which has been corrected.
* sb/submodule-url-to-absolute:
submodule helper: convert relative URL to absolute URL if needed
Diffstat (limited to 't/t7400-submodule-basic.sh')
| -rwxr-xr-x | t/t7400-submodule-basic.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index c0ffc1022a..76a7cb0af7 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -1224,6 +1224,30 @@ test_expect_success 'submodule update and setting submodule.<name>.active' ' test_cmp expect actual ' +test_expect_success 'clone active submodule without submodule url set' ' + test_when_finished "rm -rf test/test" && + mkdir test && + # another dir breaks accidental relative paths still being correct + git clone file://"$pwd"/multisuper test/test && + ( + cd test/test && + git config submodule.active "." && + + # do not pass --init flag, as the submodule is already active: + git submodule update && + git submodule status >actual_raw && + + cut -c 1,43- actual_raw >actual && + cat >expect <<-\EOF && + sub0 (test2) + sub1 (test2) + sub2 (test2) + sub3 (test2) + EOF + test_cmp expect actual + ) +' + test_expect_success 'clone --recurse-submodules with a pathspec works' ' test_when_finished "rm -rf multisuper_clone" && cat >expected <<-\EOF && |
