X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7400-submodule-basic.sh;h=1a4dc5f89353df7d7bda4bea539ee5bd7a3b9bae;hb=030b1a77f72a7e3307c7d7881ae570ca1c8ed877;hp=0f2ccc6cf0123951d9bdbb880931868f29de5b4e;hpb=78b77c491ff21e27dbaf1381268aeb380f0607b8;p=git.git diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 0f2ccc6cf..1a4dc5f89 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -299,6 +299,15 @@ test_expect_success 'ls-files gracefully handles trailing slash' ' ' +test_expect_success 'moving to a commit without submodule does not leave empty dir' ' + rm -rf init && + mkdir init && + git reset --hard && + git checkout initial && + test ! -d init && + git checkout second +' + test_expect_success 'submodule warns' ' git submodule no-such-submodule 2> output.err && @@ -306,4 +315,20 @@ test_expect_success 'submodule warns' ' ' +test_expect_success 'add submodules without specifying an explicit path' ' + mkdir repo && + cd repo && + git init && + echo r >r && + git add r && + git commit -m "repo commit 1" && + cd .. && + git clone --bare repo/ bare.git && + cd addtest && + git submodule add "$submodurl/repo" && + git config -f .gitmodules submodule.repo.path repo && + git submodule add "$submodurl/bare.git" && + git config -f .gitmodules submodule.bare.path bare +' + test_done