git-submodule.sh: separate parens by a space to avoid confusing some shells

Some shells interpret '(( ))' according to the rules for arithmetic expansion. This may not follow POSIX, but is prevalent in commonly used shells. Bash does not have a problem with this particular instance of '((', likely because it is not followed by a '))', but the public domain ksh does, and so does ksh on IRIX 6.5. So, add a space between the parenthesis to avoid confusing these shells. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed May 26, 2011 at 13:52 UTC f5799e05c0e7fbee32ca32995c7c4a627eeff469
1 file changed +1 -1
git-submodule.sh
+1 -1
@@ -491,7 +491,7 @@ cmd_update()
491 # Run fetch only if $sha1 isn't present or it
492 # is not reachable from a ref.
493 (clear_local_git_env; cd "$path" &&
494 - ((rev=$(git rev-list -n 1 $sha1 --not --all 2>/dev/null) &&
494 + ( (rev=$(git rev-list -n 1 $sha1 --not --all 2>/dev/null) &&
495 test -z "$rev") || git-fetch)) ||
496 die "Unable to fetch in submodule path '$path'"
497 fi