{"thread":{"id":"9211","subject":"[PATCH] filter-branch: fix dash complaining about \"Missing '))'\"","startedAt":"2007-07-24T21:29:29Z","lastAt":"2007-07-24T22:22:12Z","messageCount":2,"participants":["René Scharfe","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"48519","messageId":"46A66F39.20507@lsrfire.ath.cx","threadId":"9211","inReplyTo":null,"subject":"[PATCH] filter-branch: fix dash complaining about \"Missing '))'\"","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2007-07-24T21:29:29Z","receivedAt":"2007-07-24T21:29:29Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"On e.g. Ubuntu, dash is used as /bin/sh.  Unlike bash it parses\ncommands like\n\n  a=$((echo stuff) | wc)\n\nas an arithmetic expression while what we want is a subshell inside\na command substitution.  Resolve the ambiguity by placing a space\nbetween the two opening parentheses.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 0ff3475..b5fa449 100755\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -298,7 +298,7 @@ do\n \t# Assign the boundarie(s) in the set of rewritten commits\n \t# as the replacement commit(s).\n \t# (This would look a bit nicer if --not --stdin worked.)\n-\tfor p in $((cd \"$workdir\"/../map; ls | sed \"s/^/^/\") |\n+\tfor p in $( (cd \"$workdir\"/../map; ls | sed \"s/^/^/\") |\n \t\tgit rev-list $ref --boundary --stdin |\n \t\tsed -n \"s/^-//p\")\n \tdo\n"},{"id":"48526","messageId":"Pine.LNX.4.64.0707242321470.14781@racer.site","threadId":"9211","inReplyTo":"46A66F39.20507@lsrfire.ath.cx","subject":"Re: [PATCH] filter-branch: fix dash complaining about \"Missing '))'\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-24T22:22:12Z","receivedAt":"2007-07-24T22:22:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 24 Jul 2007, Ren? Scharfe wrote:\n\n> On e.g. Ubuntu, dash is used as /bin/sh.  Unlike bash it parses\n> commands like\n> \n>   a=$((echo stuff) | wc)\n> \n> as an arithmetic expression while what we want is a subshell inside\n> a command substitution.\n\nAh, well.  I think I should switch to Ubuntu, to suffer the same...\n\nCiao,\nDscho\n"}]}