t/t6132-pathspec-exclude.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>
Elia Pinto committed
Jan 7, 2016 at 14:51 UTC
7b8c0b53c320b03cb641f4e4c7b12049a36bd84e
1 file changed
+1
-1
t/t6132-pathspec-exclude.sh
+1
-1
@@ -7,7 +7,7 @@ test_description='test case exclude pathspec'
7
test_expect_success 'setup' '
8
for p in file sub/file sub/sub/file sub/file2 sub/sub/sub/file sub2/file; do
9
if echo $p | grep /; then
10
- mkdir -p `dirname $p`
10
+ mkdir -p $(dirname $p)
11
fi &&
12
: >$p &&
13
git add $p &&