From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 06/12] t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command substitution Date: Tue, 12 Jan 2016 11:49:32 +0000 Message-ID: <1452599378-47882-7-git-send-email-gitter.spiros@gmail.com> References: <1452599378-47882-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Jan 12 12:49:55 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 1aIxSU-0007gs-AB for gcvg-git-2@plane.gmane.org; Tue, 12 Jan 2016 12:49:54 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964928AbcALLtv (ORCPT ); Tue, 12 Jan 2016 06:49:51 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34382 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934874AbcALLtr (ORCPT ); Tue, 12 Jan 2016 06:49:47 -0500 Received: by mail-wm0-f67.google.com with SMTP id b14so30973690wmb.1 for ; Tue, 12 Jan 2016 03:49:46 -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=zYMwUUXaRieF0j9xHyIU0GREbliUtQ+AKdOqIfd6ONQ=; b=Pnjx9NqxUVNtji8YjG2M2IPJe5G3OvnZ07+NPnhsKFf3MKACDB8Wicn7MTUO8QkoUZ q/jwzl/PFTt9Opz2dF3vKTJw9GCwWIlNLbl88io5vh9rVOsHfFgXFTUMN3ut2oWRm+pw maYZUtgmKY+7u4wa5lNG0t1qh5ddXSLD0zRvti7uYEKV4ozBOBvkStwUdVPYBEKGsWzb ACRL1JD7wO47VNp5FX7hcheux5zJ4SKDYZofGReGhHsjXiQAv+0xg1sWad/lafpInFTb CnfPBnf8FW2qRzG71QR1AHosi8HGcVoEMEAypI7E9eUT4h0cILJgAnIdzq2nQXrRbhQM YMLg== X-Received: by 10.194.202.135 with SMTP id ki7mr122563932wjc.81.1452599386305; Tue, 12 Jan 2016 03:49:46 -0800 (PST) Received: from ubuntu2pinto.pd5x2phgis1evm2itoce0l41ib.ax.internal.cloudapp.net ([40.113.119.92]) by smtp.gmail.com with ESMTPSA id k130sm3506702wmg.6.2016.01.12.03.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 03:49:45 -0800 (PST) X-Mailer: git-send-email 2.7.0.rc0.20.g4b9ab0e.dirty In-Reply-To: <1452599378-47882-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/t9138-git-svn-authors-prog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138-git-svn-authors-prog.sh index 2937f4c..7d7e9d4 100755 --- a/t/t9138-git-svn-authors-prog.sh +++ b/t/t9138-git-svn-authors-prog.sh @@ -37,7 +37,7 @@ test_expect_success 'import authors with prog and file' ' test_expect_success 'imported 6 revisions successfully' ' ( cd x - test "`git rev-list refs/remotes/git-svn | wc -l`" -eq 6 + test "$(git rev-list refs/remotes/git-svn | wc -l)" -eq 6 ) ' -- 2.5.0