diff options
author | Elia Pinto <gitter.spiros@gmail.com> | 2016-01-12 12:49:28 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-12 20:49:46 +0100 |
commit | 8c311f96a5a089d2f35654e9af7c44377a27839b (patch) | |
tree | 9840554fdf85bdc5ad98fb976e01dc7d9909ced0 /t/t9129-git-svn-i18n-commitencoding.sh | |
parent | t9119-git-svn-info.sh: use the $( ... ) construct for command substitution (diff) | |
download | git-8c311f96a5a089d2f35654e9af7c44377a27839b.tar.xz git-8c311f96a5a089d2f35654e9af7c44377a27839b.zip |
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 8cfdfe790f..39b6bcb398 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>; |