t/t7003-filter-branch.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 7, 2016 at 14:51 UTC 994851943e0d8bd8c8c11afed6ea2d12500bda06
1 file changed +3 -3
t/t7003-filter-branch.sh
+3 -3
@@ -387,7 +387,7 @@ test_expect_success 'setup submodule' '
387 git branch original HEAD
388 '
389
390 -orig_head=`git show-ref --hash --head HEAD`
390 +orig_head=$(git show-ref --hash --head HEAD)
391
392 test_expect_success 'rewrite submodule with another content' '
393 git filter-branch --tree-filter "test -d submod && {
@@ -396,7 +396,7 @@ test_expect_success 'rewrite submodule with another content' '
396 mkdir submod &&
397 : > submod/file
398 } || :" HEAD &&
399 - test $orig_head != `git show-ref --hash --head HEAD`
399 + test $orig_head != $(git show-ref --hash --head HEAD)
400 '
401
402 test_expect_success 'replace submodule revision' '
@@ -405,7 +405,7 @@ test_expect_success 'replace submodule revision' '
405 "if git ls-files --error-unmatch -- submod > /dev/null 2>&1
406 then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod
407 fi" HEAD &&
408 - test $orig_head != `git show-ref --hash --head HEAD`
408 + test $orig_head != $(git show-ref --hash --head HEAD)
409 '
410
411 test_expect_success 'filter commit message without trailing newline' '