git-pull.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 23, 2014 at 06:43 UTC
eadf619cd434135bdfa598566376b3e3dbf9f2b5
1 file changed
+1
-1
git-pull.sh
+1
-1
@@ -108,7 +108,7 @@ do
108
-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
109
case "$#,$1" in
110
*,*=*)
111
- strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
111
+ strategy=$(expr "z$1" : 'z-[^=]*=\(.*\)') ;;
112
1,*)
113
usage ;;
114
*)