git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
May 21, 2005, 17:24 UTC
Message-ID
<7vd5rkij9y.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050521110129.GA7924@gondor.apana.org.au>
>>>>> "HX" == Herbert Xu <herbert@gondor.apana.org.au> writes:

HX> Are you sure that it didn't ignore the leading spaces with -eq? HX> The code in question just calls strtol.

Sorry, I am not sure whose fault it was, and the recollection comes from my distant past. It could have been that the smallish shell in that semi-embedded environment had an incompatible built-in "test" command which was burning me, but I distinctively remember changing many of the vendor supplied shell script that had:

    if test " $number" -eq 3
    then
        ...

either stripping dq around it or simply removing the space from there, depending on how that $number was generated.

Since I assume we are only talking about portability across POSIXy world I do not think this is a big issue.

Previous: Herbert Xu
Message 10 of 10 in “Fix use of wc in t0000-basic”
  1. Fix use of wc in t0000-basicDaniel Barkalow, May 21, 2005
  2. SeanMay 21, 2005
  3. Daniel BarkalowMay 21, 2005
  4. SeanMay 21, 2005
  5. Daniel BarkalowMay 21, 2005
  6. Junio C HamanoMay 21, 2005
  7. Herbert XuMay 21, 2005
  8. Junio C HamanoMay 21, 2005
  9. Herbert XuMay 21, 2005
  10. Junio C HamanoMay 21, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.