Skip to content

Commit

Permalink
t3419-*.sh: Fix arithmetic expansion syntax error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ramsay Jones authored and Junio C Hamano committed Dec 21, 2010
1 parent 05bb5a2 commit 00f66f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t3419-rebase-patch-id.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

test_description='git rebase - test patch id computation'

Expand Down Expand Up @@ -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"
}
Expand Down

0 comments on commit 00f66f0

Please sign in to comment.