diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-16 13:16:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-16 13:16:54 -0700 |
commit | 2df13639e77999efecbe682ae5e72cbfb14b3dcc (patch) | |
tree | 6c1066b80be0275c226525e1aed75cbd7804417a /git-sh-setup.sh | |
parent | Merge branch 'cn/deprecate-ssh-git-url' (diff) | |
parent | rebase-i: clarify "is this commit relevant?" test (diff) | |
download | tgif-2df13639e77999efecbe682ae5e72cbfb14b3dcc.tar.xz |
Merge branch 'jc/sane-grep'
Recent versions of GNU grep is pickier than before to decide if a
file is "binary" and refuse to give line-oriented hits when we
expect it to, unless explicitly told with "-a" option. As our
scripted Porcelains use sane_grep wrapper for line-oriented data,
even when the line may contain non-ASCII payload we took from
end-user data, use "grep -a" to implement sane_grep wrapper when
using an implementation of "grep" that takes the "-a" option.
* jc/sane-grep:
rebase-i: clarify "is this commit relevant?" test
sane_grep: pass "-a" if grep accepts it
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 () { |