From: Elia Pinto Date: Fri, 6 Jun 2014 14:55:48 +0000 (-0700) Subject: contrib/examples/git-repack.sh: avoid "test -a/-o " X-Git-Tag: v2.1.0-rc0~79^2~15 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cd4de93f2e34ded30bd6b7a7352b45650ad81a83;p=git-core%2Fgit.git contrib/examples/git-repack.sh: avoid "test -a/-o " The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto Reviewed-by: Matthieu Moy Signed-off-by: Junio C Hamano --- diff --git a/contrib/examples/git-repack.sh b/contrib/examples/git-repack.sh index f312405a2..96e3fed32 100755 --- a/contrib/examples/git-repack.sh +++ b/contrib/examples/git-repack.sh @@ -76,8 +76,8 @@ case ",$all_into_one," in existing="$existing $e" fi done - if test -n "$existing" -a -n "$unpack_unreachable" -a \ - -n "$remove_redundant" + if test -n "$existing" && test -n "$unpack_unreachable" && \ + test -n "$remove_redundant" then # This may have arbitrary user arguments, so we # have to protect it against whitespace splitting