Skip to content

Commit 86e3043

Browse files
devzero2000gitster
authored andcommitted
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 <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dd64267 commit 86e3043

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t1000-read-tree-m-3way.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,10 @@ test_expect_success \
519519
'rm -f .git/index F16 &&
520520
echo F16 >F16 &&
521521
git update-index --add F16 &&
522-
tree0=`git write-tree` &&
522+
tree0=$(git write-tree) &&
523523
echo E16 >F16 &&
524524
git update-index F16 &&
525-
tree1=`git write-tree` &&
525+
tree1=$(git write-tree) &&
526526
read_tree_must_succeed -m $tree0 $tree1 $tree1 $tree0 &&
527527
git ls-files --stage'
528528

0 commit comments

Comments
 (0)