From 24ca45f64cf90a91597a94c85a11a69d030e0389 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 5 Aug 2015 11:43:50 +0200 Subject: [PATCH 1/2] tests: fix broken && chains in t1509-root-worktree Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- t/t1509-root-worktree.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh index b6977d4b39..0c80129656 100755 --- a/t/t1509-root-worktree.sh +++ b/t/t1509-root-worktree.sh @@ -125,7 +125,7 @@ fi ONE_SHA1=d00491fd7e5bb6fa28c517a0bb32b8b506539d4d test_expect_success 'setup' ' - rm -rf /foo + rm -rf /foo && mkdir /foo && mkdir /foo/bar && echo 1 > /foo/foome && @@ -218,7 +218,7 @@ unset GIT_WORK_TREE test_expect_success 'go to /' 'cd /' test_expect_success 'setup' ' - rm -rf /.git + rm -rf /.git && echo "Initialized empty Git repository in /.git/" > expected && git init > result && test_cmp expected result @@ -241,8 +241,8 @@ say "auto bare gitdir" # DESTROYYYYY!!!!! test_expect_success 'setup' ' - rm -rf /refs /objects /info /hooks - rm /* + rm -rf /refs /objects /info /hooks && + rm /* && cd / && echo "Initialized empty Git repository in /" > expected && git init --bare > result && From faacc5aa7c3d9c0695bf0203b55c4fd77cd5cda3 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 5 Aug 2015 11:43:51 +0200 Subject: [PATCH 2/2] tests: fix cleanup after tests in t1509-root-worktree 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 Signed-off-by: Junio C Hamano --- t/t1509-root-worktree.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh index 0c80129656..553a3f601b 100755 --- a/t/t1509-root-worktree.sh +++ b/t/t1509-root-worktree.sh @@ -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 &&