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

Commit 714c71b

Browse files
devzero2000gitster
authored andcommitted
t1050-large.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 c9e454c commit 714c71b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t1050-large.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ test_expect_success 'git-show a large file' '
131131
'
132132

133133
test_expect_success 'index-pack' '
134-
git clone file://"`pwd`"/.git foo &&
134+
git clone file://"$(pwd)"/.git foo &&
135135
GIT_DIR=non-existent git index-pack --strict --verify foo/.git/objects/pack/*.pack
136136
'
137137

@@ -140,7 +140,7 @@ test_expect_success 'repack' '
140140
'
141141

142142
test_expect_success 'pack-objects with large loose object' '
143-
SHA1=`git hash-object huge` &&
143+
SHA1=$(git hash-object huge) &&
144144
test_create_repo loose &&
145145
echo $SHA1 | git pack-objects --stdout |
146146
GIT_ALLOC_LIMIT=0 GIT_DIR=loose/.git git unpack-objects &&

0 commit comments

Comments
 (0)