t9114-git-svn-dcommit-merge.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>
Elia Pinto committed
Jan 12, 2016 at 10:45 UTC
78ba28d84b5be8cbb1d5d5e7d65b5522739ad5ce
1 file changed
+6
-6
t/t9114-git-svn-dcommit-merge.sh
+6
-6
@@ -68,8 +68,8 @@ test_expect_success 'setup git mirror and merge' '
68
test_debug 'gitk --all & sleep 1'
69
70
test_expect_success 'verify pre-merge ancestry' "
71
- test x\`git rev-parse --verify refs/heads/svn^2\` = \
72
- x\`git rev-parse --verify refs/heads/merge\` &&
71
+ test x\$(git rev-parse --verify refs/heads/svn^2) = \
72
+ x\$(git rev-parse --verify refs/heads/merge) &&
73
git cat-file commit refs/heads/svn^ | grep '^friend$'
74
"
75
@@ -80,10 +80,10 @@ test_expect_success 'git svn dcommit merges' "
80
test_debug 'gitk --all & sleep 1'
81
82
test_expect_success 'verify post-merge ancestry' "
83
- test x\`git rev-parse --verify refs/heads/svn\` = \
84
- x\`git rev-parse --verify refs/remotes/origin/trunk \` &&
85
- test x\`git rev-parse --verify refs/heads/svn^2\` = \
86
- x\`git rev-parse --verify refs/heads/merge\` &&
83
+ test x\$(git rev-parse --verify refs/heads/svn) = \
84
+ x\$(git rev-parse --verify refs/remotes/origin/trunk) &&
85
+ test x\$(git rev-parse --verify refs/heads/svn^2) = \
86
+ x\$(git rev-parse --verify refs/heads/merge) &&
87
git cat-file commit refs/heads/svn^ | grep '^friend$'
88
"
89