mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user