From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 08/10] t/t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution Date: Tue, 22 Dec 2015 16:05:53 +0100 Message-ID: <1450796755-15848-9-git-send-email-gitter.spiros@gmail.com> References: <1450796755-15848-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Dec 22 16:06:13 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 1aBOVw-00049p-9U for gcvg-git-2@plane.gmane.org; Tue, 22 Dec 2015 16:06:12 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932838AbbLVPGI (ORCPT ); Tue, 22 Dec 2015 10:06:08 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35318 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754791AbbLVPGG (ORCPT ); Tue, 22 Dec 2015 10:06:06 -0500 Received: by mail-pa0-f54.google.com with SMTP id jx14so90779084pad.2 for ; Tue, 22 Dec 2015 07:06:06 -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=dObzpY6+zmyfGOukUT6o5OlBcaHZpH3qIFGmv+fjL7Y=; b=hhxS3m8Sj00EMO5R4oqXTHYuYmbTOz7tJsTJ18lvP1E6JB8vk9fHi8W3I8yK2lCBFv 9E+h+t6Z+9slOidrYd3j+2GTckTVIzPWgcM4MZCNCkbRYvinO1K4z8ajdd2bs7r5dQKH Ng4AfEaA+n5xQmBxnbz0PjCWW6DPkyux1sHkKEjCQQ7vGJ7LkRLH9T5C8Z0LZR8txwJg oGuTvhVdDu7b29WF+XSyGHPZ+22LcWEU9tV1nKiDSV2GZGsFgipnkhGv5zgcmWwwjfM3 y0KjoSL0Z/ywES6sg2w/TOWVbrGo1S2G9qHWkI6g/vSLRaGDY9owXGC74CGp1JFXn9ni aPNQ== X-Received: by 10.66.232.170 with SMTP id tp10mr36480705pac.38.1450796766223; Tue, 22 Dec 2015 07:06:06 -0800 (PST) Received: from ubuntu14.nephoscale.com (static-67.207.195.141.nephosdns.com. [67.207.195.141]) by smtp.gmail.com with ESMTPSA id hz8sm46766591pac.10.2015.12.22.07.06.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 07:06:05 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1450796755-15848-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/t2102-update-index-symlinks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2102-update-index-symlinks.sh b/t/t2102-update-index-symlinks.sh index 4d0d0a3..22f2c73 100755 --- a/t/t2102-update-index-symlinks.sh +++ b/t/t2102-update-index-symlinks.sh @@ -23,7 +23,7 @@ git update-index symlink' test_expect_success \ 'the index entry must still be a symbolic link' ' -case "`git ls-files --stage --cached symlink`" in +case "$(git ls-files --stage --cached symlink)" in 120000" "*symlink) echo pass;; *) echo fail; git ls-files --stage --cached symlink; (exit 1);; esac' -- 2.3.3.GIT