Skip to content

Commit 25607db

Browse files
rhansengitster
authored andcommitted
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 <[email protected]> Reviewed-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5105edd commit 25607db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/remote-helpers/test-hg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ check_push () {
8383
test $ref_ret -ne 0 && echo "match for '$branch' failed" && break
8484
done
8585

86-
if test $expected_ret -ne $ret -o $ref_ret -ne 0
86+
if test $expected_ret -ne $ret || test $ref_ret -ne 0
8787
then
8888
return 1
8989
fi

0 commit comments

Comments
 (0)