Skip to content

Commit 5105edd

Browse files
rhansengitster
authored andcommitted
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 <[email protected]> Reviewed-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4945725 commit 5105edd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/remote-helpers/test-hg.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ check_bookmark () {
5454
}
5555

5656
check_push () {
57-
local expected_ret=$1 ret=0 ref_ret=0 IFS=':'
57+
expected_ret=$1 ret=0 ref_ret=0
5858

5959
shift
6060
git push origin "$@" 2>error
6161
ret=$?
6262
cat error
6363

64-
while read branch kind
64+
while IFS=':' read branch kind
6565
do
6666
case "$kind" in
6767
'new')

0 commit comments

Comments
 (0)