t/t5900-repo-selection.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 7, 2016 at 14:51 UTC 14a771eee9a0ddcab08da42580e0f32d0e89b284
1 file changed +1 -1
t/t5900-repo-selection.sh
+1 -1
@@ -15,7 +15,7 @@ make_tree() {
15 make_bare() {
16 git init --bare "$1" &&
17 (cd "$1" &&
18 - tree=`git hash-object -w -t tree /dev/null` &&
18 + tree=$(git hash-object -w -t tree /dev/null) &&
19 commit=$(echo "$1" | git commit-tree $tree) &&
20 git update-ref HEAD $commit
21 )