Skip to content

Commit 24d0063

Browse files
René Scharfegitster
authored andcommitted
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>
1 parent 3473e7d commit 24d0063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-filter-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ do
298298
# Assign the boundarie(s) in the set of rewritten commits
299299
# as the replacement commit(s).
300300
# (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/^/^/") |
302302
git rev-list $ref --boundary --stdin |
303303
sed -n "s/^-//p")
304304
do

0 commit comments

Comments
 (0)