Re: Applying patches directly from emails?
[notmuch-archives.git] / 8e / 19233da0c288dc7dba23065ccec7ed726c27eb
1 Return-Path: <jani@nikula.org>\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 arlo.cworth.org (Postfix) with ESMTP id 876C96DE1BA2\r
6  for <notmuch@notmuchmail.org>; Thu,  3 Sep 2015 12:40:46 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.436\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.436 tagged_above=-999 required=5 tests=[AWL=0.284,\r
13   RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01]\r
14  autolearn=disabled\r
15 Received: from arlo.cworth.org ([127.0.0.1])\r
16  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
17  with ESMTP id rYNw0f0TZc8B for <notmuch@notmuchmail.org>;\r
18  Thu,  3 Sep 2015 12:40:45 -0700 (PDT)\r
19 Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com\r
20  [209.85.212.176])\r
21  by arlo.cworth.org (Postfix) with ESMTPS id 5EE916DE1603\r
22  for <notmuch@notmuchmail.org>; Thu,  3 Sep 2015 12:40:31 -0700 (PDT)\r
23 Received: by wiclk2 with SMTP id lk2so19117989wic.1\r
24  for <notmuch@notmuchmail.org>; Thu, 03 Sep 2015 12:40:30 -0700 (PDT)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26  d=1e100.net; s=20130820;\r
27  h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
28  :references:in-reply-to:references;\r
29  bh=GitxrUYi7OnKyIbW4mMXWa9Ll04gxSDAPuoo+JHf0bI=;\r
30  b=jBL0OcEq1O9Q6TZYWHKClp/5T3JGX7YEy6vzRgF496YIt5EJCjk9seRpM+oPoZPHZr\r
31  7hZUBXrMUtrWAn4U1jzrvuD314yOFWS3LJArTBDbrdpRpcDFjR8+iwwqvzYuzZnMmLZq\r
32  2XfYqI3E2dt4I5HnsrqV3XwTumhZGLurg+Ty/+n09WjjclWnA8Uym/UQZQoTIO24RqX9\r
33  GWRtsfS4DKUx4XEXwtFxdbyQQ3rvb5AC5rvJ3OfCnimlrlgCdNd5fKa+j3ICp/6TWld0\r
34  sTNhSxyWmQYFi1Qb+sPLkyacn60rvajoDKLCJs0YEOkjkh3L4Oh5aCCI4Ff64bMdhD7z\r
35  KvOw==\r
36 X-Gm-Message-State:\r
37  ALoCoQmOyPGEdftEQ6yfja8ae8p+61i/38FieamLmctUMi+lls+DJOt0+657/K2ZqF+SebAL/n6N\r
38 X-Received: by 10.194.250.40 with SMTP id yz8mr59364384wjc.37.1441309229962;\r
39  Thu, 03 Sep 2015 12:40:29 -0700 (PDT)\r
40 Received: from localhost (mobile-access-bcee4f-131.dhcp.inet.fi.\r
41  [188.238.79.131])\r
42  by smtp.gmail.com with ESMTPSA id i3sm35049480wja.42.2015.09.03.12.40.29\r
43  (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
44  Thu, 03 Sep 2015 12:40:29 -0700 (PDT)\r
45 From: Jani Nikula <jani@nikula.org>\r
46 To: notmuch@notmuchmail.org\r
47 Subject: [PATCH v2 9/9] cli: do not sort addresses on --output=count or\r
48  --deduplicate=address\r
49 Date: Thu,  3 Sep 2015 22:40:05 +0300\r
50 Message-Id:\r
51  <01c4430a6715f72498b6f2d2b250523872531785.1441308761.git.jani@nikula.org>\r
52 X-Mailer: git-send-email 2.1.4\r
53 In-Reply-To: <cover.1441308761.git.jani@nikula.org>\r
54 References: <cover.1441308761.git.jani@nikula.org>\r
55 In-Reply-To: <cover.1441308761.git.jani@nikula.org>\r
56 References: <cover.1441308761.git.jani@nikula.org>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.18\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61  <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 03 Sep 2015 19:40:46 -0000\r
70 \r
71 The order of the results with --output=count and --deduplicate=address\r
72 are unspecified as they're based on a hash table traversal. This being\r
73 the case, optimize the query by explicitly requesting unsorted\r
74 results. Clarify the documentation accordingly.\r
75 ---\r
76  doc/man1/notmuch-address.rst | 4 +++-\r
77  notmuch-search.c             | 5 +++++\r
78  2 files changed, 8 insertions(+), 1 deletion(-)\r
79 \r
80 diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst\r
81 index b85cc37213e5..cbdb851980a8 100644\r
82 --- a/doc/man1/notmuch-address.rst\r
83 +++ b/doc/man1/notmuch-address.rst\r
84 @@ -85,7 +85,9 @@ Supported options for **address** include\r
85          By default, results will be displayed in reverse chronological\r
86          order, (that is, the newest results will be displayed first).\r
87  \r
88 -        This option is not supported with --output=count.\r
89 +        However, if either --output=count or --deduplicate=address is\r
90 +        specified, this option is ignored and the order of the results\r
91 +        is unspecified.\r
92  \r
93      ``--exclude=(true|false)``\r
94          A message is called "excluded" if it matches at least one tag in\r
95 diff --git a/notmuch-search.c b/notmuch-search.c\r
96 index deb9e58a747c..b58496bf09d5 100644\r
97 --- a/notmuch-search.c\r
98 +++ b/notmuch-search.c\r
99 @@ -885,6 +885,11 @@ notmuch_address_command (notmuch_config_t *config, int argc, char *argv[])\r
100                                             _talloc_free_for_g_hash,\r
101                                             _list_free_for_g_hash);\r
102  \r
103 +    /* The order is not guaranteed if a full pass is required, so go\r
104 +     * for fastest. */\r
105 +    if (ctx->output & OUTPUT_COUNT || ctx->dedup == DEDUP_ADDRESS)\r
106 +       notmuch_query_set_sort (ctx->query, NOTMUCH_SORT_UNSORTED);\r
107 +\r
108      ret = do_search_messages (ctx);\r
109  \r
110      g_hash_table_unref (ctx->addresses);\r
111 -- \r
112 2.1.4\r
113 \r