{"thread":{"id":"34315","subject":"[PATCH] t4205: replace .\\+ with ..* in sed commands","startedAt":"2013-07-01T18:59:59Z","lastAt":"2013-07-01T19:26:34Z","messageCount":2,"participants":["Brian Gernhardt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"222296","messageId":"1372705199-17679-1-git-send-email-brian@gernhardtsoftware.com","threadId":"34315","inReplyTo":null,"subject":"[PATCH] t4205: replace .\\+ with ..* in sed commands","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2013-07-01T18:59:59Z","receivedAt":"2013-07-01T18:59:59Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"OS X's sed only accepts basic regular expressions, which does not\nallow the + quantifier.  However '..*' (anything, followed by zero or\nmore anything) is the same as '.\\+' (one or more anything) and valid\nin any regular expression language.\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n---\n t/t4205-log-pretty-formats.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh\nindex 719d132..3cfb744 100755\n--- a/t/t4205-log-pretty-formats.sh\n+++ b/t/t4205-log-pretty-formats.sh\n@@ -192,7 +192,7 @@ test_expect_success 'left alignment formatting with trunc' \"\n message ..\n message ..\n add bar  Z\n-$(commit_msg \"\" \"8\" \".\\+$\")\n+$(commit_msg \"\" \"8\" \"..*$\")\n EOF\n \ttest_cmp expected actual\n \"\n@@ -310,7 +310,7 @@ test_expect_success 'left/right alignment formatting with stealing' \"\n short long  long long\n message ..   A U Thor\n add bar      A U Thor\n-$(commit_msg \"\" \"8\" \".\\+$\")   A U Thor\n+$(commit_msg \"\" \"8\" \"..*$\")   A U Thor\n EOF\n \ttest_cmp expected actual\n \"\n-- \n1.8.3.1.636.g893104c\n"},{"id":"222299","messageId":"7vtxkef5ed.fsf@alter.siamese.dyndns.org","threadId":"34315","inReplyTo":"1372705199-17679-1-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH] t4205: replace .\\+ with ..* in sed commands","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-01T19:26:34Z","receivedAt":"2013-07-01T19:26:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n\n> OS X's sed only accepts basic regular expressions, which does not\n> allow the + quantifier.  However '..*' (anything, followed by zero or\n> more anything) is the same as '.\\+' (one or more anything) and valid\n> in any regular expression language.\n\nThanks for spotting this.\n\nWe shouldn't mark this as \"OS X's sed is broken\", but as \"We try to\nstick to POSIX BRE, and calling ERE elements via backslash escape,\ne.g. \\+, is a GNU extension we try to avoid\".  Obviously we are not\nalways careful and sometimes these slip through the review process.\n\n>\n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n> ---\n>  t/t4205-log-pretty-formats.sh | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh\n> index 719d132..3cfb744 100755\n> --- a/t/t4205-log-pretty-formats.sh\n> +++ b/t/t4205-log-pretty-formats.sh\n> @@ -192,7 +192,7 @@ test_expect_success 'left alignment formatting with trunc' \"\n>  message ..\n>  message ..\n>  add bar  Z\n> -$(commit_msg \"\" \"8\" \".\\+$\")\n> +$(commit_msg \"\" \"8\" \"..*$\")\n>  EOF\n>  \ttest_cmp expected actual\n>  \"\n> @@ -310,7 +310,7 @@ test_expect_success 'left/right alignment formatting with stealing' \"\n>  short long  long long\n>  message ..   A U Thor\n>  add bar      A U Thor\n> -$(commit_msg \"\" \"8\" \".\\+$\")   A U Thor\n> +$(commit_msg \"\" \"8\" \"..*$\")   A U Thor\n>  EOF\n>  \ttest_cmp expected actual\n>  \"\n"}]}