t/t7003-filter-branch.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>
This commit is contained in:
Elia Pinto 2016-01-07 14:51:48 +01:00 коммит произвёл Junio C Hamano
Родитель 36b4697fdc
Коммит 994851943e
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -387,7 +387,7 @@ test_expect_success 'setup submodule' '
git branch original HEAD
'
orig_head=`git show-ref --hash --head HEAD`
orig_head=$(git show-ref --hash --head HEAD)
test_expect_success 'rewrite submodule with another content' '
git filter-branch --tree-filter "test -d submod && {
@ -396,7 +396,7 @@ test_expect_success 'rewrite submodule with another content' '
mkdir submod &&
: > submod/file
} || :" HEAD &&
test $orig_head != `git show-ref --hash --head HEAD`
test $orig_head != $(git show-ref --hash --head HEAD)
'
test_expect_success 'replace submodule revision' '
@ -405,7 +405,7 @@ test_expect_success 'replace submodule revision' '
"if git ls-files --error-unmatch -- submod > /dev/null 2>&1
then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod
fi" HEAD &&
test $orig_head != `git show-ref --hash --head HEAD`
test $orig_head != $(git show-ref --hash --head HEAD)
'
test_expect_success 'filter commit message without trailing newline' '