Re: [PATCH v14 5/8] bisect: introduce --no-checkout support into porcelain.
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 3, 2011, 18:57 UTC
- Message-ID
- <20110803185719.GA4275@elie.Hillsp>
- In-Reply-To
- <7voc07ct9z.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 9 quoted lines
> 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?