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>
René Scharfe committed
Jul 24, 2007 at 23:29 UTC
24d00634948452d0bec1b373b6a2eb9145fc8bfc
1 file changed
+1
-1
git-filter-branch.sh
+1
-1
@@ -298,7 +298,7 @@ do
298
# Assign the boundarie(s) in the set of rewritten commits
299
# as the replacement commit(s).
300
# (This would look a bit nicer if --not --stdin worked.)
301
- for p in $((cd "$workdir"/../map; ls | sed "s/^/^/") |
301
+ for p in $( (cd "$workdir"/../map; ls | sed "s/^/^/") |
302
git rev-list $ref --boundary --stdin |
303
sed -n "s/^-//p")
304
do