summaryrefslogtreecommitdiff
path: root/t/t9130-git-svn-authors-file.sh
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2016-01-12 11:49:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-12 19:49:46 (GMT)
commita5c98acec6ad8e8c397b1001621a4edfacc98516 (patch)
tree04ada12c402723aef36c55174c80f4cfcbd588c7 /t/t9130-git-svn-authors-file.sh
parent8c311f96a5a089d2f35654e9af7c44377a27839b (diff)
downloadgit-a5c98acec6ad8e8c397b1001621a4edfacc98516.zip
git-a5c98acec6ad8e8c397b1001621a4edfacc98516.tar.gz
git-a5c98acec6ad8e8c397b1001621a4edfacc98516.tar.bz2
t9130-git-svn-authors-file.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/t9130-git-svn-authors-file.sh')
-rwxr-xr-xt/t9130-git-svn-authors-file.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh
index c44de26..d306b77 100755
--- a/t/t9130-git-svn-authors-file.sh
+++ b/t/t9130-git-svn-authors-file.sh
@@ -26,7 +26,7 @@ test_expect_success 'start import with incomplete authors file' '
test_expect_success 'imported 2 revisions successfully' '
(
cd x
- test "`git rev-list refs/remotes/git-svn | wc -l`" -eq 2 &&
+ test "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 2 &&
git rev-list -1 --pretty=raw refs/remotes/git-svn | \
grep "^author BBBBBBB BBBBBBB <bb@example\.com> " &&
git rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \
@@ -43,7 +43,7 @@ test_expect_success 'continues to import once authors have been added' '
(
cd x
git svn fetch --authors-file=../svn-authors &&
- test "`git rev-list refs/remotes/git-svn | wc -l`" -eq 4 &&
+ test "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 4 &&
git rev-list -1 --pretty=raw refs/remotes/git-svn | \
grep "^author DDDDDDD DDDDDDD <dd@example\.com> " &&
git rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \
@@ -73,8 +73,8 @@ tmp_config_get () {
test_expect_success 'failure happened without negative side effects' '
(
cd aa-work &&
- test 6 -eq "`tmp_config_get svn-remote.svn.branches-maxRev`" &&
- test 6 -eq "`tmp_config_get svn-remote.svn.tags-maxRev`"
+ test 6 -eq "$(tmp_config_get svn-remote.svn.branches-maxRev)" &&
+ test 6 -eq "$(tmp_config_get svn-remote.svn.tags-maxRev)"
)
'
@@ -86,8 +86,8 @@ test_expect_success 'fetch continues after authors-file is fixed' '
(
cd aa-work &&
git svn fetch --authors-file=../svn-authors &&
- test 8 -eq "`tmp_config_get svn-remote.svn.branches-maxRev`" &&
- test 8 -eq "`tmp_config_get svn-remote.svn.tags-maxRev`"
+ test 8 -eq "$(tmp_config_get svn-remote.svn.branches-maxRev)" &&
+ test 8 -eq "$(tmp_config_get svn-remote.svn.tags-maxRev)"
)
'