[PATCH 07/10] t7300: fix clean up on Windows
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Mar 18, 2009, 21:27 UTC
- Message-ID
- <ffdd1bf27fc20055147db1573712acabc73f339c.1237410682.git.j6t@kdbg.org>
- In-Reply-To
- <cover.1237410682.git.j6t@kdbg.org>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, you cannot remove files that are in use, not even with 'rm -rf'. So we need to run 'exec <foo/bar' inside a subshell lest removing the whole test repository fail.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Johannes Sixt <j6t@kdbg.org> --- t/t7300-clean.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 1636fac..929d5d4 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh @@ -373,9 +373,9 @@ test_expect_success 'removal failure' ' mkdir foo && touch foo/bar && - exec <foo/bar && - chmod 0 foo && - test_must_fail git clean -f -d + (exec <foo/bar && + chmod 0 foo && + test_must_fail git clean -f -d) ' chmod 755 foo
-- 1.6.2.1.224.g2225f