[PATCH] fixup! lib: Add per-message last modification tracking
authorDavid Bremner <david@tethera.net>
Sat, 8 Aug 2015 05:33:56 +0000 (07:33 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:17 +0000 (14:49 -0700)
19/f561444ab11f0abe76b5c3dc492b9f0b7fa144 [new file with mode: 0644]

diff --git a/19/f561444ab11f0abe76b5c3dc492b9f0b7fa144 b/19/f561444ab11f0abe76b5c3dc492b9f0b7fa144
new file mode 100644 (file)
index 0000000..d8f9f6a
--- /dev/null
@@ -0,0 +1,75 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 81EBB6DE0261\r
+ for <notmuch@notmuchmail.org>; Fri,  7 Aug 2015 22:35:56 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.141\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.141 tagged_above=-999 required=5 tests=[AWL=0.131, \r
+ T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 7NwPCE1pdHGw for <notmuch@notmuchmail.org>;\r
+ Fri,  7 Aug 2015 22:35:53 -0700 (PDT)\r
+Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 005D96DE020B\r
+ for <notmuch@notmuchmail.org>; Fri,  7 Aug 2015 22:35:52 -0700 (PDT)\r
+Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
+ (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1ZNwlo-0000e3-Fi; Sat, 08 Aug 2015 05:34:13 +0000\r
+Received: (nullmailer pid 2767 invoked by uid 1000); Sat, 08 Aug 2015\r
+ 05:33:58 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Daniel Schoepe <daniel@schoepe.org>, David Bremner <david@tethera.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: [PATCH] fixup! lib: Add per-message last modification tracking\r
+Date: Sat,  8 Aug 2015 07:33:56 +0200\r
+Message-Id: <1439012036-2629-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <878u9nk0st.fsf@schoepe.localhost>\r
+References: <878u9nk0st.fsf@schoepe.localhost>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Sat, 08 Aug 2015 05:35:56 -0000\r
+\r
+---\r
+\r
+Now that I take a second look at the code, I think Austin's original\r
+commit is correct, if a bit terse. Here is how I have expanded it in\r
+the revised series.\r
+\r
+ lib/database.cc | 5 +++--\r
+ 1 file changed, 3 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/lib/database.cc b/lib/database.cc\r
+index 0650c63..bab3334 100644\r
+--- a/lib/database.cc\r
++++ b/lib/database.cc\r
+@@ -1473,8 +1473,9 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,\r
+               _notmuch_message_upgrade_folder (message);\r
\r
+           /* Prior to NOTMUCH_FEATURE_LAST_MOD, messages did not\r
+-           * track modification revisions.  Give all messages a\r
+-           * revision of 1.\r
++           * track modification revisions.  Give all messages the\r
++           * next available revision; since we just started tracking\r
++           * revisions for this database, that will be 1.\r
+            */\r
+           if (new_features & NOTMUCH_FEATURE_LAST_MOD)\r
+               _notmuch_message_upgrade_last_mod (message);\r
+-- \r
+2.1.4\r
+\r