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/t7414-submodule-mistakes.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 / t7414-submodule-mistakes.sh` 39 lines ยท 1033 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='handling of common mistakes people may make with submodules' 4 5 . ./test-lib.sh 6 7 test_expect_success 'create embedded repository' ' 8 git init embed && 9 test_commit -C embed one 10 ' 11 12 test_expect_success 'git-add on embedded repository warns' ' 13 test_when_finished "git rm --cached -f embed" && 14 git add embed 2>stderr && 15 test_grep warning stderr 16 ' 17 18 test_expect_success '--no-warn-embedded-repo suppresses warning' ' 19 test_when_finished "git rm --cached -f embed" && 20 git add --no-warn-embedded-repo embed 2>stderr && 21 test_grep ! warning stderr 22 ' 23 24 test_expect_success 'no warning when updating entry' ' 25 test_when_finished "git rm --cached -f embed" && 26 git add embed && 27 git -C embed commit --allow-empty -m two && 28 git add embed 2>stderr && 29 test_grep ! warning stderr 30 ' 31 32 test_expect_success 'submodule add does not warn' ' 33 test_when_finished "git rm -rf submodule .gitmodules" && 34 git -c protocol.file.allow=always \ 35 submodule add ./embed submodule 2>stderr && 36 test_grep ! warning stderr 37 ' 38 39 test_done