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 ESMTP id 3C24B3855014 for ; Wed, 7 Jul 2021 21:01:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3C24B3855014 Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-LS7vcSFUMkem2m9_inTm_w-1; Wed, 07 Jul 2021 17:01:48 -0400 X-MC-Unique: LS7vcSFUMkem2m9_inTm_w-1 Received: by mail-pg1-f198.google.com with SMTP id n21-20020a6563d50000b029022866cd1f17so2638757pgv.10 for ; Wed, 07 Jul 2021 14:01:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PhX5sM1ydT5pGN8k4rc64KK+OnnJH7T4Z/MeuP3GBuI=; b=T7F8S96+fuIxbaAwJfMbgMz1C3i/69XaMnixvqJQtDMenIIrFFylYOd8xz6kN9katI 2EWQ+V40dROpZlo61k7cnAzbN9xS2gs8jMByxSsIw8Wz00v6vd6H91SBLWMnYkaS9xu8 OtincPcKfwEHykKm9pS0AaHurYWrqAm8XeMCRRjRrrTUQ8LERCFwONao5ntDVFoyfPPv FtLkFacUvwJCb4cJEEOhJ54Wd2tjrtzL73jXf9FuiZDJe7ko1lnxLn5vAiOkncHpixpn kMWkJWPrVAucdu6ZAh/cJbfMrTeP13OGljXL2Wv7yqVerjMh4bODSMhZ4KWZavwDYKk2 vX0w== X-Gm-Message-State: AOAM530jrhCA5fttN6LZU9d0EEiP/RpFjElMfsF/QWwcRTZAnDJKwnms Wua5BnsfJhRC1hqSbtvr+XVfIJjzUzd5y4dxViNcsgf7ux+HzUqSkabqpRbLCrM59Od1RFQlooc w7ORiEqI7u3+D3U8brh6U2Ag= X-Received: by 2002:a63:4242:: with SMTP id p63mr8702732pga.185.1625691707702; Wed, 07 Jul 2021 14:01:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/4JY81NmFT+d/BHP+NdHUihFDsjlj34aMul3LQh30yRctnpQRjzrY6QGdfgPDCj6e13kQOtPXwNcBO5o9OUA= X-Received: by 2002:a63:4242:: with SMTP id p63mr8702703pga.185.1625691707396; Wed, 07 Jul 2021 14:01:47 -0700 (PDT) MIME-Version: 1.0 References: <20210707175142.GB39218@iPadvonndlhumer> In-Reply-To: <20210707175142.GB39218@iPadvonndlhumer> From: Jason Merrill Date: Wed, 7 Jul 2021 17:01:36 -0400 Message-ID: Subject: Re: where is PRnnnn required again? To: Jakub Jelinek Cc: Martin Sebor , gcc mailing list X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 21:01:52 -0000 On Wed, Jul 7, 2021 at 1:54 PM Jakub Jelinek via Gcc wrote: > On Tue, Jul 06, 2021 at 03:20:26PM -0600, Martin Sebor via Gcc wrote: > > I came away from the recent discussion of ChangeLogs requirements > > with the impression that the PRnnnn bit should be in the subject > > (first) line and also above the ChangeLog part but doesn't need > > to be repeated again in the ChangeLog entries. But my commit > > below was rejected last Friday with the subsequent error. Adding > > PR middle-end/98871 to the ChangeLog entry let me push the change: > > > > https://gcc.gnu.org/g:6feb628a706e86eb3f303aff388c74bdb29e7381 > > > > I just had the same error happen now, again with what seems like > > a valid commit message. Did I misunderstand something or has > > something changed recently? > > > > Martin > > > > commit 8a6d08bb49c2b9585c2a2adbb3121f6d9347b780 (HEAD -> master) > > Author: Martin Sebor > > Date: Fri Jul 2 16:16:31 2021 -0600 > > > > Improve warning suppression for inlined functions [PR98512]. > > This states a PR number on the first line > > > > Resolves: > > PR middle-end/98871 - Cannot silence -Wmaybe-uninitialized at > > declaration si > > te > > PR middle-end/98512 - #pragma GCC diagnostic ignored ineffective in > > conjunct > > ion with alias attribute > > but these are intentionally not considered part of the ChangeLog entry, > so it isn't specified anywhere and that is why it has been rejected. > > The ChangeLog entry must be in a rigid form so that random text in the > middle > of the commit message isn't mistaken for start of the ChangeLog entry. > > contrib/gcc-changelog/git_commit.py > has > author_line_regex = \ > re.compile(r'^(?P\d{4}-\d{2}-\d{2})\ {2}(?P.* > <.*>)') > changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)ChangeLog:?') > pr_regex = re.compile(r'\tPR (?P[a-z+-]+\/)?([0-9]+)$') > dr_regex = re.compile(r'\tDR ([0-9]+)$') > star_prefix_regex = re.compile(r'\t\*(?P\ *)(?P.*)') > and will consider as first line of the ChangeLog part: > if (changelog_regex.match(b) or self.find_changelog_location(b) > or star_prefix_regex.match(b) or pr_regex.match(b) > or dr_regex.match(b) or author_line_regex.match(b) > or b.lower().startswith(CO_AUTHORED_BY_PREFIX)): > self.changes = body[i:] > return > Once something is considered a ChangeLog part, everything after it has > to be a valid ChangeLog entry format. > Matching just PR component/NNNNN with random text afterwards at the start > of line or even somewhere in the middle would trigger any time one talks > about some > PR in the description. > But this *could* accept ^PR comp/NNNNN - descr$ , it just doesn't currently. There's certainly a lot of precedent for including the description in the PR line in ChangeLog files. I agree we don't want to match a PR number in the middle of the line, or without the dash. Jason