Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t5815-submodule-protos.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t5815-submodule-protos.sh` 44 lines ยท 1205 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='test protocol filtering with submodules' 4 5 . ./test-lib.sh 6 . "$TEST_DIRECTORY"/lib-proto-disable.sh 7 8 setup_ext_wrapper 9 setup_ssh_wrapper 10 11 test_expect_success 'setup repository with submodules' ' 12 mkdir remote && 13 git init remote/repo.git && 14 (cd remote/repo.git && test_commit one) && 15 # submodule-add should probably trust what we feed it on the cmdline, 16 # but its implementation is overly conservative. 17 GIT_ALLOW_PROTOCOL=ssh git submodule add remote:repo.git ssh-module && 18 GIT_ALLOW_PROTOCOL=ext git submodule add "ext::fake-remote %S repo.git" ext-module && 19 git commit -m "add submodules" 20 ' 21 22 test_expect_success 'clone with recurse-submodules fails' ' 23 test_must_fail git clone --recurse-submodules . dst 24 ' 25 26 test_expect_success 'setup individual updates' ' 27 rm -rf dst && 28 git clone . dst && 29 git -C dst submodule init 30 ' 31 32 test_expect_success 'update of ssh allowed' ' 33 git -C dst submodule update ssh-module 34 ' 35 36 test_expect_success 'update of ext not allowed' ' 37 test_must_fail git -C dst submodule update ext-module 38 ' 39 40 test_expect_success 'user can filter protocols with GIT_ALLOW_PROTOCOL' ' 41 GIT_ALLOW_PROTOCOL=ext git -C dst submodule update ext-module 42 ' 43 44 test_done