From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Michael J Gruber" <git@drmicha.warpmail.net>,
"Torsten Bögershausen" <tboegi@web.de>,
"Anders Kaseorg" <andersk@mit.edu>,
git@vger.kernel.org
Subject: Re: [PATCH] rebase -p: avoid grep on potentailly non-ASCII data
Date: Tue, 8 Mar 2016 19:10:43 -0500 [thread overview]
Message-ID: <20160309001042.GA32669@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqio0wk151.fsf@gitster.mtv.corp.google.com>
On Tue, Mar 08, 2016 at 03:20:26PM -0800, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > I actually wonder if we should have a build-time knob to put "grep -a"
> > into sane_grep(). We do not ever plan to feed it binary data, so that
> > will do what, provided the system grep handles "-a". And on those that
> > do not know about "-a", one imagines that they do not suffer from this
> > problem in the first place (which is really limited to recent versions
> > of GNU grep).
>
> Something along this line, you mean? I'll leave it as a
> low-hanging-fruit to add autoconf support ;-)
Yeah, though I think I would probably squash in:
diff --git a/config.mak.uname b/config.mak.uname
index 723f632..15557c3 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -37,6 +37,7 @@ ifeq ($(uname_S),Linux)
HAVE_CLOCK_GETTIME = YesPlease
HAVE_CLOCK_MONOTONIC = YesPlease
HAVE_GETDELIM = YesPlease
+ SANE_TEXT_GREP = -a
endif
ifeq ($(uname_S),GNU/kFreeBSD)
HAVE_ALLOCA_H = YesPlease
It's not necessary on all Linux platforms yet, but it doesn't hurt, so
we can err on the side of including it (and I think we can assume all
Linux systems have GNU grep or equivalent).
-Peff
next prev parent reply other threads:[~2016-03-09 0:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 7:59 [PATCH] rebase -p: avoid grep on potentailly non-ASCII data Anders Kaseorg
2016-03-08 12:25 ` Torsten Bögershausen
2016-03-08 13:45 ` Michael J Gruber
2016-03-08 14:35 ` Jeff King
2016-03-08 23:20 ` Junio C Hamano
2016-03-08 23:36 ` Junio C Hamano
2016-03-09 0:11 ` Jeff King
2016-03-09 0:10 ` Jeff King [this message]
2016-03-09 2:31 ` Anders Kaseorg
2016-03-09 20:26 ` Junio C Hamano
2016-03-10 7:42 ` Torsten Bögershausen
2016-03-10 17:22 ` Junio C Hamano
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=20160309001042.GA32669@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=andersk@mit.edu \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tboegi@web.de \
/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).