summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-23 20:44:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-23 20:44:47 (GMT)
commit57e4a7b633d00f274051d436edcec14ad98969c3 (patch)
tree1773a65b46fb416f3c93f2acb232d36fba2b05cf
parent8f79fb6445cb1d17c5527ba958e460725e7b111e (diff)
parent705079112669c05c7ce5dee38ee8d7f075b8b3cf (diff)
downloadgit-57e4a7b633d00f274051d436edcec14ad98969c3.zip
git-57e4a7b633d00f274051d436edcec14ad98969c3.tar.gz
git-57e4a7b633d00f274051d436edcec14ad98969c3.tar.bz2
Merge branch 'ab/unused-script-helpers'
Code clean-up. * ab/unused-script-helpers: test-lib: remove unused $_x40 and $_z40 variables git-bisect: remove unused SHA-1 $x40 shell variable git-sh-setup: remove unused "pull with rebase" message git-submodule: remove unused is_zero_oid() function
-rwxr-xr-xgit-bisect.sh2
-rw-r--r--git-sh-setup.sh6
-rwxr-xr-xgit-submodule.sh5
-rw-r--r--t/test-lib.sh6
4 files changed, 2 insertions, 17 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 6a7afae..b59f3aa 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -34,8 +34,6 @@ Please use "git help bisect" to get the full man page.'
OPTIONS_SPEC=
. git-sh-setup
-_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
TERM_BAD=bad
TERM_GOOD=good
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 10d9764..cee053c 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -223,9 +223,6 @@ require_clean_work_tree () {
"rewrite branches")
gettextln "Cannot rewrite branches: You have unstaged changes." >&2
;;
- "pull with rebase")
- gettextln "Cannot pull with rebase: You have unstaged changes." >&2
- ;;
*)
eval_gettextln "Cannot \$action: You have unstaged changes." >&2
;;
@@ -242,9 +239,6 @@ require_clean_work_tree () {
rebase)
gettextln "Cannot rebase: Your index contains uncommitted changes." >&2
;;
- "pull with rebase")
- gettextln "Cannot pull with rebase: Your index contains uncommitted changes." >&2
- ;;
*)
eval_gettextln "Cannot \$action: Your index contains uncommitted changes." >&2
;;
diff --git a/git-submodule.sh b/git-submodule.sh
index 27efdc5..652861a 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.
diff --git a/t/test-lib.sh b/t/test-lib.sh
index d5ee964..aa1ad81 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -534,7 +534,7 @@ SQ=\'
# when case-folding filenames
u200c=$(printf '\342\200\214')
-export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
+export _x05 _x35 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
# Each test should start with something like this, after copyright notices:
#
@@ -1425,10 +1425,9 @@ then
fi
# Convenience
-# A regexp to match 5, 35 and 40 hexdigits
+# A regexp to match 5 and 35 hexdigits
_x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
_x35="$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
-_x40="$_x35$_x05"
test_oid_init
@@ -1437,7 +1436,6 @@ OID_REGEX=$(echo $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
OIDPATH_REGEX=$(test_oid_to_path $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
EMPTY_TREE=$(test_oid empty_tree)
EMPTY_BLOB=$(test_oid empty_blob)
-_z40=$ZERO_OID
# Provide an implementation of the 'yes' utility; the upper bound
# limit is there to help Windows that cannot stop this loop from