summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Elia Pinto <gitter.spiros@gmail.com>2014-06-06 07:55:44 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-06-09 14:47:06 -0700
commit4eaeb3264e1f86b99ba7732d9f69039a5805c435 (patch)
tree423b73f291199308196a3c3b943cb923240b0900
parentSecond batch for 2.1 (diff)
downloadtgif-4eaeb3264e1f86b99ba7732d9f69039a5805c435.tar.xz
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>
-rwxr-xr-xcheck_bindir2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_bindir b/check_bindir
index a1c4c3e8d8..623eadcbb7 100755
--- a/check_bindir
+++ b/check_bindir
@@ -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."