OSDN Git Service

tests: fix cleanup after tests in t1509-root-worktree
authorPatrick Steinhardt <ps@pks.im>
Wed, 5 Aug 2015 09:43:51 +0000 (11:43 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Aug 2015 20:00:04 +0000 (13:00 -0700)
During cleanup we do a simple 'rm /*' to remove leftover files
from previous tests. As 'rm' errors out when there is anything it
cannot delete and there are directories present at '/' it will
throw an error, causing the '&&' chain to fail.

Fix this by explicitly removing the files.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1509-root-worktree.sh

index 0c80129..553a3f6 100755 (executable)
@@ -242,7 +242,7 @@ say "auto bare gitdir"
 # DESTROYYYYY!!!!!
 test_expect_success 'setup' '
        rm -rf /refs /objects /info /hooks &&
-       rm /* &&
+       rm -f /expected /ls.expected /me /result &&
        cd / &&
        echo "Initialized empty Git repository in /" > expected &&
        git init --bare > result &&