Skip to content

Commit

Permalink
t7300: fix clean up on Windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Johannes Sixt committed Mar 19, 2009
1 parent 1f55391 commit e2c2407
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/t7300-clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2c2407

Please sign in to comment.