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>
Richard Hansen committed
Nov 17, 2013 at 23:12 UTC
25607db2c30c618a18f66350f01b1ccb05c551c6
1 file changed
+1
-1
contrib/remote-helpers/test-hg.sh
+1
-1
@@ -83,7 +83,7 @@ check_push () {
83
test $ref_ret -ne 0 && echo "match for '$branch' failed" && break
84
done
85
86
- if test $expected_ret -ne $ret -o $ref_ret -ne 0
86
+ if test $expected_ret -ne $ret || test $ref_ret -ne 0
87
then
88
return 1
89
fi