t/t5530-upload-pack-error.sh: use the $( ... ) construct for command substitution
authorElia Pinto <gitter.spiros@gmail.com>
Mon, 4 Jan 2016 09:10:43 +0000 (10:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Jan 2016 21:41:49 +0000 (13:41 -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/t5530-upload-pack-error.sh
index 3932e797f7f60545e6e8c140824a5ca5ee16832a..4f6e32b04c48b7723a2b9dc172cd2104c3349e0b 100755 (executable)
@@ -4,7 +4,7 @@ test_description='errors in upload-pack'
 
 . ./test-lib.sh
 
-D=`pwd`
+D=$(pwd)
 
 corrupt_repo () {
        object_sha1=$(git rev-parse "$1") &&