t/t1511-rev-parse-caret.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> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elia Pinto committed Dec 22, 2015 at 16:05 UTC 9fe281b342ec630ff53710d799c3aa6a26f59fa4
1 file changed +2 -2
t/t1511-rev-parse-caret.sh
+2 -2
@@ -6,11 +6,11 @@ test_description='tests for ref^{stuff}'
6
7 test_expect_success 'setup' '
8 echo blob >a-blob &&
9 - git tag -a -m blob blob-tag `git hash-object -w a-blob` &&
9 + git tag -a -m blob blob-tag $(git hash-object -w a-blob) &&
10 mkdir a-tree &&
11 echo moreblobs >a-tree/another-blob &&
12 git add . &&
13 - TREE_SHA1=`git write-tree` &&
13 + TREE_SHA1=$(git write-tree) &&
14 git tag -a -m tree tree-tag "$TREE_SHA1" &&
15 git commit -m Initial &&
16 git tag -a -m commit commit-tag &&