Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2010-09-21 21:45:09 +0400
committerJunio C Hamano <gitster@pobox.com>2010-09-27 21:43:49 +0400
commit4098f6717b8137493dddfc1a28a72b25769ed7bc (patch)
tree97ab408453dac14f7f5d245dc0dff3c1252d0d85 /t/t1503-rev-parse-verify.sh
parent4af3fab06e41d031ccb2b948ddd7c73159dd9d49 (diff)
t1503: Fix arithmetic expansion syntax error when using dash
On systems which have dash as /bin/sh, such as Ubuntu, the final test (master@{n} for various n) fails with a syntax error while processing an arithmetic expansion. The syntax error is caused by using a bare name ('N') as a variable reference in the expression. In order to avoid the syntax error, we spell the variable reference as '$N' rather than simply 'N'. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1503-rev-parse-verify.sh')
-rwxr-xr-xt/t1503-rev-parse-verify.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
index 100f857b16..813cc1b3e2 100755
--- a/t/t1503-rev-parse-verify.sh
+++ b/t/t1503-rev-parse-verify.sh
@@ -106,8 +106,8 @@ test_expect_success 'use --default' '
test_expect_success 'master@{n} for various n' '
N=$(git reflog | wc -l) &&
- Nm1=$((N-1)) &&
- Np1=$((N+1)) &&
+ Nm1=$(($N-1)) &&
+ Np1=$(($N+1)) &&
git rev-parse --verify master@{0} &&
git rev-parse --verify master@{1} &&
git rev-parse --verify master@{$Nm1} &&