From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B793E1F8C8 for ; Fri, 24 Sep 2021 19:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345056AbhIXTgI (ORCPT ); Fri, 24 Sep 2021 15:36:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344824AbhIXTgH (ORCPT ); Fri, 24 Sep 2021 15:36:07 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE092C061571 for ; Fri, 24 Sep 2021 12:34:33 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id y89so29314418ede.2 for ; Fri, 24 Sep 2021 12:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=Isw/R9B3AEqB3850FWxicXktjr/fF2Lq9m23xQVf2xE=; b=g2aYqCRKsvgGGu1cBQpwpmbJ4tHvGeNbnUOaQeHzujXDuVx0MXjIvczZqNCt5LdiJE LZd7N74oBK24yYwUUK3AreqiAPwp20YMEkCW0mRJVMnMH2as7B1tT+ykLahtMSt+V509 io10gchaIKtVghcUzs11wweTuLoSePOyWZEN1LYpTHG5UcCHkSsXya55dmko25Mtvw3X EuDWMRANUrrFemJATEcB7tx6KMRQlHoMHTd7zrv48NXEoG/yWYt0neKJkjTe7Q6aRAGU SndMYryLLwj1qmEu2OR21ugn1r5ft1EfIk/1HfF+BFDgfnioc560uJ7UTzp8y3Jh9C3e tDRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:references:user-agent :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=Isw/R9B3AEqB3850FWxicXktjr/fF2Lq9m23xQVf2xE=; b=un+BPL/V0lG6oCX1pXY3ZEA6frHiEjq/pGVmg8FuY1hqKGfrV0/50VXTnikLl/23am ErXA0/DvQDzt/F7+Ea2ArFD+zXgqHG1GZZxoPrzR0+8BP4EYa5FbbLKwHEY5VAhy3U9h sh05l8wzvx8RFEX5KzIDR5T4vR1eIkVf4/9fDD1kvQj+RhWlg/zTYDYd1nSOsRJLsSk2 h4Eh3oOrnXHC639G+HtGL92rtEf2vMik4D17bYOmFdIsdNI3Tq8EcSRluXm2odEyeACG gN01xCykkCTD7XCWZYcudJoSX/S48tXhy1j/KKy4CcCDslWPEdZFYlYaiNm+xybHNg5G WMiA== X-Gm-Message-State: AOAM533L3xgCnQR4nyfKHsSxQH4m/I3p/wEY8Qv80rmu2KtBQhh4Srll Yi0Whza0kTMhsXi2F8ylJj8= X-Google-Smtp-Source: ABdhPJzEXyDXuU3cKZNVfS5UXd+GM7SgcM7JOQXF/djDgDf7YpUx4IuMyfQPE6jsPk+elYLCJYyhbg== X-Received: by 2002:a50:d94f:: with SMTP id u15mr6929900edj.140.1632512072220; Fri, 24 Sep 2021 12:34:32 -0700 (PDT) Received: from evledraar ([109.38.130.174]) by smtp.gmail.com with ESMTPSA id t4sm6490484edc.2.2021.09.24.12.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 12:34:31 -0700 (PDT) From: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason To: phillip.wood@dunelm.org.uk Cc: git@vger.kernel.org, Junio C Hamano , Emily Shaffer , Jeff King , =?utf-8?Q?Ren=C3=A9?= Scharfe Subject: Re: [PATCH 8/8] hook-list.h: add a generated list of hooks, like config-list.h Date: Fri, 24 Sep 2021 21:30:04 +0200 References: <92471ff9-7573-c3e4-e9fd-63a5cbf5738f@gmail.com> User-agent: Debian GNU/Linux bookworm/sid; Emacs 27.1; mu4e 1.7.0 In-reply-to: <92471ff9-7573-c3e4-e9fd-63a5cbf5738f@gmail.com> Message-ID: <87fstt3gzd.fsf@evledraar.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Sep 24 2021, Phillip Wood wrote: > Hi =C3=86var > On 23/09/2021 11:30, =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason wrote: >> diff --git a/generate-hooklist.sh b/generate-hooklist.sh >> new file mode 100755 >> index 00000000000..6d4e56d1a31 >> --- /dev/null >> +++ b/generate-hooklist.sh >> @@ -0,0 +1,18 @@ >> +#!/bin/sh >> +# >> +# Usage: ./generate-hooklist.sh >hook-list.h >> + >> +cat <> +/* Automatically generated by generate-hooklist.sh */ >> + >> +static const char *hook_name_list[] =3D { >> +EOF >> + >> +sed -n -e '/^~~~~*$/ {x; s/^.*$/ "&",/; p;}; x' \ > > POSIX does not support using a semicolon after a closing brace [1], > grepping our code base with > git grep 'sed .*};' '*.sh' > does not give any matches so I don't think we're using that pattern > any where else. Replacing the semicolon with ' -e' would fix it. > > Best Wishes > > Phillip Does this fail on any system you're aware of? If so what OS/version (and preferably version of "sed"). Ren=C3=A9's downthread seems = to suggest that this is fine. Both beforehand and just now I've tested this on AIX, Solaris, {Open,Net,Free}BSD, HP/UX, OSX and Linux (a few distros/versions). All of them are able to generate the same hook-list.h using this version of the patch.