Patchwork [2/3] UBUNTU: git-ubuntu-log -- tighten up Bug: NNNN matching

login
register
mail settings
Submitter Andy Whitcroft
Date Feb. 10, 2010, 10:13 a.m.
Message ID <1265796839-15820-3-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/45004/
State Changes Requested
Delegated to: Andy Whitcroft
Headers show

Comments

Andy Whitcroft - Feb. 10, 2010, 10:13 a.m.
We are currently miss-matching lines such as the following as Bug:
number links:

    BUG: unable to handle kernel NULL pointer dereference at (null)

Ensure that lines only contain numbers, hashes (#), commas (,) and
spaces.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 debian/scripts/misc/git-ubuntu-log |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/debian/scripts/misc/git-ubuntu-log b/debian/scripts/misc/git-ubuntu-log
index b7ca943..abcfa12 100755
--- a/debian/scripts/misc/git-ubuntu-log
+++ b/debian/scripts/misc/git-ubuntu-log
@@ -189,8 +189,8 @@  sub changelog_input {
 			}
 			while (<STDIN>) {
 				$ignore  =  1 if /^ *Ignore: yes/i;
-				if    (/^ *Bug: *(#|)(.*)/i) {
-					foreach $k (split('(,|)*\s*#', $2)) {
+				if    (/^ *Bug: *(#|)([0-9#,\s]*)\s*$/i) {
+					foreach $k (split('(,|\s)\s*(#|)', $2)) {
 						$bugz{$k} = 1 if (($k ne '') and ($k =~ /[0-9]+/));
 					}
 				}