diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-04-11 13:09:56 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-11 13:09:56 +0900 |
commit | 103251a318ed960c9574e68ad21d013fca78560b (patch) | |
tree | cb664e4a5ff26e4de16646ef1975ce11daca1dfe /t | |
parent | Merge branch 'nd/combined-test-helper' (diff) | |
parent | submodule: check for NULL return of get_submodule_ref_store() (diff) | |
download | tgif-103251a318ed960c9574e68ad21d013fca78560b.tar.xz |
Merge branch 'rs/status-with-removed-submodule'
"git submodule status" misbehaved on a submodule that has been
removed from the working tree.
* rs/status-with-removed-submodule:
submodule: check for NULL return of get_submodule_ref_store()
Diffstat (limited to 't')
-rwxr-xr-x | t/t7400-submodule-basic.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index a39e69a3eb..152104412f 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -821,6 +821,21 @@ test_expect_success 'moving the superproject does not break submodules' ' ) ' +test_expect_success 'moving the submodule does not break the superproject' ' + ( + cd addtest2 && + git submodule status + ) >actual && + sed -e "s/^ \([^ ]* repo\) .*/-\1/" <actual >expect && + mv addtest2/repo addtest2/repo.bak && + test_when_finished "mv addtest2/repo.bak addtest2/repo" && + ( + cd addtest2 && + git submodule status + ) >actual && + test_cmp expect actual +' + test_expect_success 'submodule add --name allows to replace a submodule with another at the same path' ' ( cd addtest2 && |