diff mbox series

[v2,2/7] git-sh-setup: remove unused sane_egrep() function

Message ID patch-v2-2.7-e7f3115797c-20210906T070201Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series remove dead & undocumented shell code | expand

Commit Message

Ævar Arnfjörð Bjarmason Sept. 6, 2021, 7:05 a.m. UTC
The is_zero_oid() function in git-submodule.sh has not been used since
e83e3333b57 (submodule: port submodule subcommand 'summary' from shell
to C, 2020-08-13), so we can remove it, and the sane_egrep() function,
dead is_zero_oid() was the only function which still referenced it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-sh-setup.sh  | 4 ----
 git-submodule.sh | 5 -----
 2 files changed, 9 deletions(-)
diff mbox series

Patch

diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 7ee4b0edff5..c170be07c7d 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -161,10 +161,6 @@  sane_grep () {
 	GREP_OPTIONS= LC_ALL=C grep @@SANE_TEXT_GREP@@ "$@"
 }
 
-sane_egrep () {
-	GREP_OPTIONS= LC_ALL=C egrep @@SANE_TEXT_GREP@@ "$@"
-}
-
 is_bare_repository () {
 	git rev-parse --is-bare-repository
 }
diff --git a/git-submodule.sh b/git-submodule.sh
index dbd2ec20503..aeb96c58243 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -63,11 +63,6 @@  isnumber()
 	n=$(($1 + 0)) 2>/dev/null && test "$n" = "$1"
 }
 
-# Given a full hex object ID, is this the zero OID?
-is_zero_oid () {
-	echo "$1" | sane_egrep '^0+$' >/dev/null 2>&1
-}
-
 # Sanitize the local git environment for use within a submodule. We
 # can't simply use clear_local_git_env since we want to preserve some
 # of the settings from GIT_CONFIG_PARAMETERS.