summaryrefslogtreecommitdiff
path: root/t/t3419-rebase-patch-id.sh
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2010-12-21 18:50:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-12-21 20:26:21 (GMT)
commit00f66f0e4913110e19972a71a150a7b9d1bfd02f (patch)
tree3ce5e259e7c1d2cbe17d496041db9a629e10ee77 /t/t3419-rebase-patch-id.sh
parent05bb5a2584ca0e1c87a2135a83c5573b9337d06f (diff)
downloadgit-00f66f0e4913110e19972a71a150a7b9d1bfd02f.zip
git-00f66f0e4913110e19972a71a150a7b9d1bfd02f.tar.gz
git-00f66f0e4913110e19972a71a150a7b9d1bfd02f.tar.bz2
t3419-*.sh: Fix arithmetic expansion syntax error
Some shells, for example dash versions older than 0.5.4, need to spell a variable reference as '$N' rather than 'N' in an arithmetic expansion. In order to avoid the syntax error, we change the offending variable reference from 'i' to '$i' in function scramble. There is nothing bash specific to this test script (and we shouldn't have any bash dependent test). Fix its shebang line. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3419-rebase-patch-id.sh')
-rwxr-xr-xt/t3419-rebase-patch-id.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh
index 1aee483..bd8efaf 100755
--- a/t/t3419-rebase-patch-id.sh
+++ b/t/t3419-rebase-patch-id.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
test_description='git rebase - test patch id computation'
@@ -27,7 +27,7 @@ scramble()
then
echo "$x"
fi
- i=$(((i+1) % 10))
+ i=$((($i+1) % 10))
done < "$1" > "$1.new"
mv -f "$1.new" "$1"
}