summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-16 20:16:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-16 20:16:54 (GMT)
commit2df13639e77999efecbe682ae5e72cbfb14b3dcc (patch)
tree6c1066b80be0275c226525e1aed75cbd7804417a /Makefile
parent9e689802e393b614ab9343dba2cee3828950f3ec (diff)
parent214123c6457d9706716dbdd608d03262e348a121 (diff)
downloadgit-2df13639e77999efecbe682ae5e72cbfb14b3dcc.zip
git-2df13639e77999efecbe682ae5e72cbfb14b3dcc.tar.gz
git-2df13639e77999efecbe682ae5e72cbfb14b3dcc.tar.bz2
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 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 24bef8d..2742a69 100644
--- a/Makefile
+++ b/Makefile
@@ -264,6 +264,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'.
@@ -1740,7 +1743,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)|' \
@@ -1752,6 +1755,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