Message ID | 20201214231939.644175-4-periperidip@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | submodule: port subcommand add from shell to C | expand |
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 4ab8298385..d9317192e0 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -193,6 +193,17 @@ test_expect_success 'submodule add to .gitignored path with --force' ' ) ' +test_expect_success 'submodule add to path with tracked contents fails' ' + ( + cd addtest-ignore && + mkdir track && + git add -f track && + git commit -m "add tracked path" && + ! git submodule add "$submodurl" submod >output 2>&1 && + test_file_not_empty output + ) +' + test_expect_success 'submodule add to reconfigure existing submodule with --force' ' ( cd addtest-ignore &&
Add test to check if 'git submodule add' works on paths which are tracked by Git. Helped-by: Christian Couder <christian.couder@gmail.com> Helped-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Shourya Shukla <periperidip@gmail.com> --- t/t7400-submodule-basic.sh | 11 +++++++++++ 1 file changed, 11 insertions(+)