From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 10/10] t/t5517-push-mirror.sh: use the $( ... ) construct for command substitution Date: Wed, 23 Dec 2015 14:45:58 +0100 Message-ID: <1450878358-7422-11-git-send-email-gitter.spiros@gmail.com> References: <1450878358-7422-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Dec 23 14:46:39 2015 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 1aBjkS-0002W7-MH for gcvg-git-2@plane.gmane.org; Wed, 23 Dec 2015 14:46:37 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933850AbbLWNqc (ORCPT ); Wed, 23 Dec 2015 08:46:32 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:33309 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933834AbbLWNq1 (ORCPT ); Wed, 23 Dec 2015 08:46:27 -0500 Received: by mail-pa0-f51.google.com with SMTP id cy9so51282865pac.0 for ; Wed, 23 Dec 2015 05:46:26 -0800 (PST) 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=hjUywm806EUF7bjTOkbZsxtqqY6jZmULMBnnc56qmsc=; b=Y7vZM6fKCuv5KEvRniJq+ZLbdrnNaH6+IPgvQCpzuHdK9UUh/qJdYMV6t3ZfiDluLM BeJFIxcw8hiWPDJSKIsWfiLEWMWVihbKh7fx/AKG9mJeUHHDf3+23OYdfOU6hPyEMyKn VTqBi4trLMccWdQOkAmDqOogTGNBju2pxYIpAuwDwnXyiHR9Jm2oX9ApyokJUMjqxOek HFlWXjQSoymkXqRFwKHO0P8ASh1CiCGuz0gQ7xMfEMnWmuexmylhODk1iHNQlygpNfzH HVUXzIB3WfCgQTCkKOJjOlA18BHKQJ29CAOFMbnUoM1EVD4z+uqaMAorrYY8iGb8FRG9 1AQw== X-Received: by 10.66.100.228 with SMTP id fb4mr42896086pab.84.1450878386137; Wed, 23 Dec 2015 05:46:26 -0800 (PST) Received: from ubuntu14.nephoscale.com ([67.207.195.141]) by smtp.gmail.com with ESMTPSA id p83sm48250443pfi.96.2015.12.23.05.46.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Dec 2015 05:46:25 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1450878358-7422-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 perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto --- t/t5517-push-mirror.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh index 12a5dfb..02f160a 100755 --- a/t/t5517-push-mirror.sh +++ b/t/t5517-push-mirror.sh @@ -4,7 +4,7 @@ test_description='pushing to a mirror repository' . ./test-lib.sh -D=`pwd` +D=$(pwd) invert () { if "$@"; then -- 2.3.3.GIT