Skip to content

Commit

Permalink
test-hg.sh: eliminate 'local' bashism
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Hansen authored and Junio C Hamano committed Nov 18, 2013
1 parent 4945725 commit 5105edd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/remote-helpers/test-hg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 5105edd

Please sign in to comment.