[Patch v2 4/4] nmbug: allow empty prefix
[notmuch-archives.git] / a8 / 0c2808d33ce3d56c2899d23ff146f29a22f429
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 63353431FAE\r
6         for <notmuch@notmuchmail.org>; Wed, 20 Feb 2013 14:24:55 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id UWc+92tnPFrQ for <notmuch@notmuchmail.org>;\r
16         Wed, 20 Feb 2013 14:24:54 -0800 (PST)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 19F28431FBC\r
21         for <notmuch@notmuchmail.org>; Wed, 20 Feb 2013 14:24:54 -0800 (PST)\r
22 Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([156.34.82.78] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa\r
25         (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80)\r
26         (envelope-from <bremner@tethera.net>)\r
27         id 1U8I5r-00086V-HV; Wed, 20 Feb 2013 18:24:51 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1U8I5l-00028Q-Qu; Wed, 20 Feb 2013 18:24:45 -0400\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [Patch v2 4/4] nmbug: allow empty prefix\r
34 Date: Wed, 20 Feb 2013 18:24:37 -0400\r
35 Message-Id: <1361399077-7737-5-git-send-email-david@tethera.net>\r
36 X-Mailer: git-send-email 1.7.10.4\r
37 In-Reply-To: <1361399077-7737-1-git-send-email-david@tethera.net>\r
38 References: <1361399077-7737-1-git-send-email-david@tethera.net>\r
39 X-Spam_bar: -\r
40 Cc: David Bremner <bremner@debian.org>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Wed, 20 Feb 2013 22:24:55 -0000\r
54 \r
55 From: David Bremner <bremner@debian.org>\r
56 \r
57 Current code does not distinguish between an empty string in the\r
58 NMBPREFIX environment variable and the variable being undefined. This\r
59 makes it impossible to define an empty prefix, if, e.g. somebody wants\r
60 to dump all of their tags with nmbug.\r
61 ---\r
62  devel/nmbug/nmbug |    2 +-\r
63  1 file changed, 1 insertion(+), 1 deletion(-)\r
64 \r
65 diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug\r
66 index b9c70e4..90d98b6 100755\r
67 --- a/devel/nmbug/nmbug\r
68 +++ b/devel/nmbug/nmbug\r
69 @@ -13,7 +13,7 @@ my $NMBGIT = $ENV{NMBGIT} || $ENV{HOME}.'/.nmbug';\r
70  \r
71  $NMBGIT .= '/.git' if (-d $NMBGIT.'/.git');\r
72  \r
73 -my $TAGPREFIX = $ENV{NMBPREFIX} || 'notmuch::';\r
74 +my $TAGPREFIX = defined($ENV{NMBPREFIX}) ? $ENV{NMBPREFIX} : 'notmuch::';\r
75  \r
76  # for encoding\r
77  \r
78 -- \r
79 1.7.10.4\r
80 \r