From 25607db2c30c618a18f66350f01b1ccb05c551c6 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 17 Nov 2013 23:12:47 -0500 Subject: 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 Reviewed-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/test-hg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index ceef6b1917..5535e8c9be 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -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 -- cgit v1.2.3