3 test_description
='test case exclude pathspec'
7 test_expect_success
'setup a submodule' '
8 test_create_repo pretzel &&
10 git -C pretzel add a &&
11 git -C pretzel commit -m "add a file" -- a &&
12 git submodule add ./pretzel sub &&
13 git commit -a -m "add submodule" &&
14 git submodule deinit --all
18 fatal: Pathspec 'sub/a' is in submodule 'sub'
21 test_expect_success
'error message for path inside submodule' '
23 test_must_fail git add sub/a 2>actual &&
24 test_cmp expect actual
28 fatal: Pathspec '.' is in submodule 'sub'
31 test_expect_success
'error message for path inside submodule from within submodule' '
32 test_must_fail git -C sub add . 2>actual &&
33 test_cmp expect actual