From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 04/10] t/t5537-fetch-shallow.sh: use the $( ... ) construct for command substitution Date: Mon, 4 Jan 2016 10:10:45 +0100 Message-ID: <1451898651-16468-5-git-send-email-gitter.spiros@gmail.com> References: <1451898651-16468-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Jan 04 10:11:44 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 1aG1Av-0004zF-CJ for gcvg-git-2@plane.gmane.org; Mon, 04 Jan 2016 10:11:37 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753257AbcADJL0 (ORCPT ); Mon, 4 Jan 2016 04:11:26 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35137 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753224AbcADJLF (ORCPT ); Mon, 4 Jan 2016 04:11:05 -0500 Received: by mail-pa0-f47.google.com with SMTP id do7so2520213pab.2 for ; Mon, 04 Jan 2016 01:11:05 -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=Bx+ZwYivVOEidt2WGQptY0CgB+hG5Ni6xtnqGY8Locw=; b=y7uinuffX0xUgL84ivL2onmcgDzn4g1QxvzFMJqPFgMJJ/g2ajE5ptrdMSXrDNLNJ8 NkxSTb9k4qsTxGErRhNhXPmusIF6jkqDzN2DcG+Fhql5kRCN+NgqfaT7MNv9pYGlcdUp sD10KKtL+rq6sst3/R/k8IEfg8UfAI4P5JSnHmvjP9es/S/C94qZqpzCLQMXJoijFCe/ 0Wa0j7SyGHUo6LEUOJHE0S3sNGnVMBWgP8oURR0E8VV9xUb03ueay7Wod0GB0z2UkhCs v5Q0U60s7u98GX9REMtdJpohHpsPbr/AUfcl2Qa+mu9cfhjrQcXEzxt6RX2NIkNnc7TN EtaA== X-Received: by 10.66.101.3 with SMTP id fc3mr84456996pab.2.1451898664948; Mon, 04 Jan 2016 01:11:04 -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 h10sm124416205pat.7.2016.01.04.01.11.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Jan 2016 01:11:04 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1451898651-16468-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/t5537-fetch-shallow.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh index a980574..df8d2f0 100755 --- a/t/t5537-fetch-shallow.sh +++ b/t/t5537-fetch-shallow.sh @@ -98,7 +98,7 @@ EOF test_expect_success 'fetch something upstream has but hidden by clients shallow boundaries' ' # the blob "1" is available in .git but hidden by the # shallow2/.git/shallow and it should be resent - ! git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` >/dev/null && + ! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null && echo 1 >1.t && git add 1.t && git commit -m add-1-back && @@ -114,7 +114,7 @@ add-1-back EOF test_cmp expect actual ) && - git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` >/dev/null + git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null ' -- 2.3.3.GIT