t/t7406-submodule-update.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 perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elia Pinto committed Jan 8, 2016 at 12:06 UTC 848351b236264631f456fce35c384f892430d3f5
1 file changed +2 -2
t/t7406-submodule-update.sh
+2 -2
@@ -14,8 +14,8 @@ submodule and "git submodule update --rebase/--merge" does not detach the HEAD.
14
15 compare_head()
16 {
17 - sha_master=`git rev-list --max-count=1 master`
18 - sha_head=`git rev-list --max-count=1 HEAD`
17 + sha_master=$(git rev-list --max-count=1 master)
18 + sha_head=$(git rev-list --max-count=1 HEAD)
19
20 test "$sha_master" = "$sha_head"
21 }