{"thread":{"id":"41171","subject":"[PATCH 01/10] t9100-git-svn-basic.sh: use the $( ... ) construct for command substitution","startedAt":"2016-01-12T10:45:08Z","lastAt":"2016-01-12T19:56:42Z","messageCount":12,"participants":["Elia Pinto","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"275780","messageId":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":null,"subject":"[PATCH 00/10] use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:08Z","receivedAt":"2016-01-12T10:45:08Z","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 eighth series, the other will be sent separately.\n\nElia Pinto (10):\n  t9100-git-svn-basic.sh: use the $( ... ) construct for command\n    substitution\n  t9101-git-svn-props.sh: use the $( ... ) construct for command\n    substitution\n  t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command\n    substitution\n  t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command\n    substitution\n  t9107-git-svn-migrate.sh: use the $( ... ) construct for command\n    substitution\n  t9108-git-svn-glob.sh: use the $( ... ) construct for command\n    substitution\n  t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command\n    substitution\n  t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command\n    substitution\n  t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command\n    substitution\n  t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for\n    command substitution\n\n t/t9100-git-svn-basic.sh              |  8 ++---\n t/t9101-git-svn-props.sh              | 30 ++++++++--------\n t/t9104-git-svn-follow-parent.sh      | 68 +++++++++++++++++------------------\n t/t9105-git-svn-commit-diff.sh        |  4 +--\n t/t9107-git-svn-migrate.sh            | 28 +++++++--------\n t/t9108-git-svn-glob.sh               | 20 +++++------\n t/t9109-git-svn-multi-glob.sh         | 32 ++++++++---------\n t/t9110-git-svn-use-svm-props.sh      |  2 +-\n t/t9114-git-svn-dcommit-merge.sh      | 12 +++----\n t/t9118-git-svn-funky-branch-names.sh |  2 +-\n 10 files changed, 103 insertions(+), 103 deletions(-)\n\n-- \n2.5.0\n"},{"id":"275779","messageId":"1452595518-38149-2-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 01/10] t9100-git-svn-basic.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:09Z","receivedAt":"2016-01-12T10:45:09Z","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/t9100-git-svn-basic.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 4fea8d9..258d9b8 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -265,18 +265,18 @@ test_expect_success 'able to dcommit to a subdirectory' \"\n \tgit update-index --add d &&\n \tgit commit -m '/bar/d should be in the log' &&\n \tgit svn dcommit -i bar &&\n-\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\" &&\n+\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\" &&\n \tmkdir newdir &&\n \techo new > newdir/dir &&\n \tgit update-index --add newdir/dir &&\n \tgit commit -m 'add a new directory' &&\n \tgit svn dcommit -i bar &&\n-\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\" &&\n+\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\" &&\n \techo foo >> newdir/dir &&\n \tgit update-index newdir/dir &&\n \tgit commit -m 'modify a file in new directory' &&\n \tgit svn dcommit -i bar &&\n-\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\"\n+\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\"\n \t\"\n \n test_expect_success 'dcommit should not fail with a touched file' '\n@@ -295,7 +295,7 @@ test_expect_success 'able to set-tree to a subdirectory' \"\n \tgit update-index d &&\n \tgit commit -m 'update /bar/d' &&\n \tgit svn set-tree -i bar HEAD &&\n-\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\"\n+\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\"\n \t\"\n \n test_expect_success 'git-svn works in a bare repository' '\n-- \n2.5.0\n"},{"id":"275784","messageId":"1452595518-38149-3-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 02/10] t9101-git-svn-props.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:10Z","receivedAt":"2016-01-12T10:45:10Z","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/t9101-git-svn-props.sh | 30 +++++++++++++++---------------\n 1 file changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh\nindex 8869f50..e8173d5 100755\n--- a/t/t9101-git-svn-props.sh\n+++ b/t/t9101-git-svn-props.sh\n@@ -26,27 +26,27 @@ cd import\n EOF\n \n \tprintf \"Hello\\r\\nWorld\\r\\n\" > crlf\n-\ta_crlf=`git hash-object -w crlf`\n+\ta_crlf=$(git hash-object -w crlf)\n \tprintf \"Hello\\rWorld\\r\" > cr\n-\ta_cr=`git hash-object -w cr`\n+\ta_cr=$(git hash-object -w cr)\n \tprintf \"Hello\\nWorld\\n\" > lf\n-\ta_lf=`git hash-object -w lf`\n+\ta_lf=$(git hash-object -w lf)\n \n \tprintf \"Hello\\r\\nWorld\" > ne_crlf\n-\ta_ne_crlf=`git hash-object -w ne_crlf`\n+\ta_ne_crlf=$(git hash-object -w ne_crlf)\n \tprintf \"Hello\\nWorld\" > ne_lf\n-\ta_ne_lf=`git hash-object -w ne_lf`\n+\ta_ne_lf=$(git hash-object -w ne_lf)\n \tprintf \"Hello\\rWorld\" > ne_cr\n-\ta_ne_cr=`git hash-object -w ne_cr`\n+\ta_ne_cr=$(git hash-object -w ne_cr)\n \n \ttouch empty\n-\ta_empty=`git hash-object -w empty`\n+\ta_empty=$(git hash-object -w empty)\n \tprintf \"\\n\" > empty_lf\n-\ta_empty_lf=`git hash-object -w empty_lf`\n+\ta_empty_lf=$(git hash-object -w empty_lf)\n \tprintf \"\\r\" > empty_cr\n-\ta_empty_cr=`git hash-object -w empty_cr`\n+\ta_empty_cr=$(git hash-object -w empty_cr)\n \tprintf \"\\r\\n\" > empty_crlf\n-\ta_empty_crlf=`git hash-object -w empty_crlf`\n+\ta_empty_crlf=$(git hash-object -w empty_crlf)\n \n \tsvn_cmd import --no-auto-props -m 'import for git svn' . \"$svnrepo\" >/dev/null\n cd ..\n@@ -80,7 +80,7 @@ test_expect_success \"$name\" \\\n \tgit pull . ${remotes_git_svn}'\n \n expect='/* $Id$ */'\n-got=\"`sed -ne 2p kw.c`\"\n+got=\"$(sed -ne 2p kw.c)\"\n test_expect_success 'raw $Id$ found in kw.c' \"test '$expect' = '$got'\"\n \n test_expect_success \"propset CR on crlf files\" '\n@@ -107,8 +107,8 @@ done\n cd test_wc\n \tprintf '$Id$\\rHello\\rWorld\\r' > cr\n \tprintf '$Id$\\rHello\\rWorld' > ne_cr\n-\ta_cr=`printf '$Id$\\r\\nHello\\r\\nWorld\\r\\n' | git hash-object --stdin`\n-\ta_ne_cr=`printf '$Id$\\r\\nHello\\r\\nWorld' | git hash-object --stdin`\n+\ta_cr=$(printf '$Id$\\r\\nHello\\r\\nWorld\\r\\n' | git hash-object --stdin)\n+\ta_ne_cr=$(printf '$Id$\\r\\nHello\\r\\nWorld' | git hash-object --stdin)\n \ttest_expect_success 'Set CRLF on cr files' \\\n \t'svn_cmd propset svn:eol-style CRLF cr &&\n \t svn_cmd propset svn:eol-style CRLF ne_cr &&\n@@ -119,8 +119,8 @@ cd ..\n test_expect_success 'fetch and pull latest from svn' \\\n \t'git svn fetch && git pull . ${remotes_git_svn}'\n \n-b_cr=\"`git hash-object cr`\"\n-b_ne_cr=\"`git hash-object ne_cr`\"\n+b_cr=\"$(git hash-object cr)\"\n+b_ne_cr=\"$(git hash-object ne_cr)\"\n \n test_expect_success 'CRLF + $Id$' \"test '$a_cr' = '$b_cr'\"\n test_expect_success 'CRLF + $Id$ (no newline)' \"test '$a_ne_cr' = '$b_ne_cr'\"\n-- \n2.5.0\n"},{"id":"275783","messageId":"1452595518-38149-4-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 03/10] t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:11Z","receivedAt":"2016-01-12T10:45:11Z","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/t9104-git-svn-follow-parent.sh | 68 ++++++++++++++++++++--------------------\n 1 file changed, 34 insertions(+), 34 deletions(-)\n\ndiff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh\nindex 83f17e1..872aa79 100755\n--- a/t/t9104-git-svn-follow-parent.sh\n+++ b/t/t9104-git-svn-follow-parent.sh\n@@ -31,12 +31,12 @@ test_expect_success 'initialize repo' '\n test_expect_success 'init and fetch a moved directory' '\n \tgit svn init --minimize-url -i thunk \"$svnrepo\"/thunk &&\n \tgit svn fetch -i thunk &&\n-\ttest \"`git rev-parse --verify refs/remotes/thunk@2`\" \\\n-           = \"`git rev-parse --verify refs/remotes/thunk~1`\" &&\n-        test \"`git cat-file blob refs/remotes/thunk:readme |\\\n-                 sed -n -e \"3p\"`\" = goodbye &&\n-\ttest -z \"`git config --get svn-remote.svn.fetch \\\n-\t         \"^trunk:refs/remotes/thunk@2$\"`\"\n+\ttest \"$(git rev-parse --verify refs/remotes/thunk@2)\" \\\n+           = \"$(git rev-parse --verify refs/remotes/thunk~1)\" &&\n+        test \"$(git cat-file blob refs/remotes/thunk:readme |\\\n+                 sed -n -e \"3p\")\" = goodbye &&\n+\ttest -z \"$(git config --get svn-remote.svn.fetch \\\n+\t         \"^trunk:refs/remotes/thunk@2$\")\"\n \t'\n \n test_expect_success 'init and fetch from one svn-remote' '\n@@ -46,10 +46,10 @@ test_expect_success 'init and fetch from one svn-remote' '\n         git config --add svn-remote.svn.fetch \\\n           thunk:refs/remotes/svn/thunk &&\n         git svn fetch -i svn/thunk &&\n-\ttest \"`git rev-parse --verify refs/remotes/svn/trunk`\" \\\n-           = \"`git rev-parse --verify refs/remotes/svn/thunk~1`\" &&\n-        test \"`git cat-file blob refs/remotes/svn/thunk:readme |\\\n-                 sed -n -e \"3p\"`\" = goodbye\n+\ttest \"$(git rev-parse --verify refs/remotes/svn/trunk)\" \\\n+           = \"$(git rev-parse --verify refs/remotes/svn/thunk~1)\" &&\n+        test \"$(git cat-file blob refs/remotes/svn/thunk:readme |\\\n+                 sed -n -e \"3p\")\" = goodbye\n         '\n \n test_expect_success 'follow deleted parent' '\n@@ -61,9 +61,9 @@ test_expect_success 'follow deleted parent' '\n           junk:refs/remotes/svn/junk &&\n         git svn fetch -i svn/thunk &&\n         git svn fetch -i svn/junk &&\n-        test -z \"`git diff svn/junk svn/trunk`\" &&\n-        test \"`git merge-base svn/junk svn/trunk`\" \\\n-           = \"`git rev-parse svn/trunk`\"\n+        test -z \"$(git diff svn/junk svn/trunk)\" &&\n+        test \"$(git merge-base svn/junk svn/trunk)\" \\\n+           = \"$(git rev-parse svn/trunk)\"\n         '\n \n test_expect_success 'follow larger parent' '\n@@ -80,10 +80,10 @@ test_expect_success 'follow larger parent' '\n         git rev-parse --verify refs/remotes/larger &&\n         git rev-parse --verify \\\n \t   refs/remotes/larger-parent &&\n-        test \"`git merge-base \\\n+        test \"$(git merge-base \\\n \t\t refs/remotes/larger-parent \\\n-                 refs/remotes/larger`\" = \\\n-             \"`git rev-parse refs/remotes/larger`\"\n+                 refs/remotes/larger)\" = \\\n+             \"$(git rev-parse refs/remotes/larger)\"\n         '\n \n test_expect_success 'follow higher-level parent' '\n@@ -106,8 +106,8 @@ test_expect_success 'follow deleted directory' '\n \tsvn_cmd rm -m \"remove glob\" \"$svnrepo\"/glob &&\n \tgit svn init --minimize-url -i glob \"$svnrepo\"/glob &&\n \tgit svn fetch -i glob &&\n-\ttest \"`git cat-file blob refs/remotes/glob:blob/bye`\" = hi &&\n-\ttest \"`git ls-tree refs/remotes/glob | wc -l `\" -eq 1\n+\ttest \"$(git cat-file blob refs/remotes/glob:blob/bye)\" = hi &&\n+\ttest \"$(git ls-tree refs/remotes/glob | wc -l )\" -eq 1\n \t'\n \n # ref: r9270 of the Subversion repository: (http://svn.collab.net/repos/svn)\n@@ -142,9 +142,9 @@ test_expect_success 'follow-parent avoids deleting relevant info' '\n \tgit svn init --minimize-url -i r9270-t \\\n \t  \"$svnrepo\"/r9270/trunk/subversion/bindings/swig/perl/native/t &&\n \tgit svn fetch -i r9270-t &&\n-\ttest `git rev-list r9270-t | wc -l` -eq 2 &&\n-\ttest \"`git ls-tree --name-only r9270-t~1`\" = \\\n-\t     \"`git ls-tree --name-only r9270-t`\"\n+\ttest $(git rev-list r9270-t | wc -l) -eq 2 &&\n+\ttest \"$(git ls-tree --name-only r9270-t~1)\" = \\\n+\t     \"$(git ls-tree --name-only r9270-t)\"\n \t'\n \n test_expect_success \"track initial change if it was only made to parent\" '\n@@ -152,11 +152,11 @@ test_expect_success \"track initial change if it was only made to parent\" '\n \tgit svn init --minimize-url -i r9270-d \\\n \t  \"$svnrepo\"/r9270/drunk/subversion/bindings/swig/perl/native/t &&\n \tgit svn fetch -i r9270-d &&\n-\ttest `git rev-list r9270-d | wc -l` -eq 3 &&\n-\ttest \"`git ls-tree --name-only r9270-t`\" = \\\n-\t     \"`git ls-tree --name-only r9270-d`\" &&\n-\ttest \"`git rev-parse r9270-t`\" = \\\n-\t     \"`git rev-parse r9270-d~1`\"\n+\ttest $(git rev-list r9270-d | wc -l) -eq 3 &&\n+\ttest \"$(git ls-tree --name-only r9270-t)\" = \\\n+\t     \"$(git ls-tree --name-only r9270-d)\" &&\n+\ttest \"$(git rev-parse r9270-t)\" = \\\n+\t     \"$(git rev-parse r9270-d~1)\"\n \t'\n \n test_expect_success \"follow-parent is atomic\" '\n@@ -193,19 +193,19 @@ test_expect_success \"follow-parent is atomic\" '\n \tgit svn fetch -i stunk &&\n \tgit svn init --minimize-url -i flunked \"$svnrepo\"/flunked &&\n \tgit svn fetch -i flunked &&\n-\ttest \"`git rev-parse --verify refs/remotes/flunk@18`\" \\\n-\t   = \"`git rev-parse --verify refs/remotes/stunk`\" &&\n-\ttest \"`git rev-parse --verify refs/remotes/flunk~1`\" \\\n-\t   = \"`git rev-parse --verify refs/remotes/stunk`\" &&\n-\ttest \"`git rev-parse --verify refs/remotes/flunked~1`\" \\\n-\t   = \"`git rev-parse --verify refs/remotes/stunk~1`\"\n+\ttest \"$(git rev-parse --verify refs/remotes/flunk@18)\" \\\n+\t   = \"$(git rev-parse --verify refs/remotes/stunk)\" &&\n+\ttest \"$(git rev-parse --verify refs/remotes/flunk~1)\" \\\n+\t   = \"$(git rev-parse --verify refs/remotes/stunk)\" &&\n+\ttest \"$(git rev-parse --verify refs/remotes/flunked~1)\" \\\n+\t   = \"$(git rev-parse --verify refs/remotes/stunk~1)\"\n \t'\n \n test_expect_success \"track multi-parent paths\" '\n \tsvn_cmd cp -m \"resurrect /glob\" \"$svnrepo\"/r9270 \"$svnrepo\"/glob &&\n \tgit svn multi-fetch &&\n-\ttest `git cat-file commit refs/remotes/glob | \\\n-\t       grep \"^parent \" | wc -l` -eq 2\n+\ttest $(git cat-file commit refs/remotes/glob | \\\n+\t       grep \"^parent \" | wc -l) -eq 2\n \t'\n \n test_expect_success \"multi-fetch continues to work\" \"\n-- \n2.5.0\n"},{"id":"275781","messageId":"1452595518-38149-5-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 04/10] t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:12Z","receivedAt":"2016-01-12T10:45:12Z","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/t9105-git-svn-commit-diff.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh\nindex 5d0afea..6ed5f74 100755\n--- a/t/t9105-git-svn-commit-diff.sh\n+++ b/t/t9105-git-svn-commit-diff.sh\n@@ -18,8 +18,8 @@ test_expect_success 'initialize repo' '\n \tgit commit -a -m \"another\"\n \t'\n \n-head=`git rev-parse --verify HEAD^0`\n-prev=`git rev-parse --verify HEAD^1`\n+head=$(git rev-parse --verify HEAD^0)\n+prev=$(git rev-parse --verify HEAD^1)\n \n # the internals of the commit-diff command are the same as the regular\n # commit, so only a basic test of functionality is needed since we've\n-- \n2.5.0\n"},{"id":"275785","messageId":"1452595518-38149-6-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 05/10] t9107-git-svn-migrate.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:13Z","receivedAt":"2016-01-12T10:45:13Z","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/t9107-git-svn-migrate.sh | 28 ++++++++++++++--------------\n 1 file changed, 14 insertions(+), 14 deletions(-)\n\ndiff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh\nindex 6e69fc4..155b8bf 100755\n--- a/t/t9107-git-svn-migrate.sh\n+++ b/t/t9107-git-svn-migrate.sh\n@@ -24,10 +24,10 @@ test_expect_success 'setup old-looking metadata' '\n \tgit update-ref -d refs/${remotes_git_svn} refs/${remotes_git_svn}\n \t'\n \n-head=`git rev-parse --verify refs/heads/git-svn-HEAD^0`\n+head=$(git rev-parse --verify refs/heads/git-svn-HEAD^0)\n test_expect_success 'git-svn-HEAD is a real HEAD' \"test -n '$head'\"\n \n-svnrepo_escaped=`echo $svnrepo | sed 's/ /%20/'`\n+svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/')\n \n test_expect_success 'initialize old-style (v0) git svn layout' '\n \tmkdir -p \"$GIT_DIR\"/git-svn/info \"$GIT_DIR\"/svn/info &&\n@@ -38,7 +38,7 @@ test_expect_success 'initialize old-style (v0) git svn layout' '\n \tgit rev-parse --verify refs/${remotes_git_svn}^0 &&\n \tgit rev-parse --verify refs/remotes/svn^0 &&\n \ttest \"$(git config --get svn-remote.svn.url)\" = \"$svnrepo_escaped\" &&\n-\ttest `git config --get svn-remote.svn.fetch` = \\\n+\ttest $(git config --get svn-remote.svn.fetch) = \\\n              \":refs/${remotes_git_svn}\"\n \t'\n \n@@ -46,10 +46,10 @@ test_expect_success 'initialize a multi-repository repo' '\n \tgit svn init \"$svnrepo\" -T trunk -t tags -b branches &&\n \tgit config --get-all svn-remote.svn.fetch > fetch.out &&\n \tgrep \"^trunk:refs/remotes/origin/trunk$\" fetch.out &&\n-\ttest -n \"`git config --get svn-remote.svn.branches \\\n-\t            \"^branches/\\*:refs/remotes/origin/\\*$\"`\" &&\n-\ttest -n \"`git config --get svn-remote.svn.tags \\\n-\t            \"^tags/\\*:refs/remotes/origin/tags/\\*$\"`\" &&\n+\ttest -n \"$(git config --get svn-remote.svn.branches \\\n+\t            \"^branches/\\*:refs/remotes/origin/\\*$\")\" &&\n+\ttest -n \"$(git config --get svn-remote.svn.tags \\\n+\t            \"^tags/\\*:refs/remotes/origin/tags/\\*$\")\" &&\n \tgit config --unset svn-remote.svn.branches \\\n \t                        \"^branches/\\*:refs/remotes/origin/\\*$\" &&\n \tgit config --unset svn-remote.svn.tags \\\n@@ -75,28 +75,28 @@ test_expect_success 'multi-fetch works on partial urls + paths' \"\n \tfor i in trunk a b tags/0.1 tags/0.2 tags/0.3; do\n \t\tgit rev-parse --verify refs/remotes/origin/\\$i^0 >> refs.out || exit 1;\n \t    done &&\n-\ttest -z \\\"\\`sort < refs.out | uniq -d\\`\\\" &&\n+\ttest -z \\\"\\$(sort < refs.out | uniq -d)\\\" &&\n \tfor i in trunk a b tags/0.1 tags/0.2 tags/0.3; do\n \t  for j in trunk a b tags/0.1 tags/0.2 tags/0.3; do\n \t\tif test \\$j != \\$i; then continue; fi\n-\t    test -z \\\"\\`git diff refs/remotes/origin/\\$i \\\n-\t                         refs/remotes/origin/\\$j\\`\\\" ||exit 1; done; done\n+\t    test -z \\\"\\$(git diff refs/remotes/origin/\\$i \\\n+\t                         refs/remotes/origin/\\$j)\\\" ||exit 1; done; done\n \t\"\n \n test_expect_success 'migrate --minimize on old inited layout' '\n \tgit config --unset-all svn-remote.svn.fetch &&\n \tgit config --unset-all svn-remote.svn.url &&\n \trm -rf \"$GIT_DIR\"/svn &&\n-\tfor i in `cat fetch.out`; do\n-\t\tpath=`expr $i : \"\\([^:]*\\):.*$\"`\n-\t\tref=`expr $i : \"[^:]*:\\(refs/remotes/.*\\)$\"`\n+\tfor i in $(cat fetch.out); do\n+\t\tpath=$(expr $i : \"\\([^:]*\\):.*$\")\n+\t\tref=$(expr $i : \"[^:]*:\\(refs/remotes/.*\\)$\")\n \t\tif test -z \"$ref\"; then continue; fi\n \t\tif test -n \"$path\"; then path=\"/$path\"; fi\n \t\t( mkdir -p \"$GIT_DIR\"/svn/$ref/info/ &&\n \t\techo \"$svnrepo\"$path > \"$GIT_DIR\"/svn/$ref/info/url ) || exit 1;\n \tdone &&\n \tgit svn migrate --minimize &&\n-\ttest -z \"`git config -l | grep \"^svn-remote\\.git-svn\\.\"`\" &&\n+\ttest -z \"$(git config -l | grep \"^svn-remote\\.git-svn\\.\")\" &&\n \tgit config --get-all svn-remote.svn.fetch > fetch.out &&\n \tgrep \"^trunk:refs/remotes/origin/trunk$\" fetch.out &&\n \tgrep \"^branches/a:refs/remotes/origin/a$\" fetch.out &&\n-- \n2.5.0\n"},{"id":"275786","messageId":"1452595518-38149-7-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 06/10] t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:14Z","receivedAt":"2016-01-12T10:45:14Z","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/t9108-git-svn-glob.sh | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/t/t9108-git-svn-glob.sh b/t/t9108-git-svn-glob.sh\nindex d732d31..a526d60 100755\n--- a/t/t9108-git-svn-glob.sh\n+++ b/t/t9108-git-svn-glob.sh\n@@ -50,10 +50,10 @@ test_expect_success 'test refspec globbing' '\n \tgit log --pretty=oneline refs/remotes/tags/end | \\\n \t    sed -e \"s/^.\\{41\\}//\" > output.end &&\n \ttest_cmp expect.end output.end &&\n-\ttest \"`git rev-parse refs/remotes/tags/end~1`\" = \\\n-\t\t\"`git rev-parse refs/remotes/branches/start`\" &&\n-\ttest \"`git rev-parse refs/remotes/branches/start~2`\" = \\\n-\t\t\"`git rev-parse refs/remotes/trunk`\" &&\n+\ttest \"$(git rev-parse refs/remotes/tags/end~1)\" = \\\n+\t\t\"$(git rev-parse refs/remotes/branches/start)\" &&\n+\ttest \"$(git rev-parse refs/remotes/branches/start~2)\" = \\\n+\t\t\"$(git rev-parse refs/remotes/trunk)\" &&\n \ttest_must_fail git rev-parse refs/remotes/tags/end@3\n \t'\n \n@@ -75,12 +75,12 @@ test_expect_success 'test left-hand-side only globbing' '\n \t\tsvn_cmd commit -m \"try to try\"\n \t) &&\n \tgit svn fetch two &&\n-\ttest `git rev-list refs/remotes/two/tags/end | wc -l` -eq 6 &&\n-\ttest `git rev-list refs/remotes/two/branches/start | wc -l` -eq 3 &&\n-\ttest `git rev-parse refs/remotes/two/branches/start~2` = \\\n-\t     `git rev-parse refs/remotes/two/trunk` &&\n-\ttest `git rev-parse refs/remotes/two/tags/end~3` = \\\n-\t     `git rev-parse refs/remotes/two/branches/start` &&\n+\ttest $(git rev-list refs/remotes/two/tags/end | wc -l) -eq 6 &&\n+\ttest $(git rev-list refs/remotes/two/branches/start | wc -l) -eq 3 &&\n+\ttest $(git rev-parse refs/remotes/two/branches/start~2) = \\\n+\t     $(git rev-parse refs/remotes/two/trunk) &&\n+\ttest $(git rev-parse refs/remotes/two/tags/end~3) = \\\n+\t     $(git rev-parse refs/remotes/two/branches/start) &&\n \tgit log --pretty=oneline refs/remotes/two/tags/end | \\\n \t    sed -e \"s/^.\\{41\\}//\" > output.two &&\n \ttest_cmp expect.two output.two\n-- \n2.5.0\n"},{"id":"275782","messageId":"1452595518-38149-8-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 07/10] t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:15Z","receivedAt":"2016-01-12T10:45:15Z","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/t9109-git-svn-multi-glob.sh | 32 ++++++++++++++++----------------\n 1 file changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t9109-git-svn-multi-glob.sh b/t/t9109-git-svn-multi-glob.sh\nindex c318f9f..f36b749 100755\n--- a/t/t9109-git-svn-multi-glob.sh\n+++ b/t/t9109-git-svn-multi-glob.sh\n@@ -50,10 +50,10 @@ test_expect_success 'test refspec globbing' '\n \tgit log --pretty=oneline refs/remotes/tags/end | \\\n \t    sed -e \"s/^.\\{41\\}//\" > output.end &&\n \ttest_cmp expect.end output.end &&\n-\ttest \"`git rev-parse refs/remotes/tags/end~1`\" = \\\n-\t\t\"`git rev-parse refs/remotes/branches/v1/start`\" &&\n-\ttest \"`git rev-parse refs/remotes/branches/v1/start~2`\" = \\\n-\t\t\"`git rev-parse refs/remotes/trunk`\" &&\n+\ttest \"$(git rev-parse refs/remotes/tags/end~1)\" = \\\n+\t\t\"$(git rev-parse refs/remotes/branches/v1/start)\" &&\n+\ttest \"$(git rev-parse refs/remotes/branches/v1/start~2)\" = \\\n+\t\t\"$(git rev-parse refs/remotes/trunk)\" &&\n \ttest_must_fail git rev-parse refs/remotes/tags/end@3\n \t'\n \n@@ -75,12 +75,12 @@ test_expect_success 'test left-hand-side only globbing' '\n \t\tsvn_cmd commit -m \"try to try\"\n \t) &&\n \tgit svn fetch two &&\n-\ttest `git rev-list refs/remotes/two/tags/end | wc -l` -eq 6 &&\n-\ttest `git rev-list refs/remotes/two/branches/v1/start | wc -l` -eq 3 &&\n-\ttest `git rev-parse refs/remotes/two/branches/v1/start~2` = \\\n-\t     `git rev-parse refs/remotes/two/trunk` &&\n-\ttest `git rev-parse refs/remotes/two/tags/end~3` = \\\n-\t     `git rev-parse refs/remotes/two/branches/v1/start` &&\n+\ttest $(git rev-list refs/remotes/two/tags/end | wc -l) -eq 6 &&\n+\ttest $(git rev-list refs/remotes/two/branches/v1/start | wc -l) -eq 3 &&\n+\ttest $(git rev-parse refs/remotes/two/branches/v1/start~2) = \\\n+\t     $(git rev-parse refs/remotes/two/trunk) &&\n+\ttest $(git rev-parse refs/remotes/two/tags/end~3) = \\\n+\t     $(git rev-parse refs/remotes/two/branches/v1/start) &&\n \tgit log --pretty=oneline refs/remotes/two/tags/end | \\\n \t    sed -e \"s/^.\\{41\\}//\" > output.two &&\n \ttest_cmp expect.two output.two\n@@ -124,12 +124,12 @@ test_expect_success 'test another branch' '\n \tgit config --add svn-remote.four.tags \\\n \t                 \"tags/*:refs/remotes/four/tags/*\" &&\n \tgit svn fetch four &&\n-\ttest `git rev-list refs/remotes/four/tags/next | wc -l` -eq 5 &&\n-\ttest `git rev-list refs/remotes/four/branches/v2/start | wc -l` -eq 3 &&\n-\ttest `git rev-parse refs/remotes/four/branches/v2/start~2` = \\\n-\t     `git rev-parse refs/remotes/four/trunk` &&\n-\ttest `git rev-parse refs/remotes/four/tags/next~2` = \\\n-\t     `git rev-parse refs/remotes/four/branches/v2/start` &&\n+\ttest $(git rev-list refs/remotes/four/tags/next | wc -l) -eq 5 &&\n+\ttest $(git rev-list refs/remotes/four/branches/v2/start | wc -l) -eq 3 &&\n+\ttest $(git rev-parse refs/remotes/four/branches/v2/start~2) = \\\n+\t     $(git rev-parse refs/remotes/four/trunk) &&\n+\ttest $(git rev-parse refs/remotes/four/tags/next~2) = \\\n+\t     $(git rev-parse refs/remotes/four/branches/v2/start) &&\n \tgit log --pretty=oneline refs/remotes/four/tags/next | \\\n \t    sed -e \"s/^.\\{41\\}//\" > output.four &&\n \ttest_cmp expect.four output.four\n-- \n2.5.0\n"},{"id":"275787","messageId":"1452595518-38149-9-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 08/10] t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:16Z","receivedAt":"2016-01-12T10:45:16Z","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/t9110-git-svn-use-svm-props.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9110-git-svn-use-svm-props.sh b/t/t9110-git-svn-use-svm-props.sh\nindex a06e4c5..29fbdfd 100755\n--- a/t/t9110-git-svn-use-svm-props.sh\n+++ b/t/t9110-git-svn-use-svm-props.sh\n@@ -51,7 +51,7 @@ test_expect_success 'verify metadata for /dir' \"\n \n test_expect_success 'find commit based on SVN revision number' \"\n         git svn find-rev r12 |\n-\t    grep `git rev-parse HEAD`\n+\t    grep $(git rev-parse HEAD)\n         \"\n \n test_expect_success 'empty rebase' \"\n-- \n2.5.0\n"},{"id":"275788","messageId":"1452595518-38149-10-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 09/10] t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:17Z","receivedAt":"2016-01-12T10:45:17Z","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/t9114-git-svn-dcommit-merge.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t9114-git-svn-dcommit-merge.sh b/t/t9114-git-svn-dcommit-merge.sh\nindex fb41876..a3d3882 100755\n--- a/t/t9114-git-svn-dcommit-merge.sh\n+++ b/t/t9114-git-svn-dcommit-merge.sh\n@@ -68,8 +68,8 @@ test_expect_success 'setup git mirror and merge' '\n test_debug 'gitk --all & sleep 1'\n \n test_expect_success 'verify pre-merge ancestry' \"\n-\ttest x\\`git rev-parse --verify refs/heads/svn^2\\` = \\\n-\t     x\\`git rev-parse --verify refs/heads/merge\\` &&\n+\ttest x\\$(git rev-parse --verify refs/heads/svn^2) = \\\n+\t     x\\$(git rev-parse --verify refs/heads/merge) &&\n \tgit cat-file commit refs/heads/svn^ | grep '^friend$'\n \t\"\n \n@@ -80,10 +80,10 @@ test_expect_success 'git svn dcommit merges' \"\n test_debug 'gitk --all & sleep 1'\n \n test_expect_success 'verify post-merge ancestry' \"\n-\ttest x\\`git rev-parse --verify refs/heads/svn\\` = \\\n-\t     x\\`git rev-parse --verify refs/remotes/origin/trunk \\` &&\n-\ttest x\\`git rev-parse --verify refs/heads/svn^2\\` = \\\n-\t     x\\`git rev-parse --verify refs/heads/merge\\` &&\n+\ttest x\\$(git rev-parse --verify refs/heads/svn) = \\\n+\t     x\\$(git rev-parse --verify refs/remotes/origin/trunk) &&\n+\ttest x\\$(git rev-parse --verify refs/heads/svn^2) = \\\n+\t     x\\$(git rev-parse --verify refs/heads/merge) &&\n \tgit cat-file commit refs/heads/svn^ | grep '^friend$'\n \t\"\n \n-- \n2.5.0\n"},{"id":"275789","messageId":"1452595518-38149-11-git-send-email-gitter.spiros@gmail.com","threadId":"41171","inReplyTo":"1452595518-38149-1-git-send-email-gitter.spiros@gmail.com","subject":"[PATCH 10/10] t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for command substitution","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-01-12T10:45:18Z","receivedAt":"2016-01-12T10:45:18Z","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/t9118-git-svn-funky-branch-names.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh\nindex ed4d136..a221915 100755\n--- a/t/t9118-git-svn-funky-branch-names.sh\n+++ b/t/t9118-git-svn-funky-branch-names.sh\n@@ -35,7 +35,7 @@ test_expect_success 'setup svnrepo' '\n # SVN 1.7 will truncate \"not-a%40{0]\" to just \"not-a\".\n # Look at what SVN wound up naming the branch and use that.\n # Be sure to escape the @ if it shows up.\n-non_reflog=`svn_cmd ls \"$svnrepo/pr ject/branches\" | grep not-a | sed 's/\\///' | sed 's/@/%40/'`\n+non_reflog=$(svn_cmd ls \"$svnrepo/pr ject/branches\" | grep not-a | sed 's/\\///' | sed 's/@/%40/')\n \n test_expect_success 'test clone with funky branch names' '\n \tgit svn clone -s \"$svnrepo/pr ject\" project &&\n-- \n2.5.0\n"},{"id":"275830","messageId":"xmqqd1t6tvut.fsf@gitster.mtv.corp.google.com","threadId":"41171","inReplyTo":"1452595518-38149-2-git-send-email-gitter.spiros@gmail.com","subject":"Re: [PATCH 01/10] t9100-git-svn-basic.sh: use the $( ... ) construct for command substitution","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-12T19:56:42Z","receivedAt":"2016-01-12T19:56:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elia Pinto <gitter.spiros@gmail.com> writes:\n\n> @@ -265,18 +265,18 @@ test_expect_success 'able to dcommit to a subdirectory' \"\n>  \tgit update-index --add d &&\n>  \tgit commit -m '/bar/d should be in the log' &&\n>  \tgit svn dcommit -i bar &&\n> -\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\" &&\n> +\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\" &&\n\nThis is entirely outside the scope of this series, but we may want\nto see if it makes it easier to read and maintain to turn executable\npart of test_expect_success that is double-quoted to use single\nquotes around it instead for many of our tests.\n\nThis one is a prime example of it.  I do not think the executable\npart is getting _any_ benefit from being quoted inside double-quote\npair.  All the single quoted strings it uses in the script commands\n(e.g. the argument to \"git commit -m\") can equally be quoted with\ndouble quotes safely, and there is no $variable reference that it\nwants to refer to the value of the $variable when the command line\nof test_expect_success itself is constructed.\n\n>  \tmkdir newdir &&\n>  \techo new > newdir/dir &&\n>  \tgit update-index --add newdir/dir &&\n>  \tgit commit -m 'add a new directory' &&\n>  \tgit svn dcommit -i bar &&\n> -\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\" &&\n> +\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\" &&\n>  \techo foo >> newdir/dir &&\n>  \tgit update-index newdir/dir &&\n>  \tgit commit -m 'modify a file in new directory' &&\n>  \tgit svn dcommit -i bar &&\n> -\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\"\n> +\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\"\n>  \t\"\n>  \n>  test_expect_success 'dcommit should not fail with a touched file' '\n> @@ -295,7 +295,7 @@ test_expect_success 'able to set-tree to a subdirectory' \"\n>  \tgit update-index d &&\n>  \tgit commit -m 'update /bar/d' &&\n>  \tgit svn set-tree -i bar HEAD &&\n> -\ttest -z \\\"\\`git diff refs/heads/my-bar refs/remotes/bar\\`\\\"\n> +\ttest -z \\\"\\$(git diff refs/heads/my-bar refs/remotes/bar)\\\"\n>  \t\"\n\nLikewise.\n"}]}