t4116-apply-reverse.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 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elia Pinto committed Apr 30, 2014 at 09:23 UTC 991a9c3af984eb28b31f8642c97fd9ddb29cadc4
1 file changed +6 -6
t/t4116-apply-reverse.sh
+6 -6
@@ -30,10 +30,10 @@ test_expect_success setup '
30
31 test_expect_success 'apply in forward' '
32
33 - T0=`git rev-parse "second^{tree}"` &&
33 + T0=$(git rev-parse "second^{tree}") &&
34 git reset --hard initial &&
35 git apply --index --binary patch &&
36 - T1=`git write-tree` &&
36 + T1=$(git write-tree) &&
37 test "$T0" = "$T1"
38 '
39
@@ -62,22 +62,22 @@ test_expect_success 'setup separate repository lacking postimage' '
62
63 test_expect_success 'apply in forward without postimage' '
64
65 - T0=`git rev-parse "second^{tree}"` &&
65 + T0=$(git rev-parse "second^{tree}") &&
66 (
67 cd initial &&
68 git apply --index --binary ../patch &&
69 - T1=`git write-tree` &&
69 + T1=$(git write-tree) &&
70 test "$T0" = "$T1"
71 )
72 '
73
74 test_expect_success 'apply in reverse without postimage' '
75
76 - T0=`git rev-parse "initial^{tree}"` &&
76 + T0=$(git rev-parse "initial^{tree}") &&
77 (
78 cd second &&
79 git apply --index --binary --reverse ../patch &&
80 - T1=`git write-tree` &&
80 + T1=$(git write-tree) &&
81 test "$T0" = "$T1"
82 )
83 '