{"thread":{"id":"22030","subject":"[PATCH] t1200: work around a bug in some implementations of \"find\"","startedAt":"2009-12-26T21:53:45Z","lastAt":"2009-12-26T21:53:45Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"130351","messageId":"7vocllxuza.fsf@alter.siamese.dyndns.org","threadId":"22030","inReplyTo":null,"subject":"[PATCH] t1200: work around a bug in some implementations of \"find\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-26T21:53:45Z","receivedAt":"2009-12-26T21:53:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"find path ...\" command should exit with zero status only when all path\noperands were traversed successfully.  When a non-existent path is given,\nhowever, some implementations of \"find\" (e.g. OpenBSD 4.6) exit with zero\nstatus and break the last test in t1200.\n\nRewrite the test to check that there is no regular files in the objects\nfan-out directories to work around this bug; it is closer to what we are\ntesting anyway.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t1200-tutorial.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh\nindex 238c2f1..ab55eda 100755\n--- a/t/t1200-tutorial.sh\n+++ b/t/t1200-tutorial.sh\n@@ -259,7 +259,7 @@ test_expect_success 'git repack' 'git repack'\n test_expect_success 'git prune-packed' 'git prune-packed'\n test_expect_success '-> only packed objects' '\n \tgit prune && # Remove conflict marked blobs\n-\t! find .git/objects/[0-9a-f][0-9a-f] -type f\n+\ttest $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0\n '\n \n test_done\n"}]}