filter-branch: fix dash complaining about "Missing '))'"

On e.g. Ubuntu, dash is used as /bin/sh.  Unlike bash it parses
commands like

  a=$((echo stuff) | wc)

as an arithmetic expression while what we want is a subshell inside
a command substitution.  Resolve the ambiguity by placing a space
between the two opening parentheses.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2007-07-24 23:29:29 +02:00 committed by Junio C Hamano
parent 3473e7df5f
commit 24d0063494

View file

@ -298,7 +298,7 @@ do
# Assign the boundarie(s) in the set of rewritten commits
# as the replacement commit(s).
# (This would look a bit nicer if --not --stdin worked.)
for p in $((cd "$workdir"/../map; ls | sed "s/^/^/") |
for p in $( (cd "$workdir"/../map; ls | sed "s/^/^/") |
git rev-list $ref --boundary --stdin |
sed -n "s/^-//p")
do