Skip to content

Commit 00f66f0

Browse files
Ramsay Jonesgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 05bb5a2 commit 00f66f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t3419-rebase-patch-id.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
test_description='git rebase - test patch id computation'
44

@@ -27,7 +27,7 @@ scramble()
2727
then
2828
echo "$x"
2929
fi
30-
i=$(((i+1) % 10))
30+
i=$((($i+1) % 10))
3131
done < "$1" > "$1.new"
3232
mv -f "$1.new" "$1"
3333
}

0 commit comments

Comments
 (0)