diff options
author | Elia Pinto <gitter.spiros@gmail.com> | 2014-06-06 18:55:44 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-10 01:47:06 +0400 |
commit | 4eaeb3264e1f86b99ba7732d9f69039a5805c435 (patch) | |
tree | 423b73f291199308196a3c3b943cb923240b0900 | |
parent | 0953113bb5687f42bcdfc3d20dd3a125784ad383 (diff) |
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-x | check_bindir | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/check_bindir b/check_bindir index a1c4c3e8d84..623eadcbb7d 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." |