X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7300-clean.sh;h=118c6ebb182b5cd4700e533d6a951b31529149af;hb=3f189d0ffca46dda01be99a7a8f36b7efacb0a8a;hp=1636fac2a43e30a99674df98ff4544ee04612cc5;hpb=5ab2f7b2ce8c51e8c47a4cc57c30fa7cae239005;p=git.git diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 1636fac2a..118c6ebb1 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh @@ -373,11 +373,50 @@ test_expect_success 'removal failure' ' mkdir foo && touch foo/bar && - exec hello.world + git add . && + git commit -a -m nested + ) && + ( + cd bar && + >goodbye.people + ) && + git clean -f -d && + test -f foo/.git/index && + test -f foo/hello.world && + ! test -d bar +' + +test_expect_success 'force removal of nested git work tree' ' + rm -fr foo bar && + mkdir foo bar && + ( + cd foo && + git init && + >hello.world + git add . && + git commit -a -m nested + ) && + ( + cd bar && + >goodbye.people + ) && + git clean -f -f -d && + ! test -d foo && + ! test -d bar +' + test_done