From: Junio C Hamano Date: Mon, 09 Jun 2014 23:23:58 GMT Subject: Re: [PATCH 02/20] contrib/examples/git-clone.sh: avoid "test -a/-o " Message-ID: In-Reply-To: <1402066563-28519-3-git-send-email-gitter.spiros@gmail.com> Elia Pinto writes: > 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 > --- > 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 Hmph. If we want to see them both empty, test "$quiet,$no_progress" = , would have been a better way to spell this, but that is outside the scope of this series. But I wonder if we really want to update the contrib/examples/, which is a record of how historically we have implemented various scripted Porcelains using lower level plumbing commands.