Browse Source

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>
maint
Johannes Schindelin 16 years ago committed by Johannes Sixt
parent
commit
e2c2407683
  1. 6
      t/t7300-clean.sh

6
t/t7300-clean.sh

@ -373,9 +373,9 @@ test_expect_success 'removal failure' ' @@ -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

Loading…
Cancel
Save