From: Jon Seymour Date: Wed, 03 Aug 2011 21:40:12 GMT Subject: Re: [PATCH v14 5/8] bisect: introduce --no-checkout support into porcelain. Message-ID: In-Reply-To: <20110803185719.GA4275@elie.Hillsp> On Thu, Aug 4, 2011 at 4:57 AM, Jonathan Nieder wrote: > Junio C Hamano wrote: > >> Just a minor worry but I would not be surprised if somebody's "test" >> implementation barfs upon: >> >>       test "--no-checkout" = "--no-checkout" >> >> mistaking the string with a dash at the beginning as an option unknown to >> it. That is why we often have "z$variable" in our comparison, like so: >> >>       if test "z$BISECT_MODE" = "z--no-checkout" > > Hmm. > >        $ git grep -e 'test "\$' | wc -l >        712 >        $ git grep -e 'test ".\$' | wc -l >        183 > > We are very inconsistent about such usage, generally, and of course > POSIX is very clear about the 'z' not being needed in a three-argument > "test" used for string comparison.  Is there any platform that is > usable for git (e.g., that implements "$( ... )") and has that > problem? > Thanks. Applied.