{"thread":{"id":"41141","subject":"[PATCH 02/10] t/t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution","startedAt":"2016-01-07T13:51:40Z","lastAt":"2016-01-07T22:00:53Z","messageCount":12,"participants":["Elia Pinto","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"275479","messageId":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":null,"subject":"[PATCH 00/10] use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:40Z","receivedAt":"2016-01-07T13:51:40Z","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  sixth  series, the other will be sent separately.\n\nElia Pinto (10):\n  t/t5900-repo-selection.sh: use the $( ... ) construct for command\n    substitution\n  t/t6001-rev-list-graft.sh: use the $( ... ) construct for command\n    substitution\n  t/t6002-rev-list-bisect.sh: use the $( ... ) construct for command\n    substitution\n  t/t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for\n    command substitution\n  t/t6032-merge-large-rename.sh: use the $( ... ) construct for command\n    substitution\n  t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command\n    substitution\n  t/t7001-mv.sh: use the $( ... ) construct for command substitution\n  t/t7003-filter-branch.sh: use the $( ... ) construct for command\n    substitution\n  t/t7004-tag.sh: use the $( ... ) construct for command substitution\n  t/t7006-pager.sh: use the $( ... ) construct for command substitution\n\n t/t5900-repo-selection.sh            |  2 +-\n t/t6001-rev-list-graft.sh            | 12 ++++++------\n t/t6002-rev-list-bisect.sh           |  6 +++---\n t/t6015-rev-list-show-all-parents.sh |  6 +++---\n t/t6032-merge-large-rename.sh        |  2 +-\n t/t6132-pathspec-exclude.sh          |  2 +-\n t/t7001-mv.sh                        |  4 ++--\n t/t7003-filter-branch.sh             |  6 +++---\n t/t7004-tag.sh                       | 16 ++++++++--------\n t/t7006-pager.sh                     |  2 +-\n 10 files changed, 29 insertions(+), 29 deletions(-)\n\n-- \n2.3.3.GIT\n"},{"id":"275488","messageId":"1452174710-28188-2-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 01/10] t/t5900-repo-selection.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:41Z","receivedAt":"2016-01-07T13:51:41Z","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/t5900-repo-selection.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5900-repo-selection.sh b/t/t5900-repo-selection.sh\nindex 3d5b418..14e59c5 100755\n--- a/t/t5900-repo-selection.sh\n+++ b/t/t5900-repo-selection.sh\n@@ -15,7 +15,7 @@ make_tree() {\n make_bare() {\n \tgit init --bare \"$1\" &&\n \t(cd \"$1\" &&\n-\t tree=`git hash-object -w -t tree /dev/null` &&\n+\t tree=$(git hash-object -w -t tree /dev/null) &&\n \t commit=$(echo \"$1\" | git commit-tree $tree) &&\n \t git update-ref HEAD $commit\n \t)\n-- \n2.3.3.GIT\n"},{"id":"275478","messageId":"1452174710-28188-3-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 02/10] t/t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:42Z","receivedAt":"2016-01-07T13:51:42Z","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/t6001-rev-list-graft.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh\nindex 8efcd13..05ddc69 100755\n--- a/t/t6001-rev-list-graft.sh\n+++ b/t/t6001-rev-list-graft.sh\n@@ -10,15 +10,15 @@ test_expect_success setup '\n \techo >subdir/fileB fileB &&\n \tgit add fileA subdir/fileB &&\n \tgit commit -a -m \"Initial in one history.\" &&\n-\tA0=`git rev-parse --verify HEAD` &&\n+\tA0=$(git rev-parse --verify HEAD) &&\n \n \techo >fileA fileA modified &&\n \tgit commit -a -m \"Second in one history.\" &&\n-\tA1=`git rev-parse --verify HEAD` &&\n+\tA1=$(git rev-parse --verify HEAD) &&\n \n \techo >subdir/fileB fileB modified &&\n \tgit commit -a -m \"Third in one history.\" &&\n-\tA2=`git rev-parse --verify HEAD` &&\n+\tA2=$(git rev-parse --verify HEAD) &&\n \n \trm -f .git/refs/heads/master .git/index &&\n \n@@ -26,15 +26,15 @@ test_expect_success setup '\n \techo >subdir/fileB fileB again &&\n \tgit add fileA subdir/fileB &&\n \tgit commit -a -m \"Initial in alternate history.\" &&\n-\tB0=`git rev-parse --verify HEAD` &&\n+\tB0=$(git rev-parse --verify HEAD) &&\n \n \techo >fileA fileA modified in alternate history &&\n \tgit commit -a -m \"Second in alternate history.\" &&\n-\tB1=`git rev-parse --verify HEAD` &&\n+\tB1=$(git rev-parse --verify HEAD) &&\n \n \techo >subdir/fileB fileB modified in alternate history &&\n \tgit commit -a -m \"Third in alternate history.\" &&\n-\tB2=`git rev-parse --verify HEAD` &&\n+\tB2=$(git rev-parse --verify HEAD) &&\n \t: done\n '\n \n-- \n2.3.3.GIT\n"},{"id":"275483","messageId":"1452174710-28188-4-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 03/10] t/t6002-rev-list-bisect.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:43Z","receivedAt":"2016-01-07T13:51:43Z","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/t6002-rev-list-bisect.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t6002-rev-list-bisect.sh b/t/t6002-rev-list-bisect.sh\nindex 43ad772..3bf2759 100755\n--- a/t/t6002-rev-list-bisect.sh\n+++ b/t/t6002-rev-list-bisect.sh\n@@ -27,9 +27,9 @@ test_bisection_diff()\n \t# Test if bisection size is close to half of list size within\n \t# tolerance.\n \t#\n-\t_bisect_err=`expr $_list_size - $_bisection_size \\* 2`\n-\ttest \"$_bisect_err\" -lt 0 && _bisect_err=`expr 0 - $_bisect_err`\n-\t_bisect_err=`expr $_bisect_err / 2` ; # floor\n+\t_bisect_err=$(expr $_list_size - $_bisection_size \\* 2)\n+\ttest \"$_bisect_err\" -lt 0 && _bisect_err=$(expr 0 - $_bisect_err)\n+\t_bisect_err=$(expr $_bisect_err / 2) ; # floor\n \n \ttest_expect_success \\\n \t\"bisection diff $_bisect_option $_head $* <= $_max_diff\" \\\n-- \n2.3.3.GIT\n"},{"id":"275486","messageId":"1452174710-28188-5-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 04/10] t/t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:44Z","receivedAt":"2016-01-07T13:51:44Z","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/t6015-rev-list-show-all-parents.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t6015-rev-list-show-all-parents.sh b/t/t6015-rev-list-show-all-parents.sh\nindex 8b146fb..3c73c93 100755\n--- a/t/t6015-rev-list-show-all-parents.sh\n+++ b/t/t6015-rev-list-show-all-parents.sh\n@@ -6,11 +6,11 @@ test_description='--show-all --parents does not rewrite TREESAME commits'\n \n test_expect_success 'set up --show-all --parents test' '\n \ttest_commit one foo.txt &&\n-\tcommit1=`git rev-list -1 HEAD` &&\n+\tcommit1=$(git rev-list -1 HEAD) &&\n \ttest_commit two bar.txt &&\n-\tcommit2=`git rev-list -1 HEAD` &&\n+\tcommit2=$(git rev-list -1 HEAD) &&\n \ttest_commit three foo.txt &&\n-\tcommit3=`git rev-list -1 HEAD`\n+\tcommit3=$(git rev-list -1 HEAD)\n \t'\n \n test_expect_success '--parents rewrites TREESAME parents correctly' '\n-- \n2.3.3.GIT\n"},{"id":"275482","messageId":"1452174710-28188-6-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 05/10] t/t6032-merge-large-rename.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:45Z","receivedAt":"2016-01-07T13:51:45Z","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/t6032-merge-large-rename.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t6032-merge-large-rename.sh b/t/t6032-merge-large-rename.sh\nindex 0f79268..8077738 100755\n--- a/t/t6032-merge-large-rename.sh\n+++ b/t/t6032-merge-large-rename.sh\n@@ -20,7 +20,7 @@ test_expect_success 'setup (initial)' '\n \n make_text() {\n \techo $1: $2\n-\tfor i in `count 20`; do\n+\tfor i in $(count 20); do\n \t\techo $1: $i\n \tdone\n \techo $1: $3\n-- \n2.3.3.GIT\n"},{"id":"275480","messageId":"1452174710-28188-7-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 06/10] t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:46Z","receivedAt":"2016-01-07T13:51:46Z","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/t6132-pathspec-exclude.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t6132-pathspec-exclude.sh b/t/t6132-pathspec-exclude.sh\nindex e1e1b1f..d51595c 100755\n--- a/t/t6132-pathspec-exclude.sh\n+++ b/t/t6132-pathspec-exclude.sh\n@@ -7,7 +7,7 @@ test_description='test case exclude pathspec'\n test_expect_success 'setup' '\n \tfor p in file sub/file sub/sub/file sub/file2 sub/sub/sub/file sub2/file; do\n \t\tif echo $p | grep /; then\n-\t\t\tmkdir -p `dirname $p`\n+\t\t\tmkdir -p $(dirname $p)\n \t\tfi &&\n \t\t: >$p &&\n \t\tgit add $p &&\n-- \n2.3.3.GIT\n"},{"id":"275481","messageId":"1452174710-28188-8-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 07/10] t/t7001-mv.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:47Z","receivedAt":"2016-01-07T13:51:47Z","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/t7001-mv.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex 7b56081..51dd2b4 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -156,11 +156,11 @@ test_expect_success \"Michael Cassar's test case\" '\n \techo b > partA/outline.txt &&\n \techo c > papers/unsorted/_another &&\n \tgit add papers partA &&\n-\tT1=`git write-tree` &&\n+\tT1=$(git write-tree) &&\n \n \tgit mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&\n \n-\tT=`git write-tree` &&\n+\tT=$(git write-tree) &&\n \tgit ls-tree -r $T | verbose grep partA/outline.txt\n '\n \n-- \n2.3.3.GIT\n"},{"id":"275484","messageId":"1452174710-28188-9-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 08/10] t/t7003-filter-branch.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:48Z","receivedAt":"2016-01-07T13:51:48Z","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/t7003-filter-branch.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh\nindex 869e0bf..8868e6e 100755\n--- a/t/t7003-filter-branch.sh\n+++ b/t/t7003-filter-branch.sh\n@@ -387,7 +387,7 @@ test_expect_success 'setup submodule' '\n \tgit branch original HEAD\n '\n \n-orig_head=`git show-ref --hash --head HEAD`\n+orig_head=$(git show-ref --hash --head HEAD)\n \n test_expect_success 'rewrite submodule with another content' '\n \tgit filter-branch --tree-filter \"test -d submod && {\n@@ -396,7 +396,7 @@ test_expect_success 'rewrite submodule with another content' '\n \t\t\t\t\t mkdir submod &&\n \t\t\t\t\t : > submod/file\n \t\t\t\t\t } || :\" HEAD &&\n-\ttest $orig_head != `git show-ref --hash --head HEAD`\n+\ttest $orig_head != $(git show-ref --hash --head HEAD)\n '\n \n test_expect_success 'replace submodule revision' '\n@@ -405,7 +405,7 @@ test_expect_success 'replace submodule revision' '\n \t    \"if git ls-files --error-unmatch -- submod > /dev/null 2>&1\n \t     then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod\n \t     fi\" HEAD &&\n-\ttest $orig_head != `git show-ref --hash --head HEAD`\n+\ttest $orig_head != $(git show-ref --hash --head HEAD)\n '\n \n test_expect_success 'filter commit message without trailing newline' '\n-- \n2.3.3.GIT\n"},{"id":"275485","messageId":"1452174710-28188-10-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 09/10] t/t7004-tag.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:49Z","receivedAt":"2016-01-07T13:51:49Z","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/t7004-tag.sh | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex 3dd2f51..2797f22 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -23,8 +23,8 @@ test_expect_success 'listing all tags in an empty tree should succeed' '\n '\n \n test_expect_success 'listing all tags in an empty tree should output nothing' '\n-\ttest `git tag -l | wc -l` -eq 0 &&\n-\ttest `git tag | wc -l` -eq 0\n+\ttest $(git tag -l | wc -l) -eq 0 &&\n+\ttest $(git tag | wc -l) -eq 0\n '\n \n test_expect_success 'looking for a tag in an empty tree should fail' \\\n@@ -72,8 +72,8 @@ test_expect_success 'listing all tags if one exists should succeed' '\n '\n \n test_expect_success 'listing all tags if one exists should output that tag' '\n-\ttest `git tag -l` = mytag &&\n-\ttest `git tag` = mytag\n+\ttest $(git tag -l) = mytag &&\n+\ttest $(git tag) = mytag\n '\n \n # pattern matching:\n@@ -83,7 +83,7 @@ test_expect_success 'listing a tag using a matching pattern should succeed' \\\n \n test_expect_success \\\n \t'listing a tag using a matching pattern should output that tag' \\\n-\t'test `git tag -l mytag` = mytag'\n+\t'test $(git tag -l mytag) = mytag'\n \n # todo: git tag -l now returns always zero, when fixed, change this test\n test_expect_success \\\n@@ -92,7 +92,7 @@ test_expect_success \\\n \n test_expect_success \\\n \t'listing tags using a non-matching pattern should output nothing' \\\n-\t'test `git tag -l xxx | wc -l` -eq 0'\n+\t'test $(git tag -l xxx | wc -l) -eq 0'\n \n # special cases for creating tags:\n \n@@ -102,13 +102,13 @@ test_expect_success \\\n \n test_expect_success \\\n \t'trying to create a tag with a non-valid name should fail' '\n-\ttest `git tag -l | wc -l` -eq 1 &&\n+\ttest $(git tag -l | wc -l) -eq 1 &&\n \ttest_must_fail git tag \"\" &&\n \ttest_must_fail git tag .othertag &&\n \ttest_must_fail git tag \"other tag\" &&\n \ttest_must_fail git tag \"othertag^\" &&\n \ttest_must_fail git tag \"other~tag\" &&\n-\ttest `git tag -l | wc -l` -eq 1\n+\ttest $(git tag -l | wc -l) -eq 1\n '\n \n test_expect_success 'creating a tag using HEAD directly should succeed' '\n-- \n2.3.3.GIT\n"},{"id":"275487","messageId":"1452174710-28188-11-git-send-email-gitter.spiros@gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 10/10] t/t7006-pager.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-07T13:51:50Z","receivedAt":"2016-01-07T13:51:50Z","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/t7006-pager.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7006-pager.sh b/t/t7006-pager.sh\nindex 6ea7ac4..e4fc5c8 100755\n--- a/t/t7006-pager.sh\n+++ b/t/t7006-pager.sh\n@@ -424,7 +424,7 @@ test_expect_success TTY 'command-specific pager works for external commands' '\n \techo \"foo:initial\" >expect &&\n \t>actual &&\n \ttest_config pager.external \"sed s/^/foo:/ >actual\" &&\n-\ttest_terminal git --exec-path=\"`pwd`\" external log --format=%s -1 &&\n+\ttest_terminal git --exec-path=\"$(pwd)\" external log --format=%s -1 &&\n \ttest_cmp expect actual\n '\n \n-- \n2.3.3.GIT\n"},{"id":"275507","messageId":"CAPc5daW3U6qWCPJHPRf-Zuf8xH4xOJME1Axa+4DYq1yCBnAyWQ@mail.gmail.com","threadId":"41141","inReplyTo":"1452174710-28188-1-git-send-email-gitter.spiros@gmail.com","subject":"Re: [PATCH 00/10] use the $( ... ) construct for command substitution","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-07T22:00:53Z","receivedAt":"2016-01-07T22:00:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"All looked trivially correct. Thanks, will queue.\n"}]}