{"thread":{"id":"8795","subject":"[PATCH] Fix t5516-fetch for systems where `wc -l` outputs whitespace.","startedAt":"2007-07-01T15:48:54Z","lastAt":"2007-07-01T15:48:54Z","messageCount":1,"participants":["Brian Gernhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"46176","messageId":"20070701154854.GA27038@Hermes.local","threadId":"8795","inReplyTo":null,"subject":"[PATCH] Fix t5516-fetch for systems where `wc -l` outputs whitespace.","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-07-01T15:48:54Z","receivedAt":"2007-07-01T15:48:54Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"When wc outputs whitespace, the test \"$(command | wc -l)\" = 1 is\nbroken because \"   1\" != \"1\".  Let the shell eat the whitespace by\nusing test 1 = $(command | wc -l) instead.\n\nSigned-off-by: Brian Gernhardt <benji@silverinsanity.com>\n---\n\n As per the previous discussion on the list.\n\n t/t5516-fetch-push.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex 08d58e1..c0fa2ba 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -226,7 +226,7 @@ test_expect_success 'push with colon-less refspec (3)' '\n \tgit branch -f frotz master &&\n \tgit push testrepo frotz &&\n \tcheck_push_result $the_commit heads/frotz &&\n-\ttest \"$( cd testrepo && git show-ref | wc -l )\" = 1\n+\ttest 1 = $( cd testrepo && git show-ref | wc -l )\n '\n \n test_expect_success 'push with colon-less refspec (4)' '\n@@ -239,7 +239,7 @@ test_expect_success 'push with colon-less refspec (4)' '\n \tgit tag -f frotz &&\n \tgit push testrepo frotz &&\n \tcheck_push_result $the_commit tags/frotz &&\n-\ttest \"$( cd testrepo && git show-ref | wc -l )\" = 1\n+\ttest 1 = $( cd testrepo && git show-ref | wc -l )\n \n '\n \n-- \n1.5.2.2.590.gf578-dirty\n"}]}