@matheusbsbs / matheus-bagliano / commits / 00f66f0e49
Fork 0

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>

Ramsay Jones committed Dec 21, 2010 at 18:50 UTC 00f66f0e4913110e19972a71a150a7b9d1bfd02f
1 file changed +2 -2
t/t3419-rebase-patch-id.sh
+2 -2
@@ -1,4 +1,4 @@
1 -#!/bin/bash
1 +#!/bin/sh
2
3 test_description='git rebase - test patch id computation'
4
@@ -27,7 +27,7 @@ scramble()
27 then
28 echo "$x"
29 fi
30 - i=$(((i+1) % 10))
30 + i=$((($i+1) % 10))
31 done < "$1" > "$1.new"
32 mv -f "$1.new" "$1"
33 }