{"thread":{"id":"29862","subject":"t5704: problem with OS X sed","startedAt":"2012-03-06T18:10:24Z","lastAt":"2012-03-06T21:18:07Z","messageCount":3,"participants":["Brian Gernhardt","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"186230","messageId":"E40E6E02-8960-4A10-9E71-28F9CDB120F8@silverinsanity.com","threadId":"29862","inReplyTo":null,"subject":"t5704: problem with OS X sed","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2012-03-06T18:10:24Z","receivedAt":"2012-03-06T18:10:24Z","isPatch":false,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"t5704's newest test has always failed for my on OS X.  It's taken a little while for me to find the time to try to fix it.  Unfortunately, my sed-fu has proven not up to the task:\n\nsed: 1: \"/^-/{p;q}\": extra characters at the end of q command\nnot ok - 7 ridiculously long subject in boundary\n#\t\n#\t\t: >file4 &&\n#\t\ttest_tick &&\n#\t\tgit add file4 &&\n#\t\tprintf \"%01200d\n#\t\" 0 | git commit -F - &&\n#\t\ttest_commit fifth &&\n#\t\tgit bundle create long-subject-bundle.bdl HEAD^..HEAD &&\n#\t\tgit bundle list-heads long-subject-bundle.bdl >heads &&\n#\t\ttest -s heads &&\n#\t\tgit fetch long-subject-bundle.bdl &&\n#\t\tsed -n \"/^-/{p;q}\" long-subject-bundle.bdl >boundary &&\n#\t\tgrep \"^-$_x40 \" boundary\n#\t\n\nI've tried various bits of whitespace or splitting the commands in two, but haven't hit on the proper combination of commands.\n\nOf course, if I remove the sed invocation, I get the following error from grep: \"Regular expression too big\"\n\nIt seems to me that using sed to find a single line and then grepping for it is somewhat redundant.\n\nIf someone else has suggestions on how to make this test work on OS X, I'm happy to help test them.\n\n~~ Brian Gernhardt\n"},{"id":"186255","messageId":"m362ehtpgp.fsf@localhost.localdomain","threadId":"29862","inReplyTo":"E40E6E02-8960-4A10-9E71-28F9CDB120F8@silverinsanity.com","subject":"Re: t5704: problem with OS X sed","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2012-03-06T21:01:17Z","receivedAt":"2012-03-06T21:01:17Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Brian Gernhardt <benji@silverinsanity.com> writes:\n\n> t5704's newest test has always failed for my on OS X.  It's taken a little while for me to find the time to try to fix it.  Unfortunately, my sed-fu has proven not up to the task:\n> \n> sed: 1: \"/^-/{p;q}\": extra characters at the end of q command\n> not ok - 7 ridiculously long subject in boundary\n> #\t\n> #\t\t: >file4 &&\n> #\t\ttest_tick &&\n> #\t\tgit add file4 &&\n> #\t\tprintf \"%01200d\n> #\t\" 0 | git commit -F - &&\n> #\t\ttest_commit fifth &&\n> #\t\tgit bundle create long-subject-bundle.bdl HEAD^..HEAD &&\n> #\t\tgit bundle list-heads long-subject-bundle.bdl >heads &&\n> #\t\ttest -s heads &&\n> #\t\tgit fetch long-subject-bundle.bdl &&\n> #\t\tsed -n \"/^-/{p;q}\" long-subject-bundle.bdl >boundary &&\n> #\t\tgrep \"^-$_x40 \" boundary\n> #\t\n> \n> I've tried various bits of whitespace or splitting the commands in\n> two, but haven't hit on the proper combination of commands.\n> \n> Of course, if I remove the sed invocation, I get the following error\n> from grep: \"Regular expression too big\"\n> \n> It seems to me that using sed to find a single line and then\n> grepping for it is somewhat redundant.\n> \n> If someone else has suggestions on how to make this test work on OS\n> X, I'm happy to help test them.\n\nThomas Rast proposed a patch to fix this issue, as reported by\nBJ Hargrave, in\n\n  Re: [ANNOUNCE] Git 1.7.9.3\n  Message-ID: <87y5rd4wci.fsf@thomas.inf.ethz.ch>\n  http://thread.gmane.org/gmane.linux.kernel/1262318/focus=192355\n\nas\n\n  [PATCH] t5704: fix nonportable sed/grep usages\n\nHTH\n-- \nJakub Narebski\n"},{"id":"186257","messageId":"9980BCE6-7933-40A5-BA96-5B93B553E666@silverinsanity.com","threadId":"29862","inReplyTo":"m362ehtpgp.fsf@localhost.localdomain","subject":"Re: t5704: problem with OS X sed","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2012-03-06T21:18:07Z","receivedAt":"2012-03-06T21:18:07Z","isPatch":false,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Mar 6, 2012, at 4:01 PM, Jakub Narebski wrote:\n\n> Thomas Rast proposed a patch to fix this issue, as reported by\n> BJ Hargrave, in\n> \n>  Re: [ANNOUNCE] Git 1.7.9.3\n>  Message-ID: <87y5rd4wci.fsf@thomas.inf.ethz.ch>\n>  http://thread.gmane.org/gmane.linux.kernel/1262318/focus=192355\n> \n> as\n> \n>  [PATCH] t5704: fix nonportable sed/grep usages\n\nAh, reported and fixed in an announce e-mail while I was working on it myself.\n\nUnsurprisingly, the patch also works for me.\n\nThanks Thomas and Jakub,\n~~ Brian G\n"}]}