From: Shourya Shukla Date: Mon, 14 Dec 2020 23:19:39 GMT Subject: [PATCH v3 3/3] t7400: add test to check 'submodule add' for tracked paths Message-ID: <20201214231939.644175-4-periperidip@gmail.com> In-Reply-To: <20201214231939.644175-1-periperidip@gmail.com> Add test to check if 'git submodule add' works on paths which are tracked by Git. Helped-by: Christian Couder Helped-by: Kaartic Sivaraam Signed-off-by: Shourya Shukla --- t/t7400-submodule-basic.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 && -- 2.25.1