diff options
author | Elia Pinto <gitter.spiros@gmail.com> | 2016-01-12 11:49:28 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-12 11:49:46 -0800 |
commit | 8c311f96a5a089d2f35654e9af7c44377a27839b (patch) | |
tree | 9840554fdf85bdc5ad98fb976e01dc7d9909ced0 /t/t9129-git-svn-i18n-commitencoding.sh | |
parent | 57da04965d56c7d7da6a00c3fb6fc3981cf0ba9a (diff) | |
download | git-8c311f96a5a089d2f35654e9af7c44377a27839b.tar.gz git-8c311f96a5a089d2f35654e9af7c44377a27839b.tar.xz |
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>
Diffstat (limited to 't/t9129-git-svn-i18n-commitencoding.sh')
-rwxr-xr-x | t/t9129-git-svn-i18n-commitencoding.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh index 8cfdfe790..39b6bcb39 100755 --- a/t/t9129-git-svn-i18n-commitencoding.sh +++ b/t/t9129-git-svn-i18n-commitencoding.sh @@ -7,7 +7,7 @@ test_description='git svn honors i18n.commitEncoding in config' . ./lib-git-svn.sh compare_git_head_with () { - nr=`wc -l < "$1"` + nr=$(wc -l < "$1") a=7 b=$(($a + $nr - 1)) git cat-file commit HEAD | sed -ne "$a,${b}p" >current && @@ -29,7 +29,7 @@ fi compare_svn_head_with () { # extract just the log message and strip out committer info. # don't use --limit here since svn 1.1.x doesn't have it, - LC_ALL="$a_utf8_locale" svn log `git svn info --url` | perl -w -e ' + LC_ALL="$a_utf8_locale" svn log $(git svn info --url) | perl -w -e ' use bytes; $/ = ("-"x72) . "\n"; my @x = <STDIN>; |