Skip to content

Commit

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

0 comments on commit 25607db

Please sign in to comment.