[PATCH 04/11] lib: Add a ghost messages database feature
authorAustin Clements <aclements@csail.mit.edu>
Fri, 3 Oct 2014 14:19:11 +0000 (10:19 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:04:54 +0000 (10:04 -0800)
e0/a2ea3a767637e667877588aaf47731816a1305 [new file with mode: 0644]

diff --git a/e0/a2ea3a767637e667877588aaf47731816a1305 b/e0/a2ea3a767637e667877588aaf47731816a1305
new file mode 100644 (file)
index 0000000..862ee5f
--- /dev/null
@@ -0,0 +1,120 @@
+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 1CBBF431FCF\r
+       for <notmuch@notmuchmail.org>; Fri,  3 Oct 2014 07:19:46 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 YyqfNB0IRS5k for <notmuch@notmuchmail.org>;\r
+       Fri,  3 Oct 2014 07:19:40 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu\r
+       [18.7.68.36])\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 9084F431FD2\r
+       for <notmuch@notmuchmail.org>; Fri,  3 Oct 2014 07:19:26 -0700 (PDT)\r
+X-AuditID: 12074424-f79346d000004923-f5-542eb06dc4b4\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id E8.BF.18723.D60BE245; Fri,  3 Oct 2014 10:19:25 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s93EJOBg018552; \r
+       Fri, 3 Oct 2014 10:19:24 -0400\r
+Received: from drake.dyndns.org\r
+       (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [216.15.114.40]) (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 s93EJLAT023312\r
+       (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);\r
+       Fri, 3 Oct 2014 10:19:23 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.84)\r
+       (envelope-from <aclements@csail.mit.edu>)\r
+       id 1Xa3hZ-0002Jn-46; Fri, 03 Oct 2014 10:19:21 -0400\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 04/11] lib: Add a ghost messages database feature\r
+Date: Fri,  3 Oct 2014 10:19:11 -0400\r
+Message-Id: <1412345958-8278-5-git-send-email-aclements@csail.mit.edu>\r
+X-Mailer: git-send-email 2.1.0\r
+In-Reply-To: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu>\r
+References: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixCmqrZu7QS/E4MpnQ4vrN2cyOzB6PFt1\r
+       izmAMYrLJiU1J7MstUjfLoErY0HPR7aCG1wVz89PYm1gXMDRxcjJISFgInF96UoWCFtM4sK9\r
+       9WxdjFwcQgKzmSQ+X1rEDOFsYJSYu3sflHObSeLG0lvsEM4SRomDi56wgfSzCehLrFg7iRXE\r
+       FhGQlth5dzaQzcHBLKAm8adLBSQsLOAose7SbLASFgFViTu3vzOClPAKuEnsWFwFcYWcxIbd\r
+       /xlBbE4Bd4kLd5+CTRcCKll1rJttAiP/AkaGVYyyKblVurmJmTnFqcm6xcmJeXmpRbrmermZ\r
+       JXqpKaWbGEFBw+6isoOx+ZDSIUYBDkYlHt4PN3RDhFgTy4orcw8xSnIwKYnyVi7WCxHiS8pP\r
+       qcxILM6ILyrNSS0+xCjBwawkwrtgJVCONyWxsiq1KB8mJc3BoiTOu+kHX4iQQHpiSWp2ampB\r
+       ahFMVoaDQ0mCt309UKNgUWp6akVaZk4JQpqJgxNkOA/QcLAa3uKCxNzizHSI/ClGRSlx3ofr\r
+       gBICIImM0jy4XlhUv2IUB3pFmLcLpJ0HmBDgul8BDWYCGvzOXhdkcEkiQkqqgbH3wkE1P16b\r
+       /Q9nTf9Rz/eQ9deeDye3flV2C/0974NdfOxv4dtva8O3Bv2bwq8psTiil/t06IyDoVvYJ0Ya\r
+       WAR2L3v34fjmxyYm7AdyZ38I9U4/oTWbX9Doq+bTt2+33jsu/b4n+uvs2OwwPbkGd4lXkef2\r
+       dO3j3tn744+E9U4DRuvnT9s8oryVWIozEg21mIuKEwGocOkBxQIAAA==\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: Fri, 03 Oct 2014 14:19:46 -0000\r
+\r
+From: Austin Clements <amdragon@mit.edu>\r
+\r
+This will be implemented over the next several patches.  The feature\r
+is not yet "enabled" (this does not add it to\r
+NOTMUCH_FEATURES_CURRENT).\r
+---\r
+ lib/database-private.h | 7 +++++++\r
+ lib/database.cc        | 2 ++\r
+ 2 files changed, 9 insertions(+)\r
+\r
+diff --git a/lib/database-private.h b/lib/database-private.h\r
+index ca0751c..e2e4bc8 100644\r
+--- a/lib/database-private.h\r
++++ b/lib/database-private.h\r
+@@ -85,6 +85,13 @@ enum _notmuch_features {\r
+      *\r
+      * Introduced: version 2. */\r
+     NOTMUCH_FEATURE_BOOL_FOLDER = 1 << 3,\r
++\r
++    /* If set, missing messages are stored in ghost mail documents.\r
++     * If unset, thread IDs of ghost messages are stored as database\r
++     * metadata instead of in ghost documents.\r
++     *\r
++     * Introduced: version 3. */\r
++    NOTMUCH_FEATURE_GHOSTS = 1 << 4,\r
+ };\r
\r
+ /* In C++, a named enum is its own type, so define bitwise operators\r
+diff --git a/lib/database.cc b/lib/database.cc\r
+index 1c6ffc5..8fd7fad 100644\r
+--- a/lib/database.cc\r
++++ b/lib/database.cc\r
+@@ -286,6 +286,8 @@ static const struct {\r
+       "from/subject/message-ID in database", "w" },\r
+     { NOTMUCH_FEATURE_BOOL_FOLDER,\r
+       "exact folder:/path: search", "rw" },\r
++    { NOTMUCH_FEATURE_GHOSTS,\r
++      "mail documents for missing messages", "w"},\r
+ };\r
\r
+ const char *\r
+-- \r
+2.1.0\r
+\r