From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 01/12] t9119-git-svn-info.sh: use the $( ... ) construct for command substitution Date: Tue, 12 Jan 2016 11:49:27 +0000 Message-ID: <1452599378-47882-2-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:21 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 1aIxSs-0007yV-SZ for gcvg-git-2@plane.gmane.org; Tue, 12 Jan 2016 12:50:19 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934870AbcALLtq (ORCPT ); Tue, 12 Jan 2016 06:49:46 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36182 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759620AbcALLto (ORCPT ); Tue, 12 Jan 2016 06:49:44 -0500 Received: by mail-wm0-f66.google.com with SMTP id l65so30886683wmf.3 for ; Tue, 12 Jan 2016 03:49:43 -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=kT2evy8Y3Q22SwCVEplqdvWxkg9pa8DUltmzQaN+6EY=; b=Ow+pYEEjhA1sopHijSzG9CuxxlnzX/ZtlEIgLqxNf80N/lcW2w1vksgEnY0/d7mgXl zXBEQTCRs2AIM0WFS1JoFzrNsiiiDrtgjZ5LDWDdXrLkW8g5/TlBl7sVEqr6DZIAdQps PIwGjBrmUdrV6TNLULsDQBrSeTDTsBPJI0WYgh3arqi6NM57nnhAenKljjKD8/UUYEeB mgkF/cesc4vGgpuzJ6AH4NRZJKVo6SG/vEyX5JwKsoJDktRg0uzkRE2uWSLHgVIh9HvS /jwoMMxGE+eJGW4+ssTnHYQPhbGzBXwog31ciD/C04y+ez+MJTptI0FoH+MsWIG9EHkg ciWg== X-Received: by 10.28.17.8 with SMTP id 8mr17767815wmr.65.1452599382830; Tue, 12 Jan 2016 03:49:42 -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.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 03:49:42 -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/t9119-git-svn-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh index f16f323..88241ba 100755 --- a/t/t9119-git-svn-info.sh +++ b/t/t9119-git-svn-info.sh @@ -8,7 +8,7 @@ test_description='git svn info' # Tested with: svn, version 1.4.4 (r25188) # Tested with: svn, version 1.6.[12345689] -v=`svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p'` +v=$(svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p') case $v in 1.[456].*) ;; -- 2.5.0