From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 06/10] t/t5506-remote-groups.sh: use the $( ... ) construct for command substitution Date: Wed, 23 Dec 2015 14:45:54 +0100 Message-ID: <1450878358-7422-7-git-send-email-gitter.spiros@gmail.com> References: <1450878358-7422-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Dec 23 14:46:30 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 1aBjkL-0002LW-Ut for gcvg-git-2@plane.gmane.org; Wed, 23 Dec 2015 14:46:30 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933825AbbLWNqY (ORCPT ); Wed, 23 Dec 2015 08:46:24 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35582 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933796AbbLWNqW (ORCPT ); Wed, 23 Dec 2015 08:46:22 -0500 Received: by mail-pa0-f42.google.com with SMTP id jx14so106350772pad.2 for ; Wed, 23 Dec 2015 05:46:22 -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=cem4lkZHQkiQLIFeWYB3SB3CTYP7fEXbnxtjbE5pXYU=; b=tMtiikjXoFhlFHMKli5S4rrPCVqq+RabXkI3Yp55LCafSSmpnf/lZ10vXXl9ig8zi1 x6BVPTMkFxlCPtD5rasayVJV6/tLkxtUxvNKi9/Iz7cKGHLmRSHgGPWRdueoPaBCbSGV rRypbLYohGtbxFyZujXMxefqn4pI1ZZySuum/j4xE0cpatFVTl72wfMVuJXZT8/rtPMD /kllk0fdfvHIsoQVQrNf0wW8xBcsjsYpavZPHhjLSEZrQl4i5QDtSKm4onizp1B/WYVS lnYS4Hr/CawBTIOLwhLYRX4yPX9dRJh6HbvJrrnZ65wXEg/2IwiT7EwL1e/QakqWdnuL sblw== X-Received: by 10.66.192.193 with SMTP id hi1mr43745832pac.110.1450878382422; Wed, 23 Dec 2015 05:46:22 -0800 (PST) Received: from ubuntu14.nephoscale.com ([67.207.195.141]) by smtp.gmail.com with ESMTPSA id p83sm48250443pfi.96.2015.12.23.05.46.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Dec 2015 05:46:21 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1450878358-7422-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/t5506-remote-groups.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5506-remote-groups.sh b/t/t5506-remote-groups.sh index 530b016..83d5558 100755 --- a/t/t5506-remote-groups.sh +++ b/t/t5506-remote-groups.sh @@ -20,7 +20,7 @@ update_repos() { } repo_fetched() { - if test "`git log -1 --pretty=format:%s $1 --`" = "`cat mark`"; then + if test "$(git log -1 --pretty=format:%s $1 --)" = "$(cat mark)"; then echo >&2 "repo was fetched: $1" return 0 fi -- 2.3.3.GIT