From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 14/14] t1050-large.sh: use the $( ... ) construct for command substitution Date: Mon, 28 Apr 2014 05:57:37 -0700 Message-ID: <1398689857-17014-14-git-send-email-gitter.spiros@gmail.com> References: <1398689857-17014-1-git-send-email-gitter.spiros@gmail.com> Cc: matthieu.moy@grenoble-inp.fr, Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Apr 28 14:58:12 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wel8N-0003vD-G7 for gcvg-git-2@plane.gmane.org; Mon, 28 Apr 2014 14:58:11 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755845AbaD1M57 (ORCPT ); Mon, 28 Apr 2014 08:57:59 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:50020 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755844AbaD1M54 (ORCPT ); Mon, 28 Apr 2014 08:57:56 -0400 Received: by mail-pb0-f50.google.com with SMTP id md12so5846604pbc.9 for ; Mon, 28 Apr 2014 05:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=b9l7/O1VMkzX6WiRY3hLY5BvLRDp8mmMKEi31GeHbNM=; b=ICrtnWhbWu+MnK+p4oeUUx58gIoZIXi+h9swhmXMnqi/4jhrEjw9z+wV8RMbA9xVEd Qv2YKpVYtHvxcif/lABmG40IzFMNqp8NWd/Q0lqgjhktVaJdK910WqaF8FZUUp7TWKX+ ZzIduUrn8QxDMCBmcOyEDl5LJn0K86MD365ROgLfG3lWFNCcYsnIgOF3h5XztSz1l4/C rokPvYjykmEUMl7RRg0jiLJJ8MZCT3yAq8U6oq1ewfsd3G2T7Z2gvSIPC7Ye8himCA10 mTEXDg3C1Iyb3sgG1urbh/C8RE94d7P/2G1G0hAbOC058uLX3+zVg+dxkKdQUwxN94mL KgMQ== X-Received: by 10.68.162.1 with SMTP id xw1mr9050999pbb.128.1398689876307; Mon, 28 Apr 2014 05:57:56 -0700 (PDT) Received: from devzero2000ubu.nephoscale.com (140.195.207.67.nephoscale.net. [67.207.195.140]) by mx.google.com with ESMTPSA id ky8sm34896290pbc.64.2014.04.28.05.57.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 05:57:55 -0700 (PDT) X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1398689857-17014-1-git-send-email-gitter.spiros@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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 --- t/t1050-large.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1050-large.sh b/t/t1050-large.sh index fd10528..aea4936 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -131,7 +131,7 @@ test_expect_success 'git-show a large file' ' ' test_expect_success 'index-pack' ' - git clone file://"`pwd`"/.git foo && + git clone file://"$(pwd)"/.git foo && GIT_DIR=non-existent git index-pack --strict --verify foo/.git/objects/pack/*.pack ' @@ -140,7 +140,7 @@ test_expect_success 'repack' ' ' test_expect_success 'pack-objects with large loose object' ' - SHA1=`git hash-object huge` && + SHA1=$(git hash-object huge) && test_create_repo loose && echo $SHA1 | git pack-objects --stdout | GIT_ALLOC_LIMIT=0 GIT_DIR=loose/.git git unpack-objects && -- 1.7.10.4