From: Jeff King <peff@peff.net>
To: Michael Blume <blume.mike@gmail.com>
Cc: "Thomas Rast" <tr@thomasrast.ch>,
"Torsten Bögershausen" <tboegi@web.de>,
"Junio C Hamano" <gitster@pobox.com>,
git@vger.kernel.org
Subject: [PATCH] t4213: avoid "|" in sed regexp
Date: Mon, 10 Nov 2014 01:51:39 -0500 [thread overview]
Message-ID: <20141110065139.GB7677@peff.net> (raw)
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
reply other threads:[~2014-11-10 6:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141110065139.GB7677@peff.net \
--to=peff@peff.net \
--cc=blume.mike@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tboegi@web.de \
--cc=tr@thomasrast.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).