From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 11/14] t1003-read-tree-prefix.sh: use the $( ... ) construct for command substitution Date: Mon, 28 Apr 2014 05:57:34 -0700 Message-ID: <1398689857-17014-11-git-send-email-gitter.spiros@gmail.com> References: <1398689857-17014-1-git-send-email-gitter.spiros@gmail.com> Cc: matthieu.moy@grenoble-inp.fr, Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Apr 28 14:58:20 2014 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 1Wel8R-00042y-Tn for gcvg-git-2@plane.gmane.org; Mon, 28 Apr 2014 14:58:16 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755839AbaD1M5z (ORCPT ); Mon, 28 Apr 2014 08:57:55 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:51399 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755564AbaD1M5x (ORCPT ); Mon, 28 Apr 2014 08:57:53 -0400 Received: by mail-pa0-f44.google.com with SMTP id ey11so3924893pad.31 for ; Mon, 28 Apr 2014 05:57:53 -0700 (PDT) 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=n2FZ2xEbJ2hN3KCus7Uw8rKFkPbxwpiaf+6ms+uC2A0=; b=s4aIZo/tFaWOEEcN94Tpemi/m/1sJ6pJj/xYb6m8nprrq6bfxnWQuJksZShzjY8Hnk BohrRP5tDwDVfx/MlWSgE3e5T+gY7YtLa+ROLoMgXbM1QhDfwcbJYFFG5T8rbwXqEnhk BF/NH6pnjn86H6iFPF9iDQi6I5sxn3Rin1mIF8Cu/UfRDQWh2wC7HKWeJVl6vFpCnSoz 959R41mDG8qldyx+OYVBQt1W/stoG1LpMoxiRNHJltACyWUHgnfb70YkcIpyj3HBR8l+ wYTxKOIZCgHTxAVYe+6A+DbLa8DwbuErSNyZjjE8+fKl/qf9pRoHuVzPRXJymaEINKDF xWVQ== X-Received: by 10.67.5.7 with SMTP id ci7mr25060030pad.99.1398689873182; Mon, 28 Apr 2014 05:57:53 -0700 (PDT) Received: from devzero2000ubu.nephoscale.com (140.195.207.67.nephoscale.net. [67.207.195.140]) by mx.google.com with ESMTPSA id ky8sm34896290pbc.64.2014.04.28.05.57.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 05:57:52 -0700 (PDT) X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1398689857-17014-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 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto --- t/t1003-read-tree-prefix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1003-read-tree-prefix.sh b/t/t1003-read-tree-prefix.sh index 8c6d67e..b6111cd 100755 --- a/t/t1003-read-tree-prefix.sh +++ b/t/t1003-read-tree-prefix.sh @@ -11,7 +11,7 @@ test_description='git read-tree --prefix test. test_expect_success setup ' echo hello >one && git update-index --add one && - tree=`git write-tree` && + tree=$(git write-tree) && echo tree is $tree ' -- 1.7.10.4