Re: [PATCH 1/2] t8005: avoid grep on non-ASCII data
- From
Jeff King <peff@peff.net>
- Date
- Feb 21, 2016, 23:35 UTC
- Message-ID
- <20160221233533.GD4094@sigill.intra.peff.net>
- In-Reply-To
- <CAPig+cSXsk4Pp9adi4KvYjdCwaw4R0Jrv2vwC0JTCyzomWxaww@mail.gmail.com>
On Sun, Feb 21, 2016 at 06:31:08PM -0500, Eric Sunshine wrote:
Show 12 quoted lines
> > Something like the patch below works for me. I think we could make it
> > shorter by using $PERLIO to get the raw behavior, but using binmode will
> > work even on ancient versions of perl.
> >
> > +filter_blame () {
> > + perl -e '
> > + binmode STDIN;
> > + binmode STDOUT;
>
> I was worried about binmode() due to some vague recollection from
> years and years ago of it being problematic on Windows, but I see
> these tests are all protected by !MINGW anyhow...Thanks for mentioning that. I meant to put a note on that at the end of _my_ message, but forgot. :)
It does mean we won't do CRLF processing. We could get around that with some explicit `chomp`-ing, I think. Or just leave it as-is and assume these will lose the !MINGW prereq.
I see Junio just mentioned elsewhere that we can simply avoid the extended regular expressions by using two sed commands. That would be fine with me, too.
-Peff