From: Elia Pinto Date: Thu, 7 Jan 2016 13:51:41 +0000 (+0100) Subject: t/t5900-repo-selection.sh: use the $( ... ) construct for command substitution X-Git-Tag: v2.8.0-rc0~103^2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14a771eee9a0ddcab08da42580e0f32d0e89b284;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t5900-repo-selection.sh b/t/t5900-repo-selection.sh index 3d5b418bb4..14e59c5b3e 100755 --- a/t/t5900-repo-selection.sh +++ b/t/t5900-repo-selection.sh @@ -15,7 +15,7 @@ make_tree() { make_bare() { git init --bare "$1" && (cd "$1" && - tree=`git hash-object -w -t tree /dev/null` && + tree=$(git hash-object -w -t tree /dev/null) && commit=$(echo "$1" | git commit-tree $tree) && git update-ref HEAD $commit )