Skip to content

Commit 57e4a7b

Browse files
committed
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
2 parents 8f79fb6 + 7050791 commit 57e4a7b

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

git-bisect.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ Please use "git help bisect" to get the full man page.'
3434
OPTIONS_SPEC=
3535
. git-sh-setup
3636

37-
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
38-
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
3937
TERM_BAD=bad
4038
TERM_GOOD=good
4139

git-sh-setup.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ require_clean_work_tree () {
223223
"rewrite branches")
224224
gettextln "Cannot rewrite branches: You have unstaged changes." >&2
225225
;;
226-
"pull with rebase")
227-
gettextln "Cannot pull with rebase: You have unstaged changes." >&2
228-
;;
229226
*)
230227
eval_gettextln "Cannot \$action: You have unstaged changes." >&2
231228
;;
@@ -242,9 +239,6 @@ require_clean_work_tree () {
242239
rebase)
243240
gettextln "Cannot rebase: Your index contains uncommitted changes." >&2
244241
;;
245-
"pull with rebase")
246-
gettextln "Cannot pull with rebase: Your index contains uncommitted changes." >&2
247-
;;
248242
*)
249243
eval_gettextln "Cannot \$action: Your index contains uncommitted changes." >&2
250244
;;

git-submodule.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ isnumber()
6363
n=$(($1 + 0)) 2>/dev/null && test "$n" = "$1"
6464
}
6565

66-
# Given a full hex object ID, is this the zero OID?
67-
is_zero_oid () {
68-
echo "$1" | sane_egrep '^0+$' >/dev/null 2>&1
69-
}
70-
7166
# Sanitize the local git environment for use within a submodule. We
7267
# can't simply use clear_local_git_env since we want to preserve some
7368
# of the settings from GIT_CONFIG_PARAMETERS.

t/test-lib.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ SQ=\'
534534
# when case-folding filenames
535535
u200c=$(printf '\342\200\214')
536536

537-
export _x05 _x35 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
537+
export _x05 _x35 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
538538

539539
# Each test should start with something like this, after copyright notices:
540540
#
@@ -1425,10 +1425,9 @@ then
14251425
fi
14261426

14271427
# Convenience
1428-
# A regexp to match 5, 35 and 40 hexdigits
1428+
# A regexp to match 5 and 35 hexdigits
14291429
_x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
14301430
_x35="$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
1431-
_x40="$_x35$_x05"
14321431

14331432
test_oid_init
14341433

@@ -1437,7 +1436,6 @@ OID_REGEX=$(echo $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
14371436
OIDPATH_REGEX=$(test_oid_to_path $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
14381437
EMPTY_TREE=$(test_oid empty_tree)
14391438
EMPTY_BLOB=$(test_oid empty_blob)
1440-
_z40=$ZERO_OID
14411439

14421440
# Provide an implementation of the 'yes' utility; the upper bound
14431441
# limit is there to help Windows that cannot stop this loop from

0 commit comments

Comments
 (0)