t/lib-httpd.sh: avoid "test <cond> -a/-o <cond>"
authorElia Pinto <gitter.spiros@gmail.com>
Fri, 6 Jun 2014 14:55:54 +0000 (07:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jun 2014 22:53:41 +0000 (15:53 -0700)
The construct is error-prone; "test" being built-in in most modern
shells, the reason to avoid "test <cond> && test <cond>" spawning
one extra process by using a single "test <cond> -a <cond>" no
longer exists.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-httpd.sh
index 252cbf163bcff90aabe39a48219e00565f577ffe..38a47fe20ed510a82e5908e29ccc649f507b7b5c 100644 (file)
@@ -132,7 +132,7 @@ prepare_httpd() {
        HTTPD_URL_USER=$HTTPD_PROTO://user%40host@$HTTPD_DEST
        HTTPD_URL_USER_PASS=$HTTPD_PROTO://user%40host:pass%40host@$HTTPD_DEST
 
-       if test -n "$LIB_HTTPD_DAV" -o -n "$LIB_HTTPD_SVN"
+       if test -n "$LIB_HTTPD_DAV" || test -n "$LIB_HTTPD_SVN"
        then
                HTTPD_PARA="$HTTPD_PARA -DDAV"