t5801: don't use test_when_finished in a subshell
[gitweb.git] / t / t7300-clean.sh
index 99be5d95d063f85873a4cb5c5c7ebefd8ebfc990..634808a708588896f2e6ffbc1e2e28575409b0eb 100755 (executable)
@@ -432,9 +432,7 @@ test_expect_success 'nested git work tree' '
        (
                cd foo &&
                git init &&
-               >hello.world
-               git add . &&
-               git commit -a -m nested
+               test_commit nested hello.world
        ) &&
        (
                cd bar &&
@@ -443,9 +441,7 @@ test_expect_success 'nested git work tree' '
        (
                cd baz/boo &&
                git init &&
-               >deeper.world
-               git add . &&
-               git commit -a -m deeply.nested
+               test_commit deeply.nested deeper.world
        ) &&
        git clean -f -d &&
        test -f foo/.git/index &&
@@ -461,9 +457,7 @@ test_expect_success 'force removal of nested git work tree' '
        (
                cd foo &&
                git init &&
-               >hello.world
-               git add . &&
-               git commit -a -m nested
+               test_commit nested hello.world
        ) &&
        (
                cd bar &&
@@ -472,9 +466,7 @@ test_expect_success 'force removal of nested git work tree' '
        (
                cd baz/boo &&
                git init &&
-               >deeper.world
-               git add . &&
-               git commit -a -m deeply.nested
+               test_commit deeply.nested deeper.world
        ) &&
        git clean -f -f -d &&
        ! test -d foo &&