[PATCH 2/2] lib: fix an exclude bug
authorMark Walters <markwalters1009@gmail.com>
Mon, 12 Mar 2012 11:31:54 +0000 (11:31 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:26 +0000 (09:45 -0800)
8b/1fa8db5b3ef7c2250e8b650a515bfff554963f [new file with mode: 0644]

diff --git a/8b/1fa8db5b3ef7c2250e8b650a515bfff554963f b/8b/1fa8db5b3ef7c2250e8b650a515bfff554963f
new file mode 100644 (file)
index 0000000..8adb8b2
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 97B0D431FDA\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:32:07 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id nDindbRcwrwa for <notmuch@notmuchmail.org>;\r
+       Mon, 12 Mar 2012 04:32:06 -0700 (PDT)\r
+Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com\r
+       [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A9F04431FD4\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:32:02 -0700 (PDT)\r
+Received: by mail-wi0-f173.google.com with SMTP id hq7so2904632wib.2\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:32:02 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=Plo72Kk2I9vFlWvOC36Ei+d49YpOBszVzPQACGMsqsw=;\r
+       b=L5KgxJawoHm75fT/yJd6KiUt0s4+5p3qFYWb8bFhlxPGo1m13HK3GlZBU6o00O+SyJ\r
+       0bCKaR1MSrzjjnXEyT3hd72qR5IFf57RwPfvjaz+yIcgbc6meZkKPubDFuq8sV4z/GSN\r
+       XJCKoFwuq6XMjjL0KRzMuL0wbXbHIUmzH7T7y3aEQfVMjqp8iL1ExGkd7z0ZuJxLIkTy\r
+       T61pQWEGi+J4pw22X9OIe/97NszVV9vIcjFbxTfLam9CrVf9n58a78Ypkccwv5ypfiO1\r
+       xw8tpGdOEKIL7QSuldB2MCdF6vfhPoWkMwzuGeKSrFfZRyeAEKS2kdYWvYPR6HVA7Mw3\r
+       8TgQ==\r
+Received: by 10.180.105.69 with SMTP id gk5mr6958371wib.3.1331551922400;\r
+       Mon, 12 Mar 2012 04:32:02 -0700 (PDT)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223])     by mx.google.com with ESMTPS id\r
+ w14sm33173137wiv.11.2012.03.12.04.32.01       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 12 Mar 2012 04:32:01 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] lib: fix an exclude bug\r
+Date: Mon, 12 Mar 2012 11:31:54 +0000\r
+Message-Id: <1331551914-28323-3-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1331551914-28323-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1331551914-28323-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 12 Mar 2012 11:32:08 -0000\r
+\r
+One test using the new exclude code was failing in some\r
+configurations.  This patch makes it work for me. It may be a "fix"\r
+but I do not see why it fixes it.\r
+---\r
+ lib/query.cc |    5 +++--\r
+ 1 files changed, 3 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/lib/query.cc b/lib/query.cc\r
+index ab18fbc..2b73d72 100644\r
+--- a/lib/query.cc\r
++++ b/lib/query.cc\r
+@@ -213,13 +213,14 @@ notmuch_query_search_messages (notmuch_query_t *query)\r
\r
+       if (query->exclude_terms) {\r
+           exclude_query = _notmuch_exclude_tags (query, final_query);\r
+-          exclude_query = Xapian::Query (Xapian::Query::OP_AND,\r
+-                                         exclude_query, final_query);\r
\r
+           if (query->omit_excluded_messages)\r
+               final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,\r
+                                            final_query, exclude_query);\r
+           else {\r
++              exclude_query = Xapian::Query (Xapian::Query::OP_AND,\r
++                                         exclude_query, final_query);\r
++\r
+               enquire.set_weighting_scheme (Xapian::BoolWeight());\r
+               enquire.set_query (exclude_query);\r
\r
+-- \r
+1.7.9.1\r
+\r