summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-16 13:16:54 -0700
committerJunio C Hamano <gitster@pobox.com>2016-03-16 13:16:54 -0700
commit2df13639e77999efecbe682ae5e72cbfb14b3dcc (patch)
tree6c1066b80be0275c226525e1aed75cbd7804417a /configure.ac
parent9e689802e393b614ab9343dba2cee3828950f3ec (diff)
parent214123c6457d9706716dbdd608d03262e348a121 (diff)
downloadgit-2df13639e77999efecbe682ae5e72cbfb14b3dcc.tar.gz
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 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 89e2590bd6..0cd9f4680b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -471,6 +471,13 @@ if test -n "$ASCIIDOC"; then
esac
fi
+if grep -a ascii configure.ac >/dev/null; then
+ AC_MSG_RESULT([Using 'grep -a' for sane_grep])
+ SANE_TEXT_GREP=-a
+else
+ SANE_TEXT_GREP=
+fi
+GIT_CONF_SUBST([SANE_TEXT_GREP])
## Checks for libraries.
AC_MSG_NOTICE([CHECKS for libraries])