summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-08 23:47:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-10 23:35:43 (GMT)
commit71b401032b9e5b0a71e41d95ae0998858787700c (patch)
treef69cf92990eb06865b3bac4d9690a4d80c1e16f0 /Makefile
parent833e48259e23aea76f3765d28d1b2200332301f7 (diff)
downloadgit-71b401032b9e5b0a71e41d95ae0998858787700c.zip
git-71b401032b9e5b0a71e41d95ae0998858787700c.tar.gz
git-71b401032b9e5b0a71e41d95ae0998858787700c.tar.bz2
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 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 37e2d9e..59bbb1e 100644
--- a/Makefile
+++ b/Makefile
@@ -266,6 +266,9 @@ all::
#
# Define NO_TCLTK if you do not want Tcl/Tk GUI.
#
+# Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep
+# and egrep that are pickier when their input contains non-ASCII data.
+#
# The TCL_PATH variable governs the location of the Tcl interpreter
# used to optimize git-gui for your system. Only used if NO_TCLTK
# is not set. Defaults to the bare 'tclsh'.
@@ -1728,7 +1731,7 @@ common-cmds.h: $(wildcard Documentation/git-*.txt)
SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
- $(gitwebdir_SQ):$(PERL_PATH_SQ)
+ $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP)
define cmd_munge_script
$(RM) $@ $@+ && \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
@@ -1740,6 +1743,7 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-e $(BROKEN_PATH_FIX) \
-e 's|@@GITWEBDIR@@|$(gitwebdir_SQ)|g' \
-e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
+ -e 's|@@SANE_TEXT_GREP@@|$(SANE_TEXT_GREP)|g' \
$@.sh >$@+
endef