Skip to content

Commit cb9d69a

Browse files
devzero2000gitster
authored andcommitted
contrib/examples/git-clone.sh: 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 4eaeb32 commit cb9d69a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/examples/git-clone.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ then
516516

517517
case "$no_checkout" in
518518
'')
519-
test "z$quiet" = z -a "z$no_progress" = z && v=-v || v=
519+
test "z$quiet" = z && test "z$no_progress" = z && v=-v || v=
520520
git read-tree -m -u $v HEAD HEAD
521521
esac
522522
fi

0 commit comments

Comments
 (0)