{"thread":{"id":"27259","subject":"[PATCH] t/annotate-tests: Use echo & cat instead of sed","startedAt":"2011-05-05T04:43:37Z","lastAt":"2011-05-05T07:43:43Z","messageCount":3,"participants":["Brian Gernhardt","Junio C Hamano","Arjen Laarhoven"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"167071","messageId":"1304570617-17603-1-git-send-email-brian@gernhardtsoftware.com","threadId":"27259","inReplyTo":null,"subject":"[PATCH] t/annotate-tests: Use echo & cat instead of sed","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2011-05-05T04:43:37Z","receivedAt":"2011-05-05T04:43:37Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"The use of the sed command \"1i No robots allowed\" caused the version\nof sed in OS X to die with\n\n   sed: 1: \"1i \"No robots allowed\"\\n\": command i expects \\ followed by\n   text\n\nSince this command was just trying to add a single line to the\nbeginning of the file, do the same with \"echo > file.net && cat file\n>> file.new\"\n\nUnbreaks t8001 and t8002 on OS X 10.6.7\n---\n t/annotate-tests.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/annotate-tests.sh b/t/annotate-tests.sh\nindex abb1885..c56a77d 100644\n--- a/t/annotate-tests.sh\n+++ b/t/annotate-tests.sh\n@@ -127,7 +127,8 @@ test_expect_success \\\n \n test_expect_success \\\n     'an obfuscated email added' \\\n-    'sed -e \"1i No robots allowed\" < file > file.new &&\n+    'echo \"No robots allowed\" > file.new &&\n+     cat file >> file.new &&\n      mv file.new file &&\n      GIT_AUTHOR_NAME=\"E\" GIT_AUTHOR_EMAIL=\"E at test dot git\" git commit -a -m \"norobots\"'\n \n-- \n1.7.5.258.g6ba2f\n"},{"id":"167073","messageId":"7vk4e5bt90.fsf@alter.siamese.dyndns.org","threadId":"27259","inReplyTo":"1304570617-17603-1-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH] t/annotate-tests: Use echo & cat instead of sed","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-05T05:39:55Z","receivedAt":"2011-05-05T05:39:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"An earlier patch from Arjen Laarhoven\n\n  From: Arjen Laarhoven <arjen@yaph.org>\n  Subject: [PATCH] annotate.sh: Fix failing test on OS X\n  Date: Wed,  4 May 2011 15:36:21 +0200\n  Message-ID: <1304516181-92364-1-git-send-email-arjen@yaph.org>\n\nseems to attempt to address the same issue but with a twist to deal with\nan incomplete line at the end of file.\n\nArjen, does Brian's patch look good to you, too?  It is much less tricky\nand should look obviously correct even to people who sees the code in\nquestion for the first time.\n\nThanks, both.\n"},{"id":"167089","messageId":"20110505074343.GA17328@regex.yaph.org","threadId":"27259","inReplyTo":"7vk4e5bt90.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] t/annotate-tests: Use echo & cat instead of sed","fromName":"Arjen Laarhoven","fromEmail":"arjen@yaph.org","sentAt":"2011-05-05T07:43:43Z","receivedAt":"2011-05-05T07:43:43Z","isPatch":true,"sender":{"key":"arjen@yaph.org","avatar":"https://gravatar.com/avatar/f776c2c0c5ea62d70827b942eb7d95ce85661a3d70bc3f03cf9773815c599c01?d=mp&s=160"},"body":"On Wed, May 04, 2011 at 10:39:55PM -0700, Junio C Hamano wrote:\n> An earlier patch from Arjen Laarhoven\n> \n>   From: Arjen Laarhoven <arjen@yaph.org>\n>   Subject: [PATCH] annotate.sh: Fix failing test on OS X\n>   Date: Wed,  4 May 2011 15:36:21 +0200\n>   Message-ID: <1304516181-92364-1-git-send-email-arjen@yaph.org>\n> \n> seems to attempt to address the same issue but with a twist to deal with\n> an incomplete line at the end of file.\n> \n> Arjen, does Brian's patch look good to you, too?  It is much less tricky\n> and should look obviously correct even to people who sees the code in\n> question for the first time.\n\nYup, this looks much better than my fix.  At least I learned something\nabout the sed incompatibilities ;-)\n\nArjen\n\n-- \nArjen Laarhoven\n\nThe presence of those seeking the truth is infinitely to be preferred to \nthose who think they've found it.\n                                -- Terry Pratchett, \"Monstrous Regiment\"\n"}]}