t9129-git-svn-i18n-commitencoding.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 11:49 UTC
8c311f96a5a089d2f35654e9af7c44377a27839b
1 file changed
+2
-2
t/t9129-git-svn-i18n-commitencoding.sh
+2
-2
@@ -7,7 +7,7 @@ test_description='git svn honors i18n.commitEncoding in config'
7
. ./lib-git-svn.sh
8
9
compare_git_head_with () {
10
- nr=`wc -l < "$1"`
10
+ nr=$(wc -l < "$1")
11
a=7
12
b=$(($a + $nr - 1))
13
git cat-file commit HEAD | sed -ne "$a,${b}p" >current &&
@@ -29,7 +29,7 @@ fi
29
compare_svn_head_with () {
30
# extract just the log message and strip out committer info.
31
# don't use --limit here since svn 1.1.x doesn't have it,
32
- LC_ALL="$a_utf8_locale" svn log `git svn info --url` | perl -w -e '
32
+ LC_ALL="$a_utf8_locale" svn log $(git svn info --url) | perl -w -e '
33
use bytes;
34
$/ = ("-"x72) . "\n";
35
my @x = <STDIN>;