t0010-racy-git.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 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Apr 28, 2014 at 05:57 UTC
8fc5593c53218d19c7a0bac34debeaf6328e4f62
1 file changed
+2
-2
t/t0010-racy-git.sh
+2
-2
@@ -14,7 +14,7 @@ do
14
git update-index --add infocom
15
echo xyzzy >infocom
16
17
- files=`git diff-files -p`
17
+ files=$(git diff-files -p)
18
test_expect_success \
19
"Racy GIT trial #$trial part A" \
20
'test "" != "$files"'
@@ -23,7 +23,7 @@ do
23
echo xyzzy >cornerstone
24
git update-index --add cornerstone
25
26
- files=`git diff-files -p`
26
+ files=$(git diff-files -p)
27
test_expect_success \
28
"Racy GIT trial #$trial part B" \
29
'test "" != "$files"'