--- /dev/null
+Return-Path: <aclements@csail.mit.edu>\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 13402431FD5\r
+ for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 10:57:14 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.139\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.139 tagged_above=-999 required=5\r
+ tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_MED=-2.3,\r
+ UNPARSEABLE_RELAY=0.001] 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 as-z3XRV9-C7 for <notmuch@notmuchmail.org>;\r
+ Thu, 15 Jan 2015 10:57:10 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (dmz-mailsec-scanner-3.mit.edu\r
+ [18.9.25.14])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id B69C8431FBC\r
+ for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 10:57:10 -0800 (PST)\r
+X-AuditID: 1209190e-f799e6d000000cfe-ff-54b80d8572fd\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+ (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (Client did not present a certificate)\r
+ by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 6D.D3.03326.58D08B45; Thu, 15 Jan 2015 13:57:09 -0500 (EST)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id t0FIv9rL028821; \r
+ Thu, 15 Jan 2015 13:57:09 -0500\r
+Received: from [100.110.13.240] ([216.239.55.240]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id t0FIv6hP028082\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);\r
+ Thu, 15 Jan 2015 13:57:07 -0500\r
+User-Agent: K-9 Mail for Android\r
+In-Reply-To: <87y4p47ygn.fsf@nikula.org>\r
+References: <1421193628-2699-1-git-send-email-todd@electricoding.com>\r
+ <1421193628-2699-3-git-send-email-todd@electricoding.com>\r
+ <87y4p47ygn.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: 8bit\r
+Content-Type: text/plain;\r
+ charset=UTF-8\r
+Subject: Re: [PATCH v2 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES\r
+ database feature\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+Date: Thu, 15 Jan 2015 13:57:03 -0500\r
+To: Jani Nikula <jani@nikula.org>, Todd <todd@electricoding.com>,\r
+ notmuch@notmuchmail.org\r
+Message-ID: <9ECDA9FC-AC29-48D0-A50B-F8B274E9A16C@csail.mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprCKsWRmVeSWpSXmKPExsUixG6notvKuyPEYM0jK4um6c4W12/OZLZo\r
+ 3bqAyYHZ437vF2aPW/dfs3s8W3WLOYA5issmJTUnsyy1SN8ugSvj0sPbbAXfpCpmTrrI3sDY\r
+ J9rFyMkhIWAicWHCajYIW0ziwr31QDYXh5DAYiaJhkermSGcjYwS91Z+YIRymCRWbrzNBNIi\r
+ KqAgMW/yREYQm1NAQ2Lt/DUsEEWzGSXefX3PApLgFRCUODnzCZjNLCAv0bx1NjOErSlx7fgW\r
+ dhBbWCBM4sOHK2BxNgF9iRVrJ7GC2CwCqhIz158D6uXgEBFIktjxE2qkg8TK/y/YJzAKzEKy\r
+ YRaSDbOQbFjAyLyKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI11gvN7NELzWldBMjKHg5Jfl2MH49\r
+ qHSIUYCDUYmHl8Fve4gQa2JZcWXuIUZJDiYlUd6wz0AhvqT8lMqMxOKM+KLSnNTiQ4wSHMxK\r
+ Iry8zDtChHhTEiurUovyYVLSHCxK4rybfvCFCAmkJ5akZqemFqQWwWQ1ODgEDpyZO51JiiUv\r
+ Py9VSYI3lQdoiGBRanpqRVpmTglCKRMHJ8giHqBFO0BqeIsLEnOLM9Mh8qcYjTkmPNg1k4lj\r
+ 2okDM5mEwMZJifM+BCkVACnNKM2DmwZLTK8YxYEeFeY9CFLFA0xqcPNeAa1iAlrVkLQVZFVJ\r
+ IkJKqoGxiJPl926+fo2Xfd2Cs/g5ON4knvWevXyy7YZqZwHLz1J3EnNOrfkd8DShvljeIXze\r
+ vZ7pVRuYYz9b/DWOYOPfaanTFjF3kdmd6zM3u0Sv38Z3PaB4z7fNexzuyPCkW7cbZShcTr4l\r
+ unv3nJzeuS9v8DOfcLu1pPSuvHqz4bIZP7k+BC2OzlurxFKckWioxVxUnAgA/zMYeycDAAA=\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: Thu, 15 Jan 2015 18:57:14 -0000\r
+\r
+Just one nit. Otherwise this patch LGTM.\r
+\r
+On January 15, 2015 12:20:08 PM EST, Jani Nikula <jani@nikula.org> wrote:\r
+>\r
+>Austin, would you mind having a look at this one please?\r
+>\r
+>Thanks,\r
+>Jani.\r
+>\r
+>On Wed, 14 Jan 2015, Todd <todd@electricoding.com> wrote:\r
+>> ---\r
+>> lib/database-private.h | 15 ++++++++++++---\r
+>> lib/database.cc | 10 ++++++++--\r
+>> 2 files changed, 20 insertions(+), 5 deletions(-)\r
+>>\r
+>> diff --git a/lib/database-private.h b/lib/database-private.h\r
+>> index 15e03cc..6d6fa2c 100644\r
+>> --- a/lib/database-private.h\r
+>> +++ b/lib/database-private.h\r
+>> @@ -92,6 +92,14 @@ enum _notmuch_features {\r
+>> *\r
+>> * Introduced: version 3. */\r
+>> NOTMUCH_FEATURE_GHOSTS = 1 << 4,\r
+>> +\r
+>> +\r
+>> + /* If set, then the database was created after the introduction\r
+>of\r
+>> + * indexed mime types. If unset, then the database may contain a\r
+>> + * mixture of messages with indexed and non-indexed mime types.\r
+>> + *\r
+>> + * Introduced: version 3. */\r
+>> + NOTMUCH_FEATURE_INDEXED_MIMETYPES = 1 << 5,\r
+>> };\r
+>> \r
+>> /* In C++, a named enum is its own type, so define bitwise operators\r
+>> @@ -161,9 +169,10 @@ struct _notmuch_database {\r
+>> \r
+>> /* Current database features. If any of these are missing from a\r
+>> * database, request an upgrade.\r
+>> - * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES is not included because\r
+>> - * upgrade doesn't currently introduce the feature (though brand new\r
+>> - * databases will have it). */\r
+>> + * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES and\r
+>> + * NOTMUCH_FEATURE_INDEXED_MIMETYPES are not included because\r
+>upgrade\r
+>> + * doesn't currently introduce the features (though brand new\r
+>databases\r
+>> + * will have it). */\r
+>> #define NOTMUCH_FEATURES_CURRENT \\r
+>> (NOTMUCH_FEATURE_FILE_TERMS | NOTMUCH_FEATURE_DIRECTORY_DOCS | \\r
+>> NOTMUCH_FEATURE_BOOL_FOLDER | NOTMUCH_FEATURE_GHOSTS)\r
+>> diff --git a/lib/database.cc b/lib/database.cc\r
+>> index 3601f9d..2de60f8 100644\r
+>> --- a/lib/database.cc\r
+>> +++ b/lib/database.cc\r
+>> @@ -304,6 +304,11 @@ static const struct {\r
+>> "exact folder:/path: search", "rw" },\r
+>> { NOTMUCH_FEATURE_GHOSTS,\r
+>> "mail documents for missing messages", "w"},\r
+>> + /* Knowledge of the index mime-types are not required for\r
+>reading\r
+>> + * a database because a reader will just be unable to query\r
+>> + * them. */\r
+>> + { NOTMUCH_FEATURE_INDEXED_MIMETYPES,\r
+>> + "mime-types in database", "w"},\r
+\r
+I would label this "indexed MIME types" to be closer to the enum and because "MIME" is an acronym and hence should be capitalized.\r
+\r
+>> };\r
+>> \r
+>> const char *\r
+>> @@ -646,9 +651,10 @@ notmuch_database_create (const char *path,\r
+>notmuch_database_t **database)\r
+>> if (status)\r
+>> goto DONE;\r
+>> \r
+>> - /* Upgrade doesn't add this feature to existing databases, but\r
+>new\r
+>> - * databases have it. */\r
+>> + /* Upgrade doesn't add these feature to existing databases, but\r
+>> + * new databases have them. */\r
+>> notmuch->features |= NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES;\r
+>> + notmuch->features |= NOTMUCH_FEATURE_INDEXED_MIMETYPES;\r
+>> \r
+>> status = notmuch_database_upgrade (notmuch, NULL, NULL);\r
+>> if (status) {\r
+>> -- \r
+>> 1.9.1\r
+>>\r
+>> _______________________________________________\r
+>> notmuch mailing list\r
+>> notmuch@notmuchmail.org\r
+>> http://notmuchmail.org/mailman/listinfo/notmuch\r
+\r