Merge branch 'jk/ident-split-fix' into maint
[gitweb.git] / t / t7300-clean.sh
index 800b5368a5248835bb9817c0e0c8409131306b3c..ccfb54de7ad9473221390d019b109bcb010a2c76 100755 (executable)
@@ -399,8 +399,8 @@ test_expect_success SANITY 'removal failure' '
 '
 
 test_expect_success 'nested git work tree' '
-       rm -fr foo bar &&
-       mkdir foo bar &&
+       rm -fr foo bar baz &&
+       mkdir -p foo bar baz/boo &&
        (
                cd foo &&
                git init &&
@@ -412,15 +412,24 @@ test_expect_success 'nested git work tree' '
                cd bar &&
                >goodbye.people
        ) &&
+       (
+               cd baz/boo &&
+               git init &&
+               >deeper.world
+               git add . &&
+               git commit -a -m deeply.nested
+       ) &&
        git clean -f -d &&
        test -f foo/.git/index &&
        test -f foo/hello.world &&
+       test -f baz/boo/.git/index &&
+       test -f baz/boo/deeper.world &&
        ! test -d bar
 '
 
 test_expect_success 'force removal of nested git work tree' '
-       rm -fr foo bar &&
-       mkdir foo bar &&
+       rm -fr foo bar baz &&
+       mkdir -p foo bar baz/boo &&
        (
                cd foo &&
                git init &&
@@ -432,9 +441,17 @@ test_expect_success 'force removal of nested git work tree' '
                cd bar &&
                >goodbye.people
        ) &&
+       (
+               cd baz/boo &&
+               git init &&
+               >deeper.world
+               git add . &&
+               git commit -a -m deeply.nested
+       ) &&
        git clean -f -f -d &&
        ! test -d foo &&
-       ! test -d bar
+       ! test -d bar &&
+       ! test -d baz
 '
 
 test_expect_success 'git clean -e' '