From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Date: Wed, 12 Sep 2012 09:42:05 +0000 (+0200)
Subject: Remove mailing list markers of the form [<list-name>] from the subject line to avoid... 
X-Git-Tag: release/2.6.0~339
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b7843cf92e2fa55b89e0993eb82c4453d3736d46;p=debbugs.git

Remove mailing list markers of the form [<list-name>] from the subject line to avoid duplication (and more) of the bug number when replying to bug postings.

Signed-off-by: Don Armstrong <don@donarmstrong.com>
---

diff --git a/debian/changelog b/debian/changelog
index 7e8754de..137bfd2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,9 @@ debbugs (2.4.2~exp2) UNRELEASED; urgency=low
     html_tail from templates, use count_bugs everywhere, load bugs.css,
     fix global variable usage in html header.
   * Add empty $gBugSubscriptionDomain variable to config file template.
+  * Remove mailing list markers of the form [<list-name>] from the subject
+    line to avoid duplication (and more) of the bug number when replying to
+    bug postings.
 
  -- Don Armstrong <don@debian.org>  Wed, 25 Aug 2010 01:57:38 -0700
 
diff --git a/scripts/process b/scripts/process
index e5759586..e313a9d4 100755
--- a/scripts/process
+++ b/scripts/process
@@ -271,7 +271,11 @@ if (!defined($header{'subject'}))
 }
 
 my $ref=-1;
-$subject =~ s/^Re:\s*//i; $_= $subject."\n";
+# remove Re: from the subject line
+$subject =~ s/^Re:\s*//i;
+# remove remaining mailing list name markers from the subject line
+$subject =~ s/^\[.*\]\s*//i;
+$_= $subject."\n";
 if (not defined $tryref and m/^Bug ?\#(\d+)\D/i) {
     $tryref = $1 if $1 > 0;
 }