From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 688BE3858420; Fri, 17 Sep 2021 17:10:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 688BE3858420 Received: by mail-pj1-x1032.google.com with SMTP id p12-20020a17090adf8c00b0019c959bc795so2249512pjv.1; Fri, 17 Sep 2021 10:10:24 -0700 (PDT) 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; bh=fNvT0oTSmIV+IBoEXkojMCar/V420sKs7JBBPp9i+AI=; b=VfgEl2VuUOTHuEpp0EGvvzWGUYDhCslh80GhRftM6orRDAGsFb/g6MZnvxK9SkeDUv /NBuaHvVYK7AvHKbpNjs3kOr0ZtWDKqoQ25pJ9GAWqiQqb0KUw6ELjWVMvacc8C7skgF FuW7+uuyJT6uUQDmJTmadcaeTmD1+3l3Vf8PnYvdX5qOFhFaeJnPm0u9gk8k7WOSZsIN qsP20jSulJftjazfuy2Mr0fBQctb/O8XLsQ+j/k32Ux4y8uhytXaRYoIFdNWnlp/ZYkF Z/AGCM0m0XWIwJ4C9iiS7+0cWY54TnIHH2glEd+Hd5T4Qzl+LR4h5N5Ouh9cbFbDhr9p lxCg== X-Gm-Message-State: AOAM532HOkCmsm6zKarBJIVCWJXVrrNcPFGzjK76wT2f2ALnyac/3rT6 sZMoKbIT0xGuX/YMmOY3Ix54eDyblXhqOeQJsnLwLJGY X-Google-Smtp-Source: ABdhPJzUoSre+/kk6lFiZQOpKyxiDXThhYqQNip3vdwVYg4q4ZuqJdzMMSedWqBWr46+Pk2p8B0EzxOpgMpY2CbTKks= X-Received: by 2002:a17:90a:9292:: with SMTP id n18mr22182852pjo.120.1631898623342; Fri, 17 Sep 2021 10:10:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "H.J. Lu" Date: Fri, 17 Sep 2021 10:09:47 -0700 Message-ID: Subject: Re: The email-to-bugzilla bug-number-matching regular expression To: Joseph Myers Cc: GNU C Library , Overseers mailing list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3024.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: overseers@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Overseers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2021 17:10:26 -0000 On Fri, Sep 17, 2021 at 9:38 AM Joseph Myers wrote: > > Since Apr 2020, /sourceware/infra/bin/email-to-bugzilla has matched bug > numbers with: > > while ($log_txt =~ m/\s(?:bug|PR|BZ)\s+\#?\s*(?:[a-z0-9+-]+\/)?(?:\/)?(\d+)(.*)$/si) { > > That is, whitespace is required before "bug", "PR" or "BZ". That's fine > for GCC commit conventions (bug numbers mentioned in a ChangeLog entry in > the commit message, "PR c/123456" after a TAB). It doesn't work very well > for glibc commit messages (no ChangeLog entries used, bug numbers often > mentioned only in the form "(bug 12345)" or "[BZ #12345]" in the commit > summary line. > > Could we use \b instead of \s at the start of the regular expression, so > we still avoid matching "Apr 1", but do match "(bug" or "[BZ"? > Another problem is that the hook doesn't check the BZ # in commit subject. -- H.J.