From: Richard Hansen Date: Mon, 18 Nov 2013 04:12:46 +0000 (-0500) Subject: test-hg.sh: eliminate 'local' bashism X-Git-Tag: v1.9-rc0~87^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5105edd411bc472015d63eadaf1f826bebdc92e5?hp=--cc 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 Reviewed-by: Felipe Contreras Signed-off-by: Junio C Hamano --- 5105edd411bc472015d63eadaf1f826bebdc92e5 diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index fa7d17b224..ceef6b1917 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -54,14 +54,14 @@ check_bookmark () { } check_push () { - local expected_ret=$1 ret=0 ref_ret=0 IFS=':' + expected_ret=$1 ret=0 ref_ret=0 shift git push origin "$@" 2>error ret=$? cat error - while read branch kind + while IFS=':' read branch kind do case "$kind" in 'new')