[PATCH 02/20] contrib/examples/git-clone.sh: avoid "test <cond> -a/-o <cond>"
- From
Elia Pinto <gitter.spiros@gmail.com>
- Date
- Jun 6, 2014, 14:55 UTC
- Message-ID
- <1402066563-28519-3-git-send-email-gitter.spiros@gmail.com>
- In-Reply-To
- <1402066563-28519-1-git-send-email-gitter.spiros@gmail.com>
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> --- contrib/examples/git-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/examples/git-clone.sh b/contrib/examples/git-clone.sh index b4c9376..08cf246 100755 --- a/contrib/examples/git-clone.sh +++ b/contrib/examples/git-clone.sh @@ -516,7 +516,7 @@ then case "$no_checkout" in '') - test "z$quiet" = z -a "z$no_progress" = z && v=-v || v= + test "z$quiet" = z && test "z$no_progress" = z && v=-v || v= git read-tree -m -u $v HEAD HEAD esac fi
-- 1.7.10.4