t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution
authorElia Pinto <gitter.spiros@gmail.com>
Thu, 7 Jan 2016 13:51:46 +0000 (14:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Jan 2016 21:58:17 +0000 (13:58 -0800)
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/t6132-pathspec-exclude.sh
index e1e1b1fa382fa3ea129450770d575bffdddc47b9..d51595cf6b189a59d271dcc69c3f245b72dcb8f6 100755 (executable)
@@ -7,7 +7,7 @@ test_description='test case exclude pathspec'
 test_expect_success 'setup' '
        for p in file sub/file sub/sub/file sub/file2 sub/sub/sub/file sub2/file; do
                if echo $p | grep /; then
-                       mkdir -p `dirname $p`
+                       mkdir -p $(dirname $p)
                fi &&
                : >$p &&
                git add $p &&