From ebeb39faad6e3a67c31884c3dc6b76ce58b3f15b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 21 Oct 2021 21:58:00 +0200 Subject: git-sh-setup: remove "sane_grep", it's not needed anymore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the sane_grep() shell function in git-sh-setup. The two reasons for why it existed don't apply anymore: 1. It was added due to GNU grep supporting GREP_OPTIONS. See e1622bfcbad (Protect scripted Porcelains from GREP_OPTIONS insanity, 2009-11-23). Newer versions of GNU grep ignore that, but even on older versions its existence won't matter, none of these sane_grep() uses care about grep's output, they're merely using it to check if a string exists in a file or stream. We also don't care about the "LC_ALL=C" that "sane_grep" was using, these greps for fixed or ASCII strings will behave the same under any locale. 2. The SANE_TEXT_GREP added in 71b401032b9 (sane_grep: pass "-a" if grep accepts it, 2016-03-08) isn't needed either, none of these grep uses deal with binary data. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 50eba522f4..01585bfebd 100644 --- a/Makefile +++ b/Makefile @@ -305,9 +305,6 @@ 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'. @@ -2254,7 +2251,7 @@ hook-list.h: generate-hooklist.sh Documentation/githooks.txt SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):\ $(localedir_SQ):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\ - $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV):\ + $(gitwebdir_SQ):$(PERL_PATH_SQ):$(PAGER_ENV):\ $(perllibdir_SQ) GIT-SCRIPT-DEFINES: FORCE @FLAGS='$(SCRIPT_DEFINES)'; \ @@ -2272,7 +2269,6 @@ 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' \ -e 's|@@PAGER_ENV@@|$(PAGER_ENV_SQ)|g' \ $@.sh >$@+ endef -- cgit v1.2.3