зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
57e4a7b633
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче