git-rebase--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 23, 2014 at 06:43 UTC f257482c9ccbb27e70f190da6a8152469b0fed1b
1 file changed +2 -2
git-rebase--merge.sh
+2 -2
@@ -24,7 +24,7 @@ continue_merge () {
24 die "$resolvemsg"
25 fi
26
27 - cmt=`cat "$state_dir/current"`
27 + cmt=$(cat "$state_dir/current")
28 if ! git diff-index --quiet --ignore-submodules HEAD --
29 then
30 if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} --no-verify -C "$cmt"
@@ -132,7 +132,7 @@ echo "$onto_name" > "$state_dir/onto_name"
132 write_basic_state
133
134 msgnum=0
135 -for cmt in `git rev-list --reverse --no-merges "$revisions"`
135 +for cmt in $(git rev-list --reverse --no-merges "$revisions")
136 do
137 msgnum=$(($msgnum + 1))
138 echo "$cmt" > "$state_dir/cmt.$msgnum"