From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 08/10] t/t8003-blame-corner-cases.sh: use the $( ... ) construct for command substitution Date: Fri, 8 Jan 2016 12:06:26 +0100 Message-ID: <1452251188-12939-9-git-send-email-gitter.spiros@gmail.com> References: <1452251188-12939-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Fri Jan 08 12:06:52 2016 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 1aHUse-0002wj-0j for gcvg-git-2@plane.gmane.org; Fri, 08 Jan 2016 12:06:52 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754739AbcAHLGl (ORCPT ); Fri, 8 Jan 2016 06:06:41 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:32966 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751673AbcAHLGk (ORCPT ); Fri, 8 Jan 2016 06:06:40 -0500 Received: by mail-pf0-f195.google.com with SMTP id e65so618868pfe.0 for ; Fri, 08 Jan 2016 03:06:40 -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=K1lQU6lHfeQKUyLiEGfwvlXl2oT5dtaRlmY1bobXVOs=; b=rUD3KnbY/yehEufr/2ypqOjPiEKr8oQkP4UmWaTMTmaiLlBgei3Du5lMsEUfX5N3Sg 6dED2J2utqiL4w8GAiuPELyW1Pkyx+6DEEySe6/7f5Z1p6o0peDRtrg8SEEbZnTdYhnD CZFaY6I0X0ZLBydzVVi4qDY0c8EjW25xWMHLpwvtwXZnPxzU+4699vWV2JwLcWPOVyQm s3mR2qOiFFEJZmLVUv8C04WV7JHoSF+S2VtNhdCF9LUfEgxKBvT8328+dzrKl0xND9Mx 6Qa5kczewRcrUT6SDwwtfZ2O4udXdSCGPRgktlWMJckdczhSYQ6dnIMbho+tntMCwABZ vuug== X-Received: by 10.98.9.75 with SMTP id e72mr3352643pfd.29.1452251200321; Fri, 08 Jan 2016 03:06:40 -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 fi16sm93143771pac.12.2016.01.08.03.06.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jan 2016 03:06:39 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1452251188-12939-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/t8003-blame-corner-cases.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh index 16f1442..6568429 100755 --- a/t/t8003-blame-corner-cases.sh +++ b/t/t8003-blame-corner-cases.sh @@ -153,7 +153,7 @@ test_expect_success 'blame path that used to be a directory' ' ' test_expect_success 'blame to a commit with no author name' ' - TREE=`git rev-parse HEAD:` && + TREE=$(git rev-parse HEAD:) && cat >badcommit < 1234567890 +0000 @@ -161,7 +161,7 @@ committer David Reiss 1234567890 +0000 some message EOF - COMMIT=`git hash-object -t commit -w badcommit` && + COMMIT=$(git hash-object -t commit -w badcommit) && git --no-pager blame $COMMIT -- uno >/dev/null ' -- 2.3.3.GIT