t1000-read-tree-m-3way.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
86e30432177470f50be4207da2cc0422f86a24f7
1 file changed
+2
-2
t/t1000-read-tree-m-3way.sh
+2
-2
@@ -519,10 +519,10 @@ test_expect_success \
519
'rm -f .git/index F16 &&
520
echo F16 >F16 &&
521
git update-index --add F16 &&
522
- tree0=`git write-tree` &&
522
+ tree0=$(git write-tree) &&
523
echo E16 >F16 &&
524
git update-index F16 &&
525
- tree1=`git write-tree` &&
525
+ tree1=$(git write-tree) &&
526
read_tree_must_succeed -m $tree0 $tree1 $tree1 $tree0 &&
527
git ls-files --stage'
528