From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthieu Moy Subject: Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution Date: Wed, 26 Mar 2014 13:19:54 +0100 Message-ID: References: <1395768283-31135-1-git-send-email-gitter.spiros@gmail.com> <1395768283-31135-2-git-send-email-gitter.spiros@gmail.com> <8738i6uihf.fsf@fencepost.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Junio C Hamano , Elia Pinto , git@vger.kernel.org To: David Kastrup X-From: git-owner@vger.kernel.org Wed Mar 26 13:20:16 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 1WSmoZ-0002Uz-H0 for gcvg-git-2@plane.gmane.org; Wed, 26 Mar 2014 13:20:15 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754203AbaCZMUH convert rfc822-to-quoted-printable (ORCPT ); Wed, 26 Mar 2014 08:20:07 -0400 Received: from mx1.imag.fr ([129.88.30.5]:43358 "EHLO shiva.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753743AbaCZMUG (ORCPT ); Wed, 26 Mar 2014 08:20:06 -0400 Received: from clopinette.imag.fr (clopinette.imag.fr [129.88.34.215]) by shiva.imag.fr (8.13.8/8.13.8) with ESMTP id s2QCJrne023357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Mar 2014 13:19:53 +0100 Received: from anie.imag.fr (anie.imag.fr [129.88.7.32]) by clopinette.imag.fr (8.13.8/8.13.8) with ESMTP id s2QCJseJ011112; Wed, 26 Mar 2014 13:19:54 +0100 In-Reply-To: <8738i6uihf.fsf@fencepost.gnu.org> (David Kastrup's message of "Tue, 25 Mar 2014 21:32:44 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (shiva.imag.fr [129.88.30.5]); Wed, 26 Mar 2014 13:19:53 +0100 (CET) X-IMAG-MailScanner-Information: Please contact MI2S MIM for more information X-MailScanner-ID: s2QCJrne023357 X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-SpamCheck: X-IMAG-MailScanner-From: matthieu.moy@grenoble-inp.fr MailScanner-NULL-Check: 1396441194.73191@Y+P5nSiuBks8O08E1zNaYQ Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: David Kastrup writes: > Junio C Hamano writes: > >> Elia Pinto writes: >> >>> The Git CodingGuidelines prefer the $( ... ) construct for command >>> substitution instead of using the back-quotes, or grave accents (`.= =2E`). >>> >>> The backquoted form is the historical method for command substituti= on, >>> and is supported by POSIX. However, all but the simplest uses becom= e >>> complicated quickly. In particular, embedded command substitutions >>> and/or the use of double quotes require careful escaping with the b= ackslash >>> character. Because of this the POSIX shell adopted the $(=E2=80=A6)= feature from >>> the Korn shell. >>> >>> The patch was generated by the simple script >>> >>> for _f in $(find . -name "*.sh") >>> do >>> =C2=A0 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} >>> done >> >> "and then carefully proofread" is sorely needed here. > > It would already help to skip comment lines. Actually no: most comments including `...` are code examples that we want to fix too, except 3 instances (see my other message). --=20 Matthieu Moy http://www-verimag.imag.fr/~moy/