git-merge.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 34da37cc4230affae93483f6c51fca6beb6e6c64
1 file changed +2 -2
contrib/examples/git-merge.sh
+2 -2
@@ -341,7 +341,7 @@ case "$use_strategies" in
341 '')
342 case "$#" in
343 1)
344 - var="`git config --get pull.twohead`"
344 + var="$(git config --get pull.twohead)"
345 if test -n "$var"
346 then
347 use_strategies="$var"
@@ -349,7 +349,7 @@ case "$use_strategies" in
349 use_strategies="$default_twohead_strategies"
350 fi ;;
351 *)
352 - var="`git config --get pull.octopus`"
352 + var="$(git config --get pull.octopus)"
353 if test -n "$var"
354 then
355 use_strategies="$var"