{"thread":{"id":"37921","subject":"[PATCH] t4213: avoid \"|\" in sed regexp","startedAt":"2014-11-10T06:51:39Z","lastAt":"2014-11-10T06:51:39Z","messageCount":1,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"251654","messageId":"20141110065139.GB7677@peff.net","threadId":"37921","inReplyTo":null,"subject":"[PATCH] t4213: avoid \"|\" in sed regexp","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-11-10T06:51:39Z","receivedAt":"2014-11-10T06:51:39Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Nov 09, 2014 at 06:46:01PM -0800, Michael Blume wrote:\n\n> Ok, with that I have a different test failure on the pu branch --\n> please tell me if I'm spamming the list or if there's some other\n> protocol I should be using to report issues on pu.\n\nNo, reporting problems to the list is exactly the right spot. It is nice\nto start a new thread, though, if it is an unrelated problem. And\npossibly cc folks you think might be responsible. E.g.:\n\n  git shortlog -se origin/master..origin/pu t/t4213-*\n\npoints to Thomas. :)\n\n-- >8 --\nMany versions of sed (e.g., that found on OS X) do not understand\n\"|\"-alternation, even when backslash escaped.  Some versions can turn on\nextended regexps with a special option, but of course that option is not\nstandard, either. Let's just write out our alternates longhand.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nOn top of the tr/remerge-diff topic.\n\nFor curiosity, it is \"-E\" on OS X and \"-r\" on GNU sed to turn on\nextended regexps. But I hear that Solaris sed also does not handle \"\\|\",\nand I would not be surprised to find that it has no extended regexp\nsupport at all. :)\n\n t/t4213-log-remerge-diff.sh | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t4213-log-remerge-diff.sh b/t/t4213-log-remerge-diff.sh\nindex 36ef17a..ec93b96 100755\n--- a/t/t4213-log-remerge-diff.sh\n+++ b/t/t4213-log-remerge-diff.sh\n@@ -75,7 +75,9 @@ test_expect_success 'unrelated merge: without conflicts' '\n clean_output () {\n \tgit name-rev --name-only --stdin |\n \t# strip away bits that aren't treated by the above\n-\tsed -e 's/^\\(index\\|Merge:\\|Date:\\).*/\\1/'\n+\tsed -e 's/^\\(index\\).*/\\1/' \\\n+\t    -e 's/^\\(Merge:\\).*/\\1/' \\\n+\t    -e 's/^\\(Date:\\).*/\\1/'\n }\n \n cat >expected <<EOF\n-- \n2.1.2.596.g7379948\n"}]}