Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 1b3cddd

Browse files
devzero2000gitster
authored andcommitted
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 <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3e86741 commit 1b3cddd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/examples/git-ls-remote.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ tmpdir=$tmp-d
5555
case "$peek_repo" in
5656
http://* | https://* | ftp://* )
5757
if [ -n "$GIT_SSL_NO_VERIFY" -o \
58-
"`git config --bool http.sslVerify`" = false ]; then
58+
"$(git config --bool http.sslVerify)" = false ]; then
5959
curl_extra_args="-k"
6060
fi
6161
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
62-
"`git config --bool http.noEPSV`" = true ]; then
62+
"$(git config --bool http.noEPSV)" = true ]; then
6363
curl_extra_args="${curl_extra_args} --disable-epsv"
6464
fi
6565
curl -nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||

0 commit comments

Comments
 (0)