Browse Source

test-hg.sh: avoid obsolete 'test' syntax

The POSIX spec says that the '-a', '-o', and parentheses operands to
the 'test' utility are obsolete extensions due to the potential for
ambiguity.  Replace '-o' with '|| test' to avoid unspecified behavior.

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>
maint
Richard Hansen 11 years ago committed by Junio C Hamano
parent
commit
25607db2c3
  1. 2
      contrib/remote-helpers/test-hg.sh

2
contrib/remote-helpers/test-hg.sh

@ -83,7 +83,7 @@ check_push () { @@ -83,7 +83,7 @@ check_push () {
test $ref_ret -ne 0 && echo "match for '$branch' failed" && break
done

if test $expected_ret -ne $ret -o $ref_ret -ne 0
if test $expected_ret -ne $ret || test $ref_ret -ne 0
then
return 1
fi

Loading…
Cancel
Save