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

Re: [RFC/PATCH] t0081-*.sh: Fix failure of the 'long read' tests

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Apr 30, 2011, 17:25 UTC
Message-ID
<4DBC45F9.7090804@ramsay1.demon.co.uk>
In-Reply-To
<20110426234850.GC32491@sigill.intra.peff.net>
Jeff King wrote:
Show 15 quoted lines
> Yeah, that syntax is handled just fine by my bash and dash:
> 
>   $ cat >foo.sh <<'EOF'
>   i=1
>   : $((i = $i + 1))
>   echo $i
>   EOF
> 
>   $ bash foo.sh
>   2
>   $ bash --version | head -n 1
>   GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
> 
>   $ dash foo.sh
>   2

Er, ... yeah, it works for my bash and (up-to-date) dash too! [not the installed dash, of course, for which it is a syntax error]

Ahem ... *blush*
> But I think your i=$(($i + 1)) is the right solution.
Yes, this fixes the problem and does not introduce a regression.

So, the patch is correct, but (apart from the last sentence) the commit message is *absolute rubbish*. I won't bore you with the details of my lunacy! :-P

However, I much prefer Jonathan's patch which removes this test completely!

ATB, Ramsay Jones

Previous: Jeff KingNext: Jonathan Nieder
Message 5 of 7 in “t0081-*.sh: Fix failure of the 'long read' tests”
  1. t0081-*.sh: Fix failure of the 'long read' testsRamsay Jones, Apr 26, 2011
  2. Jonathan NiederApr 26, 2011
  3. Ramsay JonesApr 30, 2011
  4. Jeff KingApr 26, 2011
  5. Ramsay JonesApr 30, 2011
  6. [PULL svn-fe/maint] t0081-*.sh: Fix failure of the 'long read' testsJonathan Nieder, May 26, 2011
  7. Junio C HamanoMay 26, 2011

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.