Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit a4cf6b4

Browse files
devzero2000gitster
authored andcommitted
t3910-mac-os-precompose.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 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <[email protected]> Reviewed-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cba1262 commit a4cf6b4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

t/t3910-mac-os-precompose.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ then
1414
fi
1515

1616
# create utf-8 variables
17-
Adiarnfc=`printf '\303\204'`
18-
Adiarnfd=`printf 'A\314\210'`
17+
Adiarnfc=$(printf '\303\204')
18+
Adiarnfd=$(printf 'A\314\210')
1919

20-
Odiarnfc=`printf '\303\226'`
21-
Odiarnfd=`printf 'O\314\210'`
22-
AEligatu=`printf '\303\206'`
23-
Invalidu=`printf '\303\377'`
20+
Odiarnfc=$(printf '\303\226')
21+
Odiarnfd=$(printf 'O\314\210')
22+
AEligatu=$(printf '\303\206')
23+
Invalidu=$(printf '\303\377')
2424

2525

2626
#Create a string with 255 bytes (decomposed)
@@ -35,7 +35,7 @@ Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc #250 Byte
3535
Alongc=$Alongc$AEligatu$AEligatu #254 Byte
3636

3737
test_expect_success "detect if nfd needed" '
38-
precomposeunicode=`git config core.precomposeunicode` &&
38+
precomposeunicode=$(git config core.precomposeunicode) &&
3939
test "$precomposeunicode" = true &&
4040
git config core.precomposeunicode true
4141
'
@@ -146,7 +146,7 @@ test_expect_success "respect git config --global core.precomposeunicode" '
146146
git config --global core.precomposeunicode true &&
147147
rm -rf .git &&
148148
git init &&
149-
precomposeunicode=`git config core.precomposeunicode` &&
149+
precomposeunicode=$(git config core.precomposeunicode) &&
150150
test "$precomposeunicode" = "true"
151151
'
152152

0 commit comments

Comments
 (0)