diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-08 15:47:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-10 15:35:43 -0800 |
commit | 71b401032b9e5b0a71e41d95ae0998858787700c (patch) | |
tree | f69cf92990eb06865b3bac4d9690a4d80c1e16f0 /git-sh-setup.sh | |
parent | 833e48259e23aea76f3765d28d1b2200332301f7 (diff) | |
download | git-71b401032b9e5b0a71e41d95ae0998858787700c.tar.gz |
sane_grep: pass "-a" if grep accepts it
Newer versions of GNU grep is reported to be pickier when we feed a
non-ASCII input and break some Porcelain scripts. As we know we do
not feed random binary file to our own sane_grep wrapper, allow us
to always pass "-a" by setting SANE_TEXT_GREP=-a Makefile variable
to work it around.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-sh-setup.sh')
-rw-r--r-- | git-sh-setup.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 4691fbcb64..c48139a494 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -168,11 +168,11 @@ git_pager() { } sane_grep () { - GREP_OPTIONS= LC_ALL=C grep "$@" + GREP_OPTIONS= LC_ALL=C grep @@SANE_TEXT_GREP@@ "$@" } sane_egrep () { - GREP_OPTIONS= LC_ALL=C egrep "$@" + GREP_OPTIONS= LC_ALL=C egrep @@SANE_TEXT_GREP@@ "$@" } is_bare_repository () { |