t/t5538-push-shallow.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 4, 2016 at 10:10 UTC
752f505cf3e993003a854ecb1b6c08af8e40450e
1 file changed
+2
-2
t/t5538-push-shallow.sh
+2
-2
@@ -104,7 +104,7 @@ EOF
104
'
105
106
test_expect_success 'push from full to shallow' '
107
- ! git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` &&
107
+ ! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) &&
108
commit 1 &&
109
git push shallow2/.git +master:refs/remotes/top/master &&
110
(
@@ -117,7 +117,7 @@ test_expect_success 'push from full to shallow' '
117
3
118
EOF
119
test_cmp expect actual &&
120
- git cat-file blob `echo 1|git hash-object --stdin` >/dev/null
120
+ git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null
121
)
122
'
123
test_done