Commit 4eaeb326 authored by Elia Pinto's avatar Elia Pinto Committed by Junio C Hamano

check_bindir: avoid "test <cond> -a/-o <cond>"

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: 's avatarElia Pinto <gitter.spiros@gmail.com>
Reviewed-by: 's avatarMatthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
parent 0953113b
......@@ -2,7 +2,7 @@
bindir="$1"
gitexecdir="$2"
gitcmd="$3"
if test "$bindir" != "$gitexecdir" -a -x "$gitcmd"
if test "$bindir" != "$gitexecdir" && test -x "$gitcmd"
then
echo
echo "!! You have installed git-* commands to new gitexecdir."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment