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>
Richard Hansen committed
Nov 17, 2013 at 23:12 UTC
5105edd411bc472015d63eadaf1f826bebdc92e5
1 file changed
+2
-2
contrib/remote-helpers/test-hg.sh
+2
-2
@@ -54,14 +54,14 @@ check_bookmark () {
54
}
55
56
check_push () {
57
- local expected_ret=$1 ret=0 ref_ret=0 IFS=':'
57
+ expected_ret=$1 ret=0 ref_ret=0
58
59
shift
60
git push origin "$@" 2>error
61
ret=$?
62
cat error
63
64
- while read branch kind
64
+ while IFS=':' read branch kind
65
do
66
case "$kind" in
67
'new')