[PATCH] fixup: clarify TAG_FLAG_ID_ONLY comments and name
authordavid <david@tethera.net>
Sat, 15 Dec 2012 19:21:09 +0000 (15:21 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:52:19 +0000 (09:52 -0800)
43/83c6f0f5ab3742a8208a7a0c0fda1a104942bb [new file with mode: 0644]

diff --git a/43/83c6f0f5ab3742a8208a7a0c0fda1a104942bb b/43/83c6f0f5ab3742a8208a7a0c0fda1a104942bb
new file mode 100644 (file)
index 0000000..64cbc05
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <bremner@tethera.net>\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 19984431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 11:21:21 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 UD6rTYz6ZsNC for <notmuch@notmuchmail.org>;\r
+       Sat, 15 Dec 2012 11:21:19 -0800 (PST)\r
+Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 129DA431FB6\r
+       for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 11:21:19 -0800 (PST)\r
+Received: from fctnnbsc30w-142167090129.dhcp-dynamic.fibreop.nb.bellaliant.net\r
+       ([142.167.90.129] helo=zancas.localnet)\r
+       by tesseract.cs.unb.ca with esmtpsa\r
+       (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1TjxIT-0006hM-MW; Sat, 15 Dec 2012 15:21:18 -0400\r
+Received: from bremner by zancas.localnet with local (Exim 4.80)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1TjxIO-0008D1-7F; Sat, 15 Dec 2012 15:21:12 -0400\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] fixup: clarify TAG_FLAG_ID_ONLY comments and name\r
+Date: Sat, 15 Dec 2012 15:21:09 -0400\r
+Message-Id: <1355599269-31503-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <87wqwj8alx.fsf@qmul.ac.uk>\r
+References: <87wqwj8alx.fsf@qmul.ac.uk>\r
+X-Spam_bar: -\r
+Cc: David Bremner <bremner@debian.org>\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: Sat, 15 Dec 2012 19:21:21 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+---\r
+\r
+After some chatter on IRC, Mark and I converged to the following \r
\r
+ notmuch-restore.c |    2 +-\r
+ tag-util.c        |    2 +-\r
+ tag-util.h        |    6 ++++--\r
+ 3 files changed, 6 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/notmuch-restore.c b/notmuch-restore.c\r
+index 112f2f3..1b66e76 100644\r
+--- a/notmuch-restore.c\r
++++ b/notmuch-restore.c\r
+@@ -208,7 +208,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])\r
+       if (input_format == DUMP_FORMAT_SUP) {\r
+           ret = parse_sup_line (ctx, line, &query_string, tag_ops);\r
+       } else {\r
+-          ret = parse_tag_line (ctx, line, TAG_FLAG_BE_GENEROUS | TAG_FLAG_ID_ONLY,\r
++          ret = parse_tag_line (ctx, line, TAG_FLAG_BE_GENEROUS | TAG_FLAG_ID_DIRECT,\r
+                                 &query_string, tag_ops);\r
+       }\r
\r
+diff --git a/tag-util.c b/tag-util.c\r
+index 8fea76c..37bffd5 100644\r
+--- a/tag-util.c\r
++++ b/tag-util.c\r
+@@ -201,7 +201,7 @@ parse_tag_line (void *ctx, char *line,\r
+     }\r
\r
+     /* tok now points to the query string */\r
+-    if (flags & TAG_FLAG_ID_ONLY) {\r
++    if (flags & TAG_FLAG_ID_DIRECT) {\r
+       /* this is under the assumption that any whitespace in the\r
+        * message-id must be hex-encoded. The check is probably not\r
+        * perfect for exotic unicode whitespace; as fallback the\r
+diff --git a/tag-util.h b/tag-util.h\r
+index 7674051..eec00cf 100644\r
+--- a/tag-util.h\r
++++ b/tag-util.h\r
+@@ -28,8 +28,10 @@ typedef enum {\r
+      */\r
+     TAG_FLAG_BE_GENEROUS = (1 << 3),\r
\r
+-    /* Query consists of a single id:$message-id */\r
+-    TAG_FLAG_ID_ONLY = (1 << 4)\r
++    /* Directly look up messages by hex-decoded message-id, rather\r
++     * than parsing a general query. The query MUST be of the form\r
++     * id:$message-id. */\r
++    TAG_FLAG_ID_DIRECT = (1 << 4)\r
\r
+ } tag_op_flag_t;\r
\r
+-- \r
+1.7.10.4\r
+\r