t7300: fix clean up on Windows

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>
This commit is contained in:
Johannes Schindelin 2009-03-11 17:58:32 +01:00 committed by Johannes Sixt
parent 1f553918a8
commit e2c2407683

View file

@ -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