t/t5550-http-fetch-dumb.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 4, 2016 at 10:10 UTC bacb1c016d9187f08afc38bd3b16db3ae004dea6
1 file changed +4 -4
t/t5550-http-fetch-dumb.sh
+4 -4
@@ -132,7 +132,7 @@ test_expect_success 'fetch packed objects' '
132 test_expect_success 'fetch notices corrupt pack' '
133 cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
134 (cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
135 - p=`ls objects/pack/pack-*.pack` &&
135 + p=$(ls objects/pack/pack-*.pack) &&
136 chmod u+w $p &&
137 printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
138 ) &&
@@ -140,14 +140,14 @@ test_expect_success 'fetch notices corrupt pack' '
140 (cd repo_bad1.git &&
141 git --bare init &&
142 test_must_fail git --bare fetch $HTTPD_URL/dumb/repo_bad1.git &&
143 - test 0 = `ls objects/pack/pack-*.pack | wc -l`
143 + test 0 = $(ls objects/pack/pack-*.pack | wc -l)
144 )
145 '
146
147 test_expect_success 'fetch notices corrupt idx' '
148 cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
149 (cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
150 - p=`ls objects/pack/pack-*.idx` &&
150 + p=$(ls objects/pack/pack-*.idx) &&
151 chmod u+w $p &&
152 printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
153 ) &&
@@ -155,7 +155,7 @@ test_expect_success 'fetch notices corrupt idx' '
155 (cd repo_bad2.git &&
156 git --bare init &&
157 test_must_fail git --bare fetch $HTTPD_URL/dumb/repo_bad2.git &&
158 - test 0 = `ls objects/pack | wc -l`
158 + test 0 = $(ls objects/pack | wc -l)
159 )
160 '
161