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>
Johannes Schindelin committed
Mar 11, 2009 at 17:58 UTC
e2c2407683bf51c30004d2804623f2eb8e831b7a
1 file changed
+3
-3
t/t7300-clean.sh
+3
-3
@@ -373,9 +373,9 @@ test_expect_success 'removal failure' '
373
374
mkdir foo &&
375
touch foo/bar &&
376
- exec <foo/bar &&
377
- chmod 0 foo &&
378
- test_must_fail git clean -f -d
376
+ (exec <foo/bar &&
377
+ chmod 0 foo &&
378
+ test_must_fail git clean -f -d)
379
380
'
381
chmod 755 foo