git-ls-remote.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 16, 2014 at 10:29 UTC 1b3cddd28834ef7c32f2049054c9179c68a381f6
1 file changed +2 -2
contrib/examples/git-ls-remote.sh
+2 -2
@@ -55,11 +55,11 @@ tmpdir=$tmp-d
55 case "$peek_repo" in
56 http://* | https://* | ftp://* )
57 if [ -n "$GIT_SSL_NO_VERIFY" -o \
58 - "`git config --bool http.sslVerify`" = false ]; then
58 + "$(git config --bool http.sslVerify)" = false ]; then
59 curl_extra_args="-k"
60 fi
61 if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
62 - "`git config --bool http.noEPSV`" = true ]; then
62 + "$(git config --bool http.noEPSV)" = true ]; then
63 curl_extra_args="${curl_extra_args} --disable-epsv"
64 fi
65 curl -nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||