path: root/t/
diff options
authorElia Pinto <>2016-01-07 13:51:47 (GMT)
committerJunio C Hamano <>2016-01-07 21:58:29 (GMT)
commit36b4697fdcc1acbe3cda7d67f6f371ebe9d4f018 (patch)
tree3dc9e8d7c5621495a14709bae6099aef4410b7bd /t/
parent7b8c0b53c320b03cb641f4e4c7b12049a36bd84e (diff)
t/ 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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 2 insertions, 2 deletions
diff --git a/t/ b/t/
index 7b56081..51dd2b4 100755
--- a/t/
+++ b/t/
@@ -156,11 +156,11 @@ test_expect_success "Michael Cassar's test case" '
echo b > partA/outline.txt &&
echo c > papers/unsorted/_another &&
git add papers partA &&
- T1=`git write-tree` &&
+ T1=$(git write-tree) &&
git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
- T=`git write-tree` &&
+ T=$(git write-tree) &&
git ls-tree -r $T | verbose grep partA/outline.txt