1 Return-Path: <bremner@tethera.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 19984431FBC
\r
6 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 11:21:21 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id UD6rTYz6ZsNC for <notmuch@notmuchmail.org>;
\r
16 Sat, 15 Dec 2012 11:21:19 -0800 (PST)
\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])
\r
18 (using TLSv1 with cipher AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 129DA431FB6
\r
21 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 11:21:19 -0800 (PST)
\r
22 Received: from fctnnbsc30w-142167090129.dhcp-dynamic.fibreop.nb.bellaliant.net
\r
23 ([142.167.90.129] helo=zancas.localnet)
\r
24 by tesseract.cs.unb.ca with esmtpsa
\r
25 (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)
\r
26 (envelope-from <bremner@tethera.net>)
\r
27 id 1TjxIT-0006hM-MW; Sat, 15 Dec 2012 15:21:18 -0400
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)
\r
29 (envelope-from <bremner@tethera.net>)
\r
30 id 1TjxIO-0008D1-7F; Sat, 15 Dec 2012 15:21:12 -0400
\r
31 From: david@tethera.net
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH] fixup: clarify TAG_FLAG_ID_ONLY comments and name
\r
34 Date: Sat, 15 Dec 2012 15:21:09 -0400
\r
35 Message-Id: <1355599269-31503-1-git-send-email-david@tethera.net>
\r
36 X-Mailer: git-send-email 1.7.10.4
\r
37 In-Reply-To: <87wqwj8alx.fsf@qmul.ac.uk>
\r
38 References: <87wqwj8alx.fsf@qmul.ac.uk>
\r
40 Cc: David Bremner <bremner@debian.org>
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Sat, 15 Dec 2012 19:21:21 -0000
\r
55 From: David Bremner <bremner@debian.org>
\r
59 After some chatter on IRC, Mark and I converged to the following
\r
61 notmuch-restore.c | 2 +-
\r
63 tag-util.h | 6 ++++--
\r
64 3 files changed, 6 insertions(+), 4 deletions(-)
\r
66 diff --git a/notmuch-restore.c b/notmuch-restore.c
\r
67 index 112f2f3..1b66e76 100644
\r
68 --- a/notmuch-restore.c
\r
69 +++ b/notmuch-restore.c
\r
70 @@ -208,7 +208,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
\r
71 if (input_format == DUMP_FORMAT_SUP) {
\r
72 ret = parse_sup_line (ctx, line, &query_string, tag_ops);
\r
74 - ret = parse_tag_line (ctx, line, TAG_FLAG_BE_GENEROUS | TAG_FLAG_ID_ONLY,
\r
75 + ret = parse_tag_line (ctx, line, TAG_FLAG_BE_GENEROUS | TAG_FLAG_ID_DIRECT,
\r
76 &query_string, tag_ops);
\r
79 diff --git a/tag-util.c b/tag-util.c
\r
80 index 8fea76c..37bffd5 100644
\r
83 @@ -201,7 +201,7 @@ parse_tag_line (void *ctx, char *line,
\r
86 /* tok now points to the query string */
\r
87 - if (flags & TAG_FLAG_ID_ONLY) {
\r
88 + if (flags & TAG_FLAG_ID_DIRECT) {
\r
89 /* this is under the assumption that any whitespace in the
\r
90 * message-id must be hex-encoded. The check is probably not
\r
91 * perfect for exotic unicode whitespace; as fallback the
\r
92 diff --git a/tag-util.h b/tag-util.h
\r
93 index 7674051..eec00cf 100644
\r
96 @@ -28,8 +28,10 @@ typedef enum {
\r
98 TAG_FLAG_BE_GENEROUS = (1 << 3),
\r
100 - /* Query consists of a single id:$message-id */
\r
101 - TAG_FLAG_ID_ONLY = (1 << 4)
\r
102 + /* Directly look up messages by hex-decoded message-id, rather
\r
103 + * than parsing a general query. The query MUST be of the form
\r
104 + * id:$message-id. */
\r
105 + TAG_FLAG_ID_DIRECT = (1 << 4)
\r