From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F41DC4332F for ; Tue, 22 Feb 2022 14:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232521AbiBVOHO (ORCPT ); Tue, 22 Feb 2022 09:07:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232421AbiBVOHN (ORCPT ); Tue, 22 Feb 2022 09:07:13 -0500 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AF3FDF7 for ; Tue, 22 Feb 2022 06:06:34 -0800 (PST) Received: by mail-qk1-x735.google.com with SMTP id t21so15676811qkg.6 for ; Tue, 22 Feb 2022 06:06:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=ndaG9E8c5iUlwzPTyCjVUaBSL6/9Phl5ya1e0Sp5ITU=; b=M7ikTlh6fgSh0MtzgWD/HHF9sGVBtlecb3xtNTF0PX7Ly16D21/1ZYvMnSRE389sms 6ja0RQ7b/OWDO8AobmpG1sQ1lbx/qrD866lZ52IrouMk2/ln4wwD1p6rkacMe17Bf4mp WPY1nHuor0HwmZLDaYmPoci5PiUhvi145+aPFW+k9DflPjz8rIcaZsq4PUlblxFDhLXC KUn+Ev80SZhIvC8NWHC6+hct8Bu05gxV7EORQAGQfMmyXpdBm29XmeK1sXhOJirHtH48 ZmNSwH9Il5hSmbjA/dCDktDLeuMTxnatJ5jU/pQ0zpMfPe4JsTIi9D+kYVS91heIdEvB SHOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=ndaG9E8c5iUlwzPTyCjVUaBSL6/9Phl5ya1e0Sp5ITU=; b=IvGl2c85FI4f55UdI3ZPzDa4R7i4JYiGPOBI8kyBa/AVXPcIiVVMKFrtBE5RtO9axC D5095yHuPdckgzs4odVtq9BsNcN41l6fkAGQv1FqJvcJYpV9d5cGnbAepBNYG/EpBPXS OrmFe/sDTxLuaSvCARG05sfIig0R5rwRfGVV0dmT+cjhOdiIhjhc6qf8jzWhlj3e1UuK bZ2BqlRoDJocrzLHO9dNKDy3Ql2vyBvdkIc5MQaDaakn9UZXKyvlNQ9PykRBoWYLQ7Sf AsWRB5Q6eEJUTryM8v5lZ8euu+X97dpOlCFkY/PBtldVwEnJaRa63RSokM5jSs4MzeCS Xj1g== X-Gm-Message-State: AOAM5338CedrlQhDOPNnaOJZGfA1t3onNZHiuNnARNii3QOSuIJ9xLb9 oXFVLBFx9+nVYRE4K7rI1P1ItlMrFenh X-Google-Smtp-Source: ABdhPJyACOSpLlitWf3+86pNPtt8Ss7h6LPKaO7F86xShw9mTbox7GdCCvbSr9nrMjd5J2xLqVJ/Fg== X-Received: by 2002:a05:620a:111b:b0:648:fd03:c029 with SMTP id o27-20020a05620a111b00b00648fd03c029mr4212727qkk.314.1645538764351; Tue, 22 Feb 2022 06:06:04 -0800 (PST) Received: from [192.168.1.110] ([99.85.27.166]) by smtp.gmail.com with ESMTPSA id p14sm10093915qtn.93.2022.02.22.06.06.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Feb 2022 06:06:04 -0800 (PST) Message-ID: Date: Tue, 22 Feb 2022 09:06:03 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] t6423-merge-rename-directories.sh: use the $(...) construct for command substitution Content-Language: en-US To: Elia Pinto , git@vger.kernel.org References: <20220222084646.115147-1-gitter.spiros@gmail.com> From: Derrick Stolee In-Reply-To: <20220222084646.115147-1-gitter.spiros@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 2/22/2022 3:46 AM, Elia Pinto wrote: > 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. This message has some strange left-padding. Could you reduce that whitespace for the majority of your message? > The patch was generated by: > > for _f in $(find . -name "*.sh") > do > shellcheck -i SC2006 -f diff ${_f} | ifne git apply -p2 > done Having some left-padding makes sense for this example. Also, thanks for sharing this automation! > and then carefully proof-read. > - for i in `git ls-files`; do echo side A >>$i; done && > + for i in $(git ls-files); do echo side A >>$i; done && > - for i in `git ls-files`; do echo side B >>$i; done && > + for i in $(git ls-files); do echo side B >>$i; done && > - for i in `git ls-files`; do echo side A >>$i; done && > + for i in $(git ls-files); do echo side A >>$i; done && > - for i in `git ls-files`; do echo side B >>$i; done && > + for i in $(git ls-files); do echo side B >>$i; done && > - for i in `test_seq 1 88`; do > + for i in $(test_seq 1 88); do These changes make sense. Thanks! -Stolee