git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t4213: avoid "|" in sed regexp
@ 2014-11-10  6:51 Jeff King
  0 siblings, 0 replies; only message in thread
From: Jeff King @ 2014-11-10  6:51 UTC (permalink / raw)
  To: Michael Blume; +Cc: Thomas Rast, Torsten Bögershausen, Junio C Hamano, git

On Sun, Nov 09, 2014 at 06:46:01PM -0800, Michael Blume wrote:

> Ok, with that I have a different test failure on the pu branch --
> please tell me if I'm spamming the list or if there's some other
> protocol I should be using to report issues on pu.

No, reporting problems to the list is exactly the right spot. It is nice
to start a new thread, though, if it is an unrelated problem. And
possibly cc folks you think might be responsible. E.g.:

  git shortlog -se origin/master..origin/pu t/t4213-*

points to Thomas. :)

-- >8 --
Many versions of sed (e.g., that found on OS X) do not understand
"|"-alternation, even when backslash escaped.  Some versions can turn on
extended regexps with a special option, but of course that option is not
standard, either. Let's just write out our alternates longhand.

Signed-off-by: Jeff King <peff@peff.net>
---
On top of the tr/remerge-diff topic.

For curiosity, it is "-E" on OS X and "-r" on GNU sed to turn on
extended regexps. But I hear that Solaris sed also does not handle "\|",
and I would not be surprised to find that it has no extended regexp
support at all. :)

 t/t4213-log-remerge-diff.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/t/t4213-log-remerge-diff.sh b/t/t4213-log-remerge-diff.sh
index 36ef17a..ec93b96 100755
--- a/t/t4213-log-remerge-diff.sh
+++ b/t/t4213-log-remerge-diff.sh
@@ -75,7 +75,9 @@ test_expect_success 'unrelated merge: without conflicts' '
 clean_output () {
 	git name-rev --name-only --stdin |
 	# strip away bits that aren't treated by the above
-	sed -e 's/^\(index\|Merge:\|Date:\).*/\1/'
+	sed -e 's/^\(index\).*/\1/' \
+	    -e 's/^\(Merge:\).*/\1/' \
+	    -e 's/^\(Date:\).*/\1/'
 }
 
 cat >expected <<EOF
-- 
2.1.2.596.g7379948

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-10  6:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10  6:51 [PATCH] t4213: avoid "|" in sed regexp Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).