{"thread":{"id":"41060","subject":"[PATCH 03/10] contrib/examples/git-merge.sh: use the $( ... ) construct for command substitution","startedAt":"2015-12-22T14:10:22Z","lastAt":"2015-12-22T20:45:00Z","messageCount":12,"participants":["Elia Pinto","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"274858","messageId":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":null,"subject":"[PATCH 00/10] use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:22Z","receivedAt":"2015-12-22T14:10:22Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"This patch series continues the changes introduced with the merge \n6753d8a85d543253d95184ec2faad6dc197f248:\n\n    Merge branch 'ep/shell-command-substitution'\n\n    Adjust shell scripts to use $(cmd) instead of `cmd`.\n\n\nThis is the first series, the other will be sent separately.\n\n\nElia Pinto (10):\n  contrib/examples/git-commit.sh: use the $( ... ) construct for command\n    substitution\n  contrib/examples/git-fetch.sh: use the $( ... ) construct for command\n    substitution\n  contrib/examples/git-merge.sh: use the $( ... ) construct for command\n    substitution\n  contrib/examples/git-repack.sh: use the $( ... ) construct for command\n    substitution\n  contrib/examples/git-revert.sh: use the $( ... ) construct for command\n    substitution\n  contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct\n    for command substitution\n  git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for\n    command substitution\n  t/lib-httpd.sh: use the $( ... ) construct for command substitution\n  test-sha1.sh: use the $( ... ) construct for command substitution\n  unimplemented.sh: use the $( ... ) construct for command substitution\n\n contrib/examples/git-commit.sh           | 8 ++++----\n contrib/examples/git-fetch.sh            | 4 ++--\n contrib/examples/git-merge.sh            | 4 ++--\n contrib/examples/git-repack.sh           | 4 ++--\n contrib/examples/git-revert.sh           | 8 ++++----\n contrib/thunderbird-patch-inline/appp.sh | 4 ++--\n git-gui/po/glossary/txt-to-pot.sh        | 4 ++--\n t/lib-httpd.sh                           | 4 ++--\n test-sha1.sh                             | 8 ++++----\n unimplemented.sh                         | 2 +-\n 10 files changed, 25 insertions(+), 25 deletions(-)\n\n-- \n2.3.3.GIT\n"},{"id":"274854","messageId":"1450793432-9345-2-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 01/10] contrib/examples/git-commit.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:23Z","receivedAt":"2015-12-22T14:10:23Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-commit.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/examples/git-commit.sh b/contrib/examples/git-commit.sh\nindex 934505b..86c9cfa 100755\n--- a/contrib/examples/git-commit.sh\n+++ b/contrib/examples/git-commit.sh\n@@ -574,10 +574,10 @@ then\n \tif test \"$templatefile\" != \"\"\n \tthen\n \t\t# Test whether this is just the unaltered template.\n-\t\tif cnt=`sed -e '/^#/d' < \"$templatefile\" |\n+\t\tif cnt=$(sed -e '/^#/d' < \"$templatefile\" |\n \t\t\tgit stripspace |\n \t\t\tdiff \"$GIT_DIR\"/COMMIT_BAREMSG - |\n-\t\t\twc -l` &&\n+\t\t\twc -l) &&\n \t\t   test 0 -lt $cnt\n \t\tthen\n \t\t\thave_commitmsg=t\n@@ -630,8 +630,8 @@ then\n \tfi\n \tif test -z \"$quiet\"\n \tthen\n-\t\tcommit=`git diff-tree --always --shortstat --pretty=\"format:%h: %s\"\\\n-\t\t       --abbrev --summary --root HEAD --`\n+\t\tcommit=$(git diff-tree --always --shortstat --pretty=\"format:%h: %s\"\\\n+\t\t       --abbrev --summary --root HEAD --)\n \t\techo \"Created${initial_commit:+ initial} commit $commit\"\n \tfi\n fi\n-- \n2.3.3.GIT\n"},{"id":"274855","messageId":"1450793432-9345-3-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 02/10] contrib/examples/git-fetch.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:24Z","receivedAt":"2015-12-22T14:10:24Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-fetch.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/examples/git-fetch.sh b/contrib/examples/git-fetch.sh\nindex 5540709..57d2e56 100755\n--- a/contrib/examples/git-fetch.sh\n+++ b/contrib/examples/git-fetch.sh\n@@ -146,13 +146,13 @@ esac\n reflist=$(get_remote_refs_for_fetch \"$@\")\n if test \"$tags\"\n then\n-\ttaglist=`IFS='\t' &&\n+\ttaglist=$(IFS='\t' &&\n \t\t  echo \"$ls_remote_result\" |\n \t\t  git show-ref --exclude-existing=refs/tags/ |\n \t          while read sha1 name\n \t\t  do\n \t\t\techo \".${name}:${name}\"\n-\t\t  done` || exit\n+\t\t  done) || exit\n \tif test \"$#\" -gt 1\n \tthen\n \t\t# remote URL plus explicit refspecs; we need to merge them.\n-- \n2.3.3.GIT\n"},{"id":"274853","messageId":"1450793432-9345-4-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 03/10] contrib/examples/git-merge.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:25Z","receivedAt":"2015-12-22T14:10:25Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-merge.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh\nindex 52f2aaf..ee99f1a 100755\n--- a/contrib/examples/git-merge.sh\n+++ b/contrib/examples/git-merge.sh\n@@ -523,10 +523,10 @@ do\n \n \tif test \"$exit\" -eq 1\n \tthen\n-\t    cnt=`{\n+\t    cnt=$({\n \t\tgit diff-files --name-only\n \t\tgit ls-files --unmerged\n-\t    } | wc -l`\n+\t    } | wc -l)\n \t    if test $best_cnt -le 0 || test $cnt -le $best_cnt\n \t    then\n \t\tbest_strategy=$strategy\n-- \n2.3.3.GIT\n"},{"id":"274860","messageId":"1450793432-9345-5-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 04/10] contrib/examples/git-repack.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:26Z","receivedAt":"2015-12-22T14:10:26Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-repack.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/examples/git-repack.sh b/contrib/examples/git-repack.sh\nindex 96e3fed..672af93 100755\n--- a/contrib/examples/git-repack.sh\n+++ b/contrib/examples/git-repack.sh\n@@ -67,8 +67,8 @@ case \",$all_into_one,\" in\n ,t,)\n \targs= existing=\n \tif [ -d \"$PACKDIR\" ]; then\n-\t\tfor e in `cd \"$PACKDIR\" && find . -type f -name '*.pack' \\\n-\t\t\t| sed -e 's/^\\.\\///' -e 's/\\.pack$//'`\n+\t\tfor e in $(cd \"$PACKDIR\" && find . -type f -name '*.pack' \\\n+\t\t\t| sed -e 's/^\\.\\///' -e 's/\\.pack$//')\n \t\tdo\n \t\t\tif [ -e \"$PACKDIR/$e.keep\" ]; then\n \t\t\t\t: keep\n-- \n2.3.3.GIT\n"},{"id":"274859","messageId":"1450793432-9345-6-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 05/10] contrib/examples/git-revert.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:27Z","receivedAt":"2015-12-22T14:10:27Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/examples/git-revert.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/examples/git-revert.sh b/contrib/examples/git-revert.sh\nindex 7e2aad5..197838d 100755\n--- a/contrib/examples/git-revert.sh\n+++ b/contrib/examples/git-revert.sh\n@@ -138,8 +138,8 @@ cherry-pick)\n \t}'\n \n \tlogmsg=$(git show -s --pretty=raw --encoding=\"$encoding\" \"$commit\")\n-\tset_author_env=`echo \"$logmsg\" |\n-\tLANG=C LC_ALL=C sed -ne \"$pick_author_script\"`\n+\tset_author_env=$(echo \"$logmsg\" |\n+\tLANG=C LC_ALL=C sed -ne \"$pick_author_script\")\n \teval \"$set_author_env\"\n \texport GIT_AUTHOR_NAME\n \texport GIT_AUTHOR_EMAIL\n@@ -160,9 +160,9 @@ cherry-pick)\n esac >.msg\n \n eval GITHEAD_$head=HEAD\n-eval GITHEAD_$next='`git show -s \\\n+eval GITHEAD_$next='$(git show -s \\\n \t--pretty=oneline --encoding=\"$encoding\" \"$commit\" |\n-\tsed -e \"s/^[^ ]* //\"`'\n+\tsed -e \"s/^[^ ]* //\")'\n export GITHEAD_$head GITHEAD_$next\n \n # This three way merge is an interesting one.  We are at\n-- \n2.3.3.GIT\n"},{"id":"274863","messageId":"1450793432-9345-7-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 06/10] contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:28Z","receivedAt":"2015-12-22T14:10:28Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n contrib/thunderbird-patch-inline/appp.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh\nindex 8dc73ec..1053872 100755\n--- a/contrib/thunderbird-patch-inline/appp.sh\n+++ b/contrib/thunderbird-patch-inline/appp.sh\n@@ -31,8 +31,8 @@ BODY=$(sed -e \"1,/${SEP}/d\" $1)\n CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' \"${PATCH}\")\n DIFF=$(sed -e '1,/^---$/d' \"${PATCH}\")\n \n-CCS=`echo -e \"$CMT_MSG\\n$HEADERS\" | sed -n -e 's/^Cc: \\(.*\\)$/\\1,/gp' \\\n-\t-e 's/^Signed-off-by: \\(.*\\)/\\1,/gp'`\n+CCS=$(echo -e \"$CMT_MSG\\n$HEADERS\" | sed -n -e 's/^Cc: \\(.*\\)$/\\1,/gp' \\\n+\t-e 's/^Signed-off-by: \\(.*\\)/\\1,/gp')\n \n echo \"$SUBJECT\" > $1\n echo \"Cc: $CCS\" >> $1\n-- \n2.3.3.GIT\n"},{"id":"274862","messageId":"1450793432-9345-8-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 07/10] git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:29Z","receivedAt":"2015-12-22T14:10:29Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n git-gui/po/glossary/txt-to-pot.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-gui/po/glossary/txt-to-pot.sh b/git-gui/po/glossary/txt-to-pot.sh\nindex 49bf7c5..8249915 100755\n--- a/git-gui/po/glossary/txt-to-pot.sh\n+++ b/git-gui/po/glossary/txt-to-pot.sh\n@@ -11,7 +11,7 @@\n if [ $# -eq 0 ]\n then\n \tcat <<!\n-Usage: `basename $0` git-gui-glossary.txt > git-gui-glossary.pot\n+Usage: $(basename $0) git-gui-glossary.txt > git-gui-glossary.pot\n !\n \texit 1;\n fi\n@@ -33,7 +33,7 @@ cat <<!\n msgid \"\"\n msgstr \"\"\n \"Project-Id-Version: PACKAGE VERSION\\n\"\n-\"POT-Creation-Date: `date +'%Y-%m-%d %H:%M%z'`\\n\"\n+\"POT-Creation-Date: $(date +'%Y-%m-%d %H:%M%z')\\n\"\n \"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n \"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n \"Language-Team: LANGUAGE <LL@li.org>\\n\"\n-- \n2.3.3.GIT\n"},{"id":"274861","messageId":"1450793432-9345-9-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 08/10] t/lib-httpd.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:30Z","receivedAt":"2015-12-22T14:10:30Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n t/lib-httpd.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex e971446..f9f3e5f 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -98,8 +98,8 @@ then\n \ttest_skip_or_die $GIT_TEST_HTTPD \"no web server found at '$LIB_HTTPD_PATH'\"\n fi\n \n-HTTPD_VERSION=`$LIB_HTTPD_PATH -v | \\\n-\tsed -n 's/^Server version: Apache\\/\\([0-9]*\\)\\..*$/\\1/p; q'`\n+HTTPD_VERSION=$($LIB_HTTPD_PATH -v | \\\n+\tsed -n 's/^Server version: Apache\\/\\([0-9]*\\)\\..*$/\\1/p; q')\n \n if test -n \"$HTTPD_VERSION\"\n then\n-- \n2.3.3.GIT\n"},{"id":"274856","messageId":"1450793432-9345-10-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 09/10] test-sha1.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:31Z","receivedAt":"2015-12-22T14:10:31Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n test-sha1.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/test-sha1.sh b/test-sha1.sh\nindex 0f0bc5d..cef4bcc 100755\n--- a/test-sha1.sh\n+++ b/test-sha1.sh\n@@ -6,13 +6,13 @@ dd if=/dev/zero bs=1048576 count=100 2>/dev/null |\n while read expect cnt pfx\n do\n \tcase \"$expect\" in '#'*) continue ;; esac\n-\tactual=`\n+\tactual=$(\n \t\t{\n \t\t\ttest -z \"$pfx\" || echo \"$pfx\"\n \t\t\tdd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |\n \t\t\tperl -pe 'y/\\000/g/'\n \t\t} | ./test-sha1 $cnt\n-\t`\n+\t)\n \tif test \"$expect\" = \"$actual\"\n \tthen\n \t\techo \"OK: $expect $cnt $pfx\"\n@@ -51,14 +51,14 @@ exit\n \n while read cnt pfx\n do\n-\tactual=`\n+\tactual=$(\n \t\t{\n \t\t\ttest -z \"$pfx\" || echo \"$pfx\"\n \t\t\tdd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |\n \t\t\tperl -pe 'y/\\000/g/'\n \t\t} | sha1sum |\n \t\tsed -e 's/ .*//'\n-\t`\n+\t)\n \techo \"$actual $cnt $pfx\"\n done <<EOF\n 0\n-- \n2.3.3.GIT\n"},{"id":"274857","messageId":"1450793432-9345-11-git-send-email-gitter.spiros@gmail.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 10/10] unimplemented.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2015-12-22T14:10:32Z","receivedAt":"2015-12-22T14:10:32Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The Git CodingGuidelines prefer the $(...) construct for command\nsubstitution instead of using the backquotes `...`.\n\nThe backquoted form is the traditional method for command\nsubstitution, and is supported by POSIX.  However, all but the\nsimplest uses become complicated quickly.  In particular, embedded\ncommand substitutions and/or the use of double quotes require\ncareful escaping with the backslash character.\n\nThe patch was generated by:\n\nfor _f in $(find . -name \"*.sh\")\ndo\n\tperl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\\$(\\1)/smg'  \"${_f}\"\ndone\n\nand then carefully proof-read.\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n unimplemented.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/unimplemented.sh b/unimplemented.sh\nindex 5252de4..fee21d2 100644\n--- a/unimplemented.sh\n+++ b/unimplemented.sh\n@@ -1,4 +1,4 @@\n #!/bin/sh\n \n-echo >&2 \"fatal: git was built without support for `basename $0` (@@REASON@@).\"\n+echo >&2 \"fatal: git was built without support for $(basename $0) (@@REASON@@).\"\n exit 128\n-- \n2.3.3.GIT\n"},{"id":"274914","messageId":"20151222204500.GA5243@google.com","threadId":"41060","inReplyTo":"1450793432-9345-1-git-send-email-gitter.spiros@gmail.com","subject":"Re: [PATCH 00/10] use the $( ... ) construct for command substitution","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2015-12-22T20:45:00Z","receivedAt":"2015-12-22T20:45:00Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Elia Pinto wrote:\n\n> This is the first series, the other will be sent separately.\n\nFWIW,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"}]}