Skip to content

Commit

Permalink
tests: fix cleanup after tests in t1509-root-worktree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick Steinhardt authored and Junio C Hamano committed Aug 5, 2015
1 parent 24ca45f commit faacc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t1509-root-worktree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit faacc5a

Please sign in to comment.