From: Austin Clements Date: Mon, 6 Oct 2014 23:17:10 +0000 (+1800) Subject: [PATCH v2 04/12] lib: Add a ghost messages database feature X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d6f9f8e3997c012a150ab790f5fcb46870a2c6d;p=notmuch-archives.git [PATCH v2 04/12] lib: Add a ghost messages database feature --- diff --git a/70/b17c9f9603574e3004654c89e637b6dc5c8bf9 b/70/b17c9f9603574e3004654c89e637b6dc5c8bf9 new file mode 100644 index 000000000..759e4aac7 --- /dev/null +++ b/70/b17c9f9603574e3004654c89e637b6dc5c8bf9 @@ -0,0 +1,118 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 19FA7431FBD + for ; Mon, 6 Oct 2014 16:17:42 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id EqaH5XIUva2q for ; + Mon, 6 Oct 2014 16:17:37 -0700 (PDT) +Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu + [18.7.68.36]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4ABCE431FC0 + for ; Mon, 6 Oct 2014 16:17:30 -0700 (PDT) +X-AuditID: 12074424-f79346d000004923-42-54332309121f +Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP + id C6.B5.18723.A0323345; Mon, 6 Oct 2014 19:17:30 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s96NHTmr030747; + Mon, 6 Oct 2014 19:17:29 -0400 +Received: from drake.dyndns.org ([12.185.136.2]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s96NHRuR014548 + (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); + Mon, 6 Oct 2014 19:17:28 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.84) + (envelope-from ) + id 1XbHWr-0001JU-Pr; Mon, 06 Oct 2014 17:17:21 -0600 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH v2 04/12] lib: Add a ghost messages database feature +Date: Mon, 6 Oct 2014 17:17:10 -0600 +Message-Id: <1412637438-4821-5-git-send-email-aclements@csail.mit.edu> +X-Mailer: git-send-email 2.1.0 +In-Reply-To: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu> +References: <1412637438-4821-1-git-send-email-aclements@csail.mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFtrHIsWRmVeSWpSXmKPExsUixCmqrculbBxi8KGF1eJGazejxfWbM5kd + mDyerbrF7LHl0HvmAKYoLpuU1JzMstQifbsErowFPR/ZCm5wVTw/P4m1gXEBRxcjJ4eEgIlE + 3+edbBC2mMSFe+uBbC4OIYHZTBJnZt+BcjYwSqzcs5YJwlnKJNF+eh0jhLOEUaJn6zxGkH42 + AX2JFWsnsYLYIgLSEjvvzgazmQUsJa5+bWcCsYUFXCRmv1rIDmKzCKhKLL+wGszmFXCT6P/y + gAXiDjmJDbv/g83kFHCXWHNlMtgcIaCa5z+fskxg5F/AyLCKUTYlt0o3NzEzpzg1Wbc4OTEv + L7VI11wvN7NELzWldBMjKJjYXVR2MDYfUjrEKMDBqMTDG7HDMESINbGsuDL3EKMkB5OSKO8c + duMQIb6k/JTKjMTijPii0pzU4kOMEhzMSiK8XL+NQoR4UxIrq1KL8mFS0hwsSuK8m37whQgJ + pCeWpGanphakFsFkZTg4lCR4OxSBhgoWpaanVqRl5pQgpJk4OEGG8wANPwRSw1tckJhbnJkO + kT/FqCglzhsMkhAASWSU5sH1wqL9FaM40CvCvPNBqniAiQKu+xXQYCagwaZz9EEGlyQipKQa + GCOyZk2TPfnXLq9dLsClNfoRk+hPs17HT/OnKFx5kHlKZsJFhh/9IVt/fk95/vTtmu0W/qVH + /62a8LE4UqD+1Oetz2KaLi/0nnguTeFBfBi7zEWG5Q/N5P14rsqU/Q376/wkdpn3y70NDBeE + 20TvC56dEun68pXMya2OLFGR1esSIzfcMPvG+VeJpTgj0VCLuag4EQCJ7q980QIAAA== +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 06 Oct 2014 23:17:42 -0000 + +From: Austin Clements + +This will be implemented over the next several patches. The feature +is not yet "enabled" (this does not add it to +NOTMUCH_FEATURES_CURRENT). +--- + lib/database-private.h | 7 +++++++ + lib/database.cc | 2 ++ + 2 files changed, 9 insertions(+) + +diff --git a/lib/database-private.h b/lib/database-private.h +index ca0751c..e2e4bc8 100644 +--- a/lib/database-private.h ++++ b/lib/database-private.h +@@ -85,6 +85,13 @@ enum _notmuch_features { + * + * Introduced: version 2. */ + NOTMUCH_FEATURE_BOOL_FOLDER = 1 << 3, ++ ++ /* If set, missing messages are stored in ghost mail documents. ++ * If unset, thread IDs of ghost messages are stored as database ++ * metadata instead of in ghost documents. ++ * ++ * Introduced: version 3. */ ++ NOTMUCH_FEATURE_GHOSTS = 1 << 4, + }; + + /* In C++, a named enum is its own type, so define bitwise operators +diff --git a/lib/database.cc b/lib/database.cc +index 1c6ffc5..8fd7fad 100644 +--- a/lib/database.cc ++++ b/lib/database.cc +@@ -286,6 +286,8 @@ static const struct { + "from/subject/message-ID in database", "w" }, + { NOTMUCH_FEATURE_BOOL_FOLDER, + "exact folder:/path: search", "rw" }, ++ { NOTMUCH_FEATURE_GHOSTS, ++ "mail documents for missing messages", "w"}, + }; + + const char * +-- +2.1.0 +