diff options
author | Elia Pinto <gitter.spiros@gmail.com> | 2015-12-22 16:27:44 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-12-28 13:36:22 -0800 |
commit | 8db3294142a6de4f82ea1b9c7a7615ec9c7e30fd (patch) | |
tree | 10291cc4b3a7a618a3a1fc2918b2ef275194bb99 /t/t3101-ls-tree-dirname.sh | |
parent | 10c1e855398c997a06d48f2b0de3fa1ad0ab4d36 (diff) | |
download | git-8db3294142a6de4f82ea1b9c7a7615ec9c7e30fd.tar.gz git-8db3294142a6de4f82ea1b9c7a7615ec9c7e30fd.tar.xz |
t/t3101-ls-tree-dirname.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>
Diffstat (limited to 't/t3101-ls-tree-dirname.sh')
-rwxr-xr-x | t/t3101-ls-tree-dirname.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh index 026f9f89d..425d85893 100755 --- a/t/t3101-ls-tree-dirname.sh +++ b/t/t3101-ls-tree-dirname.sh @@ -35,7 +35,7 @@ test_expect_success 'setup' ' echo 222 >path3/2.txt && find *.txt path* \( -type f -o -type l \) -print | xargs git update-index --add && - tree=`git write-tree` && + tree=$(git write-tree) && echo $tree ' |