* [PATCH] filter-branch: fix dash complaining about "Missing '))'"
@ 2007-07-24 21:29 René Scharfe
2007-07-24 22:22 ` Johannes Schindelin
0 siblings, 1 reply; 2+ messages in thread
From: René Scharfe @ 2007-07-24 21:29 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Git Mailing List
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>
---
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 0ff3475..b5fa449 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-24 22:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 21:29 [PATCH] filter-branch: fix dash complaining about "Missing '))'" René Scharfe
2007-07-24 22:22 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).