From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 09/10] t5301-sliding-window.sh: use the $( ... ) construct for command substitution Date: Tue, 22 Dec 2015 16:27:52 +0100 Message-ID: <1450798073-22811-10-git-send-email-gitter.spiros@gmail.com> References: <1450798073-22811-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:28:23 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 1aBOrK-00029j-Ju for gcvg-git-2@plane.gmane.org; Tue, 22 Dec 2015 16:28:19 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932231AbbLVP2J (ORCPT ); Tue, 22 Dec 2015 10:28:09 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35432 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752645AbbLVP2H (ORCPT ); Tue, 22 Dec 2015 10:28:07 -0500 Received: by mail-pa0-f42.google.com with SMTP id jx14so91028737pad.2 for ; Tue, 22 Dec 2015 07:28: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=unNfwD5SLJgZFMoj5fv8JHGzKtdRVVoJl3isY2Y2XYs=; b=v2VQQrrWcpo7QuRbvFE2ebnUVvjSya5O1bvvmhY32JehtHAEwPSX/6IaCTdPCSx/Gk Nn3sebU29/pZgCeOyzmsHppychv15mkV5ytBVJliAWtkQIQdLkP0tYMEGFReSyDe/HuH OZUf9lDKuTkiYKkh8ZzpILMJhjGZ4k0HxITgtBgM8YASbWI7rzMu023rmXthQm8Omvhz 64SuKibvfDEAWVvuEhO+HJveggNxGftUOoeJ4zbYc72LBOs9W572sS/eRJrqPJdy4WhQ K0bxVo+RQA+pTd6ldLcCfXkX57t1AqVzKEsYyKRUlZUYltYcPdTVEuLUP9K3JDhgEDEk przg== X-Received: by 10.66.55.6 with SMTP id n6mr36253416pap.33.1450798086639; Tue, 22 Dec 2015 07:28: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 q190sm42030149pfq.59.2015.12.22.07.28.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 07:28:06 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1450798073-22811-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/t5301-sliding-window.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t5301-sliding-window.sh b/t/t5301-sliding-window.sh index 2fc5af6..cae8c2e 100755 --- a/t/t5301-sliding-window.sh +++ b/t/t5301-sliding-window.sh @@ -16,12 +16,12 @@ test_expect_success \ git update-index --add $i || return 1 done && echo d >d && cat c >>d && git update-index --add d && - tree=`git write-tree` && - commit1=`git commit-tree $tree