{"thread":{"id":"7478","subject":"[PATCH] git-quiltimport /bin/sh-ism fix","startedAt":"2007-03-29T21:38:20Z","lastAt":"2007-03-30T02:05:04Z","messageCount":3,"participants":["Francis Daly","Junio C Hamano","Wu, Bryan"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"38362","messageId":"20070329213820.GY24561@craic.sysops.org","threadId":"7478","inReplyTo":null,"subject":"[PATCH] git-quiltimport /bin/sh-ism fix","fromName":"Francis Daly","fromEmail":"francis@daoine.org","sentAt":"2007-03-29T21:38:20Z","receivedAt":"2007-03-29T21:38:20Z","isPatch":true,"sender":{"key":"francis@daoine.org","avatar":null},"body":"\nBryan Wu reported\n/usr/local/bin/git-quiltimport: 114: Syntax error: Missing '))'\n\nMost bourne-ish shells I have here accept\n x=$((echo x)|cat)\nbut all bourne-ish shells I have here accept\n x=$( (echo x)|cat)\nbecause $(( might mean arithmetic expansion.\n\nSigned-off-by: Francis Daly <francis@daoine.org>\n---\n git-quiltimport.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nindex 08ac9bb..edccd82 100755\n--- a/git-quiltimport.sh\n+++ b/git-quiltimport.sh\n@@ -115,7 +115,7 @@ for patch_name in $(cat \"$QUILT_PATCHES/series\" | grep -v '^#'); do\n \tif [ -z \"$dry_run\" ] ; then\n \t\tgit-apply --index -C1 \"$tmp_patch\" &&\n \t\ttree=$(git-write-tree) &&\n-\t\tcommit=$((echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n+\t\tcommit=$( (echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n \t\tgit-update-ref -m \"quiltimport: $patch_name\" HEAD $commit || exit 4\n \tfi\n done\n-- \n1.5.1.rc3-dirty\n"},{"id":"38367","messageId":"7vr6r71wh0.fsf@assigned-by-dhcp.cox.net","threadId":"7478","inReplyTo":"20070329213820.GY24561@craic.sysops.org","subject":"Re: [PATCH] git-quiltimport /bin/sh-ism fix","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-29T23:06:03Z","receivedAt":"2007-03-29T23:06:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Francis Daly <francis@daoine.org> writes:\n\n> Bryan Wu reported\n> /usr/local/bin/git-quiltimport: 114: Syntax error: Missing '))'\n>\n> Most bourne-ish shells I have here accept\n>  x=$((echo x)|cat)\n> but all bourne-ish shells I have here accept\n>  x=$( (echo x)|cat)\n> because $(( might mean arithmetic expansion.\n\nWell spotted, thanks.\n\n\nSheesh, this is even warned in POSIX sh manpage.\n"},{"id":"38370","messageId":"1175220304.15391.46.camel@roc-desktop","threadId":"7478","inReplyTo":"20070329213820.GY24561@craic.sysops.org","subject":"Re: [PATCH] git-quiltimport /bin/sh-ism fix","fromName":"Wu, Bryan","fromEmail":"bryan.wu@analog.com","sentAt":"2007-03-30T02:05:04Z","receivedAt":"2007-03-30T02:05:04Z","isPatch":true,"sender":{"key":"bryan.wu@analog.com","avatar":null},"body":"On Thu, 2007-03-29 at 22:38 +0100, Francis Daly wrote:\n> Bryan Wu reported\n> /usr/local/bin/git-quiltimport: 114: Syntax error: Missing '))'\n> \n> Most bourne-ish shells I have here accept\n>  x=$((echo x)|cat)\n> but all bourne-ish shells I have here accept\n>  x=$( (echo x)|cat)\n> because $(( might mean arithmetic expansion.\n> \n> Signed-off-by: Francis Daly <francis@daoine.org>\n> ---\n>  git-quiltimport.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-quiltimport.sh b/git-quiltimport.sh\n> index 08ac9bb..edccd82 100755\n> --- a/git-quiltimport.sh\n> +++ b/git-quiltimport.sh\n> @@ -115,7 +115,7 @@ for patch_name in $(cat \"$QUILT_PATCHES/series\" | grep -v '^#'); do\n>  \tif [ -z \"$dry_run\" ] ; then\n>  \t\tgit-apply --index -C1 \"$tmp_patch\" &&\n>  \t\ttree=$(git-write-tree) &&\n> -\t\tcommit=$((echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n> +\t\tcommit=$( (echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n>  \t\tgit-update-ref -m \"quiltimport: $patch_name\" HEAD $commit || exit 4\n>  \tfi\n>  done\n\nCool. Thanks a lot.\n-Bryan\n"}]}