From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 363E43858435 for ; Wed, 9 Mar 2022 18:09:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 363E43858435 Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-526-wb2oxIXFMqK7cpaAZiazxQ-1; Wed, 09 Mar 2022 13:09:01 -0500 X-MC-Unique: wb2oxIXFMqK7cpaAZiazxQ-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-2dbd2b5e180so21129887b3.3 for ; Wed, 09 Mar 2022 10:09:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=AWFCwTMklypf7RASR2v706PBPiTx+D1N9QQoJf6ViSU=; b=73+PVb/ib0MJutF50TNvL0kjJjp04V+U65BRtdaqxx1IxvgGPQ1MaI4JrezZb2PPmu VgtnzLpkAXDGDtCmEWBxi7pysRn9vV4qw72buPrxylxm6dDMQCzRRFbboc29QPUN1s+5 2ikbkM5oUjni52QJJd8Nyh+Sc5siAwmzy9k2JdJwyJEJiid9tDJl+R7blKY4PtsviIXp esxA2Wpqz9l+SXLnwsg9KC2GWZ6fsksP3EXWjtWaF7x3GFhbCSxNO184SRGaPJUR95BV +QDkY6bxQT+Ni6qqHljZXDpPV5ko8DQJg5CdfL9sUyBsDQPd7gVw/XaVYFA4FdbFEZD+ IRSQ== X-Gm-Message-State: AOAM533hzcUqSR58uUu1BNIWsLF6PahcgI1ipE+5jg94UCLUjw3dLh33 hm4d/XmFy/CgixPjPbgkWMF0jcH2B88lYGm/Lx+PA7rIITLoIQHT6XEFY0bUBhTXNTm6rWIKCQZ 5jfBo8qUlZDkpwIZOBUzfqFGeFj3VyJti9w== X-Received: by 2002:a0d:d48a:0:b0:2db:fc67:e0a4 with SMTP id w132-20020a0dd48a000000b002dbfc67e0a4mr846500ywd.475.1646849341010; Wed, 09 Mar 2022 10:09:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwR9ocNf30t93r3ydiYiUYF8JrjL9Y+hsRmp6iqXVgVT6ELpcmv1k4iJW72ZAMBZHmmZKSc0ba7NB8+8YlS5sU= X-Received: by 2002:a0d:d48a:0:b0:2db:fc67:e0a4 with SMTP id w132-20020a0dd48a000000b002dbfc67e0a4mr846480ywd.475.1646849340776; Wed, 09 Mar 2022 10:09:00 -0800 (PST) MIME-Version: 1.0 References: <20220308175834.1550945-1-jwakely@redhat.com> In-Reply-To: From: Jonathan Wakely Date: Wed, 9 Mar 2022 18:08:49 +0000 Message-ID: Subject: Re: [PATCH] contrib: Fix non-portable sed commands in gcc-descr [PR102664/] To: Patrick Palka Cc: Mikael Morin , GCC Patches , marxin@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2022 18:09:04 -0000 On Wed, 9 Mar 2022 at 17:40, Patrick Palka wrote: > > On Wed, Mar 9, 2022 at 8:54 AM Mikael Morin wrot= e: > > > > Hello, > > > > Le 08/03/2022 =C3=A0 18:58, Jonathan Wakely via Gcc-patches a =C3=A9cri= t : > > > Replace \([0-9]\+\) with \([0-9][0-9]*\) or with \([1-9][0-9]*\) in r= elease branch numbers, where > > > a leading zero does not occur. > > > > > Note that you also changed some gcc-[0-9]* to gcc-[1-9]*, which is a > > typo/thinko I guess? It looks like it wouldn=E2=80=99t match gcc-10 an= y more > > for example=E2=80=A6 > > Perhaps related to this, I noticed the following > git gcc-descr ea1ce0d163ea1d63b6837144ae4be51d92630007 > now fails with > fatal: No tags can describe 'ea1ce0d163ea1d63b6837144ae4be51d92630007'. > instead of outputting > r0-52309-gea1ce0d163ea1d Ah yes, now that one is a bug. Changing it to [1-9]* was intentional, and does still match gcc-10, but I forgot we have "r0" for really old commits. > > > > > > diff --git a/contrib/git-descr.sh b/contrib/git-descr.sh > > > index ba5d711f330..95363279d8c 100755 > > > --- a/contrib/git-descr.sh > > > +++ b/contrib/git-descr.sh > > > @@ -18,11 +18,11 @@ do > > > done > > > > > > if test x$short =3D xyes; then > > > - r=3D$(git describe --all --match 'basepoints/gcc-[0-9]*' $c | se= d -n 's,^\(tags/\)\?basepoints/gcc-\([0-9]\+\)-\([0-9]\+\)-g[0-9a-f]*$,r\2-= \3,p;s,^\(tags/\)\?basepoints/gcc-\([0-9]\+\)$,r\2-0,p'); > > > + r=3D$(git describe --all --match 'basepoints/gcc-[1-9]*' $c | se= d -n 's,^tags/,,;s,^basepoints/gcc-\([1-9][0-9]*\)-\([0-9][0-9]*\)-g[0-9a-f= ]*$,r\1-\2,p;s,^basepoints/gcc-\([1-9][0-9]*\)$,r\1-0,p'); > > > > =E2=80=A6here=E2=80=A6 > > > > > elif test x$long =3D xyes; then > > > - r=3D$(git describe --all --abbrev=3D40 --match 'basepoints/gcc-[= 0-9]*' $c | sed -n 's,^\(tags/\)\?basepoints/gcc-,r,p') > > > + r=3D$(git describe --all --abbrev=3D40 --match 'basepoints/gcc-[= 1-9]*' $c | sed -n 's,^tags/,,;s,^basepoints/gcc-,r,p') > > > > =E2=80=A6 and here =E2=80=A6 > > > > > else > > > - r=3D$(git describe --all --abbrev=3D14 --match 'basepoints/gcc-[= 0-9]*' $c | sed -n 's,^\(tags/\)\?basepoints/gcc-,r,p'); > > > + r=3D$(git describe --all --abbrev=3D14 --match 'basepoints/gcc-[= 1-9]*' $c | sed -n 's,^tags/,,;s,^basepoints/gcc-,r,p') > > > > =E2=80=A6 and here. > > >