From 24d00634948452d0bec1b373b6a2eb9145fc8bfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Scharfe?= Date: Tue, 24 Jul 2007 23:29:29 +0200 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 0ff3475525..b5fa44920d 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -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 -- 2.11.4.GIT