git-gc.txt: fix typo about gc.writeCommitGraph
[git/raj.git] / t / t7414-submodule-mistakes.sh
blobf2e7df59cf24c254440a8bc1c7d5c195c8bfcd5b
1 #!/bin/sh
3 test_description='handling of common mistakes people may make with submodules'
4 . ./test-lib.sh
6 test_expect_success 'create embedded repository' '
7 git init embed &&
8 test_commit -C embed one
11 test_expect_success 'git-add on embedded repository warns' '
12 test_when_finished "git rm --cached -f embed" &&
13 git add embed 2>stderr &&
14 test_i18ngrep warning stderr
17 test_expect_success '--no-warn-embedded-repo suppresses warning' '
18 test_when_finished "git rm --cached -f embed" &&
19 git add --no-warn-embedded-repo embed 2>stderr &&
20 test_i18ngrep ! warning stderr
23 test_expect_success 'no warning when updating entry' '
24 test_when_finished "git rm --cached -f embed" &&
25 git add embed &&
26 git -C embed commit --allow-empty -m two &&
27 git add embed 2>stderr &&
28 test_i18ngrep ! warning stderr
31 test_expect_success 'submodule add does not warn' '
32 test_when_finished "git rm -rf submodule .gitmodules" &&
33 git submodule add ./embed submodule 2>stderr &&
34 test_i18ngrep ! warning stderr
37 test_done