Re: [PATCH] Fix use of wc in t0000-basic

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Fix use of wc in t0000-basic

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:58

quoted
quoted
quoted
quoted
"HX" == Herbert Xu [off-list ref] writes:
HX> It's also better to use -eq instead of = since you are comparing
HX> numbers, not strings.  If you do that you can keep the double
HX> quotes since the spaces will be removed automatically.

I remember being burned by busybox "test" which did not ignore
spaces.  I do not know if the latest one is fixed, though.

Re: [PATCH] Fix use of wc in t0000-basic

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2016-06-15 22:41:58

On Sat, May 21, 2005 at 03:53:30AM -0700, Junio C Hamano wrote:
quoted
quoted
quoted
quoted
quoted
"HX" == Herbert Xu [off-list ref] writes:
HX> It's also better to use -eq instead of = since you are comparing
HX> numbers, not strings.  If you do that you can keep the double
HX> quotes since the spaces will be removed automatically.

I remember being burned by busybox "test" which did not ignore
spaces.  I do not know if the latest one is fixed, though.
Are you sure that it didn't ignore the leading spaces with -eq?
The code in question just calls strtol.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help