]> git.ipfire.org Git - thirdparty/git.git/commit - t/t3700-add.sh
t/t3700-add.sh: use the $( ... ) construct for command substitution
authorElia Pinto <gitter.spiros@gmail.com>
Tue, 22 Dec 2015 15:27:49 +0000 (16:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Dec 2015 21:36:37 +0000 (13:36 -0800)
commited6c23142a03269d73e720b05d4968652e1b3cb8
treecb72fe28e2b38180903c48421fe45adf98be1648
parente3ab3bc22ba37807755f95e90179323eb941e56a
t/t3700-add.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>
t/t3700-add.sh