3 test_description
='test case exclude pathspec'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'setup a submodule' '
9 test_create_repo pretzel &&
11 git -C pretzel add a &&
12 git -C pretzel commit -m "add a file" -- a &&
13 git -c protocol.file.allow=always submodule add ./pretzel sub &&
14 git commit -a -m "add submodule" &&
15 git submodule deinit --all
19 fatal: Pathspec 'sub/a' is in submodule 'sub'
22 test_expect_success
'error message for path inside submodule' '
24 test_must_fail git add sub/a 2>actual &&
25 test_cmp expect actual
28 test_expect_success
'error message for path inside submodule from within submodule' '
29 test_must_fail git -C sub add . 2>actual &&
30 test_i18ngrep "in unpopulated submodule" actual