From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 07/12] t9145-git-svn-master-branch.sh: use the $( ... ) construct for command substitution Date: Tue, 12 Jan 2016 11:49:33 +0000 Message-ID: <1452599378-47882-8-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:50:01 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 1aIxSZ-0007lX-5W for gcvg-git-2@plane.gmane.org; Tue, 12 Jan 2016 12:49:59 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964891AbcALLtu (ORCPT ); Tue, 12 Jan 2016 06:49:50 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32899 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933971AbcALLts (ORCPT ); Tue, 12 Jan 2016 06:49:48 -0500 Received: by mail-wm0-f67.google.com with SMTP id u188so30860894wmu.0 for ; Tue, 12 Jan 2016 03:49:47 -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=gkj2rY3uZospFnh3Qoi0FvLZGy50TK0Vi3qENC0RlZM=; b=PxLk5fYHxEE08ZaQdXwlHJX593utLI/btlOz1ZN10aDfpTaM1lXo/xF8D/TzgJvKhb SWteRT/r0pjm7rpVkBkJtpQzJUEXUQdorzy9qXcO3qhf26Lq0aoRWN6Y5KO8eETulmeV W72gyOiVvTPwm47qN3L9802pwpYrjbAGWYHTLhROBb017L1blS4lH6bVMXGjd474VxwV 2Y9PmocLGMM2V461ezOYEywB2XkkYUMQM1ER3aN+1NwSWducHxB0nOyg6TUP6FZDceaw NH5N3i0ujEm+dDs9yc2BwSgZJx30bRpNCH52DLa9HIu52H0+A0EjhhI5MXJEB7wwlafk trhQ== X-Received: by 10.194.133.102 with SMTP id pb6mr8018807wjb.12.1452599386980; 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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 03:49:46 -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/t9145-git-svn-master-branch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t9145-git-svn-master-branch.sh b/t/t9145-git-svn-master-branch.sh index 6559137..3bbf341 100755 --- a/t/t9145-git-svn-master-branch.sh +++ b/t/t9145-git-svn-master-branch.sh @@ -17,8 +17,8 @@ test_expect_success 'git svn clone --stdlayout sets up trunk as master' ' git svn clone -s "$svnrepo" g && ( cd g && - test x`git rev-parse --verify refs/remotes/origin/trunk^0` = \ - x`git rev-parse --verify refs/heads/master^0` + test x$(git rev-parse --verify refs/remotes/origin/trunk^0) = \ + x$(git rev-parse --verify refs/heads/master^0) ) ' -- 2.5.0