t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elia Pinto committed Jan 12, 2016 at 10:45 UTC 38e947660b2bb09e035f91b682b7011c2808052e
1 file changed +10 -10
t/t9108-git-svn-glob.sh
+10 -10
@@ -50,10 +50,10 @@ test_expect_success 'test refspec globbing' '
50 git log --pretty=oneline refs/remotes/tags/end | \
51 sed -e "s/^.\{41\}//" > output.end &&
52 test_cmp expect.end output.end &&
53 - test "`git rev-parse refs/remotes/tags/end~1`" = \
54 - "`git rev-parse refs/remotes/branches/start`" &&
55 - test "`git rev-parse refs/remotes/branches/start~2`" = \
56 - "`git rev-parse refs/remotes/trunk`" &&
53 + test "$(git rev-parse refs/remotes/tags/end~1)" = \
54 + "$(git rev-parse refs/remotes/branches/start)" &&
55 + test "$(git rev-parse refs/remotes/branches/start~2)" = \
56 + "$(git rev-parse refs/remotes/trunk)" &&
57 test_must_fail git rev-parse refs/remotes/tags/end@3
58 '
59
@@ -75,12 +75,12 @@ test_expect_success 'test left-hand-side only globbing' '
75 svn_cmd commit -m "try to try"
76 ) &&
77 git svn fetch two &&
78 - test `git rev-list refs/remotes/two/tags/end | wc -l` -eq 6 &&
79 - test `git rev-list refs/remotes/two/branches/start | wc -l` -eq 3 &&
80 - test `git rev-parse refs/remotes/two/branches/start~2` = \
81 - `git rev-parse refs/remotes/two/trunk` &&
82 - test `git rev-parse refs/remotes/two/tags/end~3` = \
83 - `git rev-parse refs/remotes/two/branches/start` &&
78 + test $(git rev-list refs/remotes/two/tags/end | wc -l) -eq 6 &&
79 + test $(git rev-list refs/remotes/two/branches/start | wc -l) -eq 3 &&
80 + test $(git rev-parse refs/remotes/two/branches/start~2) = \
81 + $(git rev-parse refs/remotes/two/trunk) &&
82 + test $(git rev-parse refs/remotes/two/tags/end~3) = \
83 + $(git rev-parse refs/remotes/two/branches/start) &&
84 git log --pretty=oneline refs/remotes/two/tags/end | \
85 sed -e "s/^.\{41\}//" > output.two &&
86 test_cmp expect.two output.two