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>
This commit is contained in:
parent
57da04965d
commit
8c311f96a5
@ -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>;
|
||||
|
Loading…
Reference in New Issue
Block a user