t4013-diff-various.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:22 UTC 4ff03347ec945542e288a6a020bdd8153c915592
1 file changed +3 -3
t/t4013-diff-various.sh
+3 -3
@@ -107,14 +107,14 @@ test_expect_success setup '
107 +*++ [initial] Initial
108 EOF
109
110 -V=`git version | sed -e 's/^git version //' -e 's/\./\\./g'`
110 +V=$(git version | sed -e 's/^git version //' -e 's/\./\\./g')
111 while read cmd
112 do
113 case "$cmd" in
114 '' | '#'*) continue ;;
115 esac
116 - test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
117 - pfx=`printf "%04d" $test_count`
116 + test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
117 + pfx=$(printf "%04d" $test_count)
118 expect="$TEST_DIRECTORY/t4013/diff.$test"
119 actual="$pfx-diff.$test"
120