Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH v14 5/8] bisect: introduce --no-checkout support into porcelain.

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:51:44

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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help