Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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: Elia Pinto <gitter.spiros@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Elia Pinto authored and Junio C Hamano committed Jun 9, 2014
1 parent 0953113 commit 4eaeb32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_bindir
Expand Up @@ -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."
Expand Down

0 comments on commit 4eaeb32

Please sign in to comment.