From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 09/10] t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command substitution Date: Tue, 12 Jan 2016 10:45:17 +0000 Message-ID: <1452595518-38149-10-git-send-email-gitter.spiros@gmail.com> References: <1452595518-38149-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 11:46:34 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 1aIwTB-00084D-AX for gcvg-git-2@plane.gmane.org; Tue, 12 Jan 2016 11:46:33 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934846AbcALKpm (ORCPT ); Tue, 12 Jan 2016 05:45:42 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33784 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934412AbcALKpb (ORCPT ); Tue, 12 Jan 2016 05:45:31 -0500 Received: by mail-wm0-f68.google.com with SMTP id u188so30567907wmu.0 for ; Tue, 12 Jan 2016 02:45:31 -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=cvEsqHnIs3kA61M90qDKtarX/ghe2YYZJP+9X0kXCWk=; b=JOKuABnk9sQdoDBw0WIVBJwyfedLSyjL+00sjQvt9UbIqVkQndeEIb6paHlNXP4eoO Q002lMjnRx1H/31DmyBq6yLU8hKQk3+dknl4+m0JcYQ5iUr66Quwv2SAhU0ZVnELpcqt CAeylc4/LpIOZmYeEUIXXiXAY5wx2Hy5grPs907uu5Vhs+CbrUJK3iYFcOrqvxgpk/HY TzAnyCFUX2N0hK0f8RDxzLhc0N//np6nHuwfj449l0vWPi8QjutF7o43Us03pFkF6nXs iUkop2DsF9CarnKcAWVDsAYUwNgQe+ZuVriAdIXbB5pq7ZiddWufUP2GRF/kXm6R8lNL ZUOw== X-Received: by 10.28.55.76 with SMTP id e73mr19839887wma.53.1452595530756; Tue, 12 Jan 2016 02:45:30 -0800 (PST) Received: from ubuntu2pinto.pd5x2phgis1evm2itoce0l41ib.ax.internal.cloudapp.net ([40.113.119.92]) by smtp.gmail.com with ESMTPSA id gb9sm96320537wjb.26.2016.01.12.02.45.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 02:45:30 -0800 (PST) X-Mailer: git-send-email 2.7.0.rc0.20.g4b9ab0e.dirty In-Reply-To: <1452595518-38149-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/t9114-git-svn-dcommit-merge.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t9114-git-svn-dcommit-merge.sh b/t/t9114-git-svn-dcommit-merge.sh index fb41876..a3d3882 100755 --- a/t/t9114-git-svn-dcommit-merge.sh +++ b/t/t9114-git-svn-dcommit-merge.sh @@ -68,8 +68,8 @@ test_expect_success 'setup git mirror and merge' ' test_debug 'gitk --all & sleep 1' test_expect_success 'verify pre-merge ancestry' " - test x\`git rev-parse --verify refs/heads/svn^2\` = \ - x\`git rev-parse --verify refs/heads/merge\` && + test x\$(git rev-parse --verify refs/heads/svn^2) = \ + x\$(git rev-parse --verify refs/heads/merge) && git cat-file commit refs/heads/svn^ | grep '^friend$' " @@ -80,10 +80,10 @@ test_expect_success 'git svn dcommit merges' " test_debug 'gitk --all & sleep 1' test_expect_success 'verify post-merge ancestry' " - test x\`git rev-parse --verify refs/heads/svn\` = \ - x\`git rev-parse --verify refs/remotes/origin/trunk \` && - test x\`git rev-parse --verify refs/heads/svn^2\` = \ - x\`git rev-parse --verify refs/heads/merge\` && + test x\$(git rev-parse --verify refs/heads/svn) = \ + x\$(git rev-parse --verify refs/remotes/origin/trunk) && + test x\$(git rev-parse --verify refs/heads/svn^2) = \ + x\$(git rev-parse --verify refs/heads/merge) && git cat-file commit refs/heads/svn^ | grep '^friend$' " -- 2.5.0