public inbox for overseers@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: <libc-alpha@sourceware.org>, <overseers@sourceware.org>
Subject: The email-to-bugzilla bug-number-matching regular expression
Date: Fri, 17 Sep 2021 16:38:02 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2109171633250.3823047@digraph.polyomino.org.uk> (raw)

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"?

-- 
Joseph S. Myers
joseph@codesourcery.com

             reply	other threads:[~2021-09-17 16:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 16:38 Joseph Myers [this message]
2021-09-17 17:09 ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2109171633250.3823047@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=overseers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).