Skip to content

Commit 4eaeb32

Browse files
devzero2000gitster
authored andcommitted
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 <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0953113 commit 4eaeb32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

check_bindir

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
bindir="$1"
33
gitexecdir="$2"
44
gitcmd="$3"
5-
if test "$bindir" != "$gitexecdir" -a -x "$gitcmd"
5+
if test "$bindir" != "$gitexecdir" && test -x "$gitcmd"
66
then
77
echo
88
echo "!! You have installed git-* commands to new gitexecdir."

0 commit comments

Comments
 (0)