зеркало из https://github.com/microsoft/git.git
test-hg.sh: eliminate 'local' bashism
Unlike bash, POSIX shell does not specify a 'local' command for declaring function-local variable scope. Except for IFS, the variable names are not used anywhere else in the script so simply remove the 'local'. For IFS, move the assignment to the 'read' command to prevent it from affecting code outside the function. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
4945725c64
Коммит
5105edd411
|
@ -54,14 +54,14 @@ check_bookmark () {
|
||||||
}
|
}
|
||||||
|
|
||||||
check_push () {
|
check_push () {
|
||||||
local expected_ret=$1 ret=0 ref_ret=0 IFS=':'
|
expected_ret=$1 ret=0 ref_ret=0
|
||||||
|
|
||||||
shift
|
shift
|
||||||
git push origin "$@" 2>error
|
git push origin "$@" 2>error
|
||||||
ret=$?
|
ret=$?
|
||||||
cat error
|
cat error
|
||||||
|
|
||||||
while read branch kind
|
while IFS=':' read branch kind
|
||||||
do
|
do
|
||||||
case "$kind" in
|
case "$kind" in
|
||||||
'new')
|
'new')
|
||||||
|
|
Загрузка…
Ссылка в новой задаче