git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [RFC/PATCH] t0081-*.sh: Fix failure of the 'long read' tests
Date: Sat, 30 Apr 2011 18:25:13 +0100	[thread overview]
Message-ID: <4DBC45F9.7090804@ramsay1.demon.co.uk> (raw)
In-Reply-To: <20110426234850.GC32491@sigill.intra.peff.net>

Jeff King wrote:
> 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

  reply	other threads:[~2011-04-30 17:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 18:05 [RFC/PATCH] t0081-*.sh: Fix failure of the 'long read' tests Ramsay Jones
2011-04-26 19:35 ` Jonathan Nieder
2011-04-30 17:12   ` Ramsay Jones
2011-04-26 23:48 ` Jeff King
2011-04-30 17:25   ` Ramsay Jones [this message]
2011-05-26  4:33     ` [PULL svn-fe/maint] " Jonathan Nieder
2011-05-26 16:03       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DBC45F9.7090804@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).