{"thread":{"id":"40016","subject":"[PATCH 2/2] tests: fix cleanup after tests in t1509-root-worktree","startedAt":"2015-08-05T09:43:50Z","lastAt":"2015-08-05T09:43:51Z","messageCount":2,"participants":["Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"267506","messageId":"1438767831-1620-1-git-send-email-ps@pks.im","threadId":"40016","inReplyTo":null,"subject":"[PATCH 1/2] tests: fix broken && chains in t1509-root-worktree","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2015-08-05T09:43:50Z","receivedAt":"2015-08-05T09:43:50Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Signed-off-by: Patrick Steinhardt <ps@pks.im>\n---\n\nThese two patches have previously been part of my patch series\nfixing directory guessing. As Jeff King has been posting a patch\nthat contains tests for cloning from a server's root without\nrequiring t1509 I now post these two fixes as separate patches.\n\n t/t1509-root-worktree.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh\nindex b6977d4..0c80129 100755\n--- a/t/t1509-root-worktree.sh\n+++ b/t/t1509-root-worktree.sh\n@@ -125,7 +125,7 @@ fi\n ONE_SHA1=d00491fd7e5bb6fa28c517a0bb32b8b506539d4d\n \n test_expect_success 'setup' '\n-\trm -rf /foo\n+\trm -rf /foo &&\n \tmkdir /foo &&\n \tmkdir /foo/bar &&\n \techo 1 > /foo/foome &&\n@@ -218,7 +218,7 @@ unset GIT_WORK_TREE\n \n test_expect_success 'go to /' 'cd /'\n test_expect_success 'setup' '\n-\trm -rf /.git\n+\trm -rf /.git &&\n \techo \"Initialized empty Git repository in /.git/\" > expected &&\n \tgit init > result &&\n \ttest_cmp expected result\n@@ -241,8 +241,8 @@ say \"auto bare gitdir\"\n \n # DESTROYYYYY!!!!!\n test_expect_success 'setup' '\n-\trm -rf /refs /objects /info /hooks\n-\trm /*\n+\trm -rf /refs /objects /info /hooks &&\n+\trm /* &&\n \tcd / &&\n \techo \"Initialized empty Git repository in /\" > expected &&\n \tgit init --bare > result &&\n-- \n2.5.0\n"},{"id":"267505","messageId":"1438767831-1620-2-git-send-email-ps@pks.im","threadId":"40016","inReplyTo":"1438767831-1620-1-git-send-email-ps@pks.im","subject":"[PATCH 2/2] tests: fix cleanup after tests in t1509-root-worktree","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2015-08-05T09:43:51Z","receivedAt":"2015-08-05T09:43:51Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"During cleanup we do a simple 'rm /*' to remove leftover files\nfrom previous tests. As 'rm' errors out when there is anything it\ncannot delete and there are directories present at '/' it will\nthrow an error, causing the '&&' chain to fail.\n\nFix this by explicitly removing the files.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n t/t1509-root-worktree.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh\nindex 0c80129..553a3f6 100755\n--- a/t/t1509-root-worktree.sh\n+++ b/t/t1509-root-worktree.sh\n@@ -242,7 +242,7 @@ say \"auto bare gitdir\"\n # DESTROYYYYY!!!!!\n test_expect_success 'setup' '\n \trm -rf /refs /objects /info /hooks &&\n-\trm /* &&\n+\trm -f /expected /ls.expected /me /result &&\n \tcd / &&\n \techo \"Initialized empty Git repository in /\" > expected &&\n \tgit init --bare > result &&\n-- \n2.5.0\n"}]}