Re: Avoiding the "huge INBOX of death"
[notmuch-archives.git] / ef / 4dec14763bf7ecbe2522106f253a5902178d35
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 ED64D6DE1926\r
6  for <notmuch@notmuchmail.org>; Tue,  3 Nov 2015 11:50:16 -0800 (PST)\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.191\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.191 tagged_above=-999 required=5\r
13  tests=[AWL=-0.171, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
14  RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] 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 oTgX5XodP2nv for <notmuch@notmuchmail.org>;\r
18  Tue,  3 Nov 2015 11:50:15 -0800 (PST)\r
19 Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com\r
20  [74.125.82.49]) by arlo.cworth.org (Postfix) with ESMTPS id 937236DE13DA for\r
21  <notmuch@notmuchmail.org>; Tue,  3 Nov 2015 11:50:14 -0800 (PST)\r
22 Received: by wmff134 with SMTP id f134so24165176wmf.0\r
23  for <notmuch@notmuchmail.org>; Tue, 03 Nov 2015 11:50:13 -0800 (PST)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25  d=nikula_org.20150623.gappssmtp.com; s=20150623;\r
26  h=from:to:cc:subject:date:message-id:in-reply-to:references\r
27  :in-reply-to:references;\r
28  bh=xFYcTFBZC8NJtdDzfVhLqc8ITJopbseQm+4nWE0JbDg=;\r
29  b=q3XogTPh/PxKYlobQRBchPE+3fqc10qPD0d0TGTb+7DDNeckcDBGsj/6xYdCN9pb0e\r
30  kmZoX/SWmzsfRd1r7YA0O70gX4tyC9C5p6SraCjKFmDJwiz/kfRZSaoyHe8BR7JnGm3o\r
31  9H9te/5GTKwCuRE/Q7ZEnNxC+h2fjCRZWvBykhZ6AtjPGKYMzkO1l1Y/M4+ekSg2Tfo5\r
32  PQfqh60u394G+8UiCgOYxYhyzs3Fp8jvwGGNl3Xm+4I0tzrNKD/xyJWeMx2zAyrqjjvm\r
33  CDLcO7f30EH9vnzsAE16Z6pJ5o8nZCH0XilWZm4zt0/ovZY2w/R3675pT9KCCcdYxXiA\r
34  zQOA==\r
35 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
36  d=1e100.net; s=20130820;\r
37  h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
38  :references:in-reply-to:references;\r
39  bh=xFYcTFBZC8NJtdDzfVhLqc8ITJopbseQm+4nWE0JbDg=;\r
40  b=XubV7cMzyAll/pNGjCyakq9ezrdIR8iiX5ZeiA+HgvwzSQxEDO29VHl6EUPVi1f9Tb\r
41  02SVRnPgLHJMmK4YCAzjtUTZtX9iyrWjnw3eDwT75nyApi/CF2FDYPe7ZDuvWniXoROr\r
42  CutmWtdLO/b2+USNjSXLYH2Z/iU0EhRGpYBAbn/3PmRJfxhxxF4+HX3qvh0HODwa7zhC\r
43  5OKGGGime0/1CycLESH5L29P9VqTBGKHgOG2TcRPQJfV+DrJvqIqRHvM8i1ZkdQWsX3O\r
44  U/o7K1hf4Nqet+/Bf03PV8it+UW70/5vObzv/PhhaD7wBxNI89YGZL4kJ74iF/TTl20D\r
45  6bVg==\r
46 X-Gm-Message-State:\r
47  ALoCoQk0OyEIyFFYXna/Qw1eky351cv8pbdb8tmESRqE1xZHeEheHOeLP2wgn1Aw/o/n2AAjE6v/\r
48 X-Received: by 10.28.143.21 with SMTP id r21mr20506910wmd.39.1446580213184;\r
49  Tue, 03 Nov 2015 11:50:13 -0800 (PST)\r
50 Received: from localhost (mobile-access-bceec0-208.dhcp.inet.fi.\r
51  [188.238.192.208])\r
52  by smtp.gmail.com with ESMTPSA id n17sm24942049wmg.17.2015.11.03.11.50.12\r
53  (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
54  Tue, 03 Nov 2015 11:50:12 -0800 (PST)\r
55 From: Jani Nikula <jani@nikula.org>\r
56 To: notmuch@notmuchmail.org\r
57 Subject: [RFC 2/5] cli: don't call _entry_in_ignore_list twice in count files\r
58  debug\r
59 Date: Tue,  3 Nov 2015 21:49:30 +0200\r
60 Message-Id:\r
61  <ef2e3009ed104d2bf801536f203d0f2f95a29336.1446579858.git.jani@nikula.org>\r
62 X-Mailer: git-send-email 2.1.4\r
63 In-Reply-To: <cover.1446579858.git.jani@nikula.org>\r
64 References: <cover.1446579858.git.jani@nikula.org>\r
65 In-Reply-To: <cover.1446579858.git.jani@nikula.org>\r
66 References: <cover.1446579858.git.jani@nikula.org>\r
67 X-BeenThere: notmuch@notmuchmail.org\r
68 X-Mailman-Version: 2.1.20\r
69 Precedence: list\r
70 List-Id: "Use and development of the notmuch mail system."\r
71  <notmuch.notmuchmail.org>\r
72 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
73  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
74 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
75 List-Post: <mailto:notmuch@notmuchmail.org>\r
76 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
77 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
78  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
79 X-List-Received-Date: Tue, 03 Nov 2015 19:50:17 -0000\r
80 \r
81 Split file ignores in count_files to fixed and user configured in\r
82 order to not have to call _entry_in_ignore_list twice when debugging\r
83 is enabled. Minor detail.\r
84 ---\r
85  notmuch-new.c | 18 ++++++++++--------\r
86  1 file changed, 10 insertions(+), 8 deletions(-)\r
87 \r
88 diff --git a/notmuch-new.c b/notmuch-new.c\r
89 index e5037761c8ee..da1d1be2ed3b 100644\r
90 --- a/notmuch-new.c\r
91 +++ b/notmuch-new.c\r
92 @@ -734,18 +734,20 @@ count_files (const char *path, int *count, add_files_state_t *state)\r
93          entry = fs_entries[i];\r
94  \r
95         /* Ignore special directories to avoid infinite recursion.\r
96 -        * Also ignore the .notmuch directory and files/directories\r
97 -        * the user has configured to be ignored.\r
98 +        * Also ignore the .notmuch directory.\r
99          */\r
100         if (strcmp (entry->d_name, ".") == 0 ||\r
101             strcmp (entry->d_name, "..") == 0 ||\r
102 -           strcmp (entry->d_name, ".notmuch") == 0 ||\r
103 -           _entry_in_ignore_list (entry->d_name, state))\r
104 -       {\r
105 -           if (state->debug && _entry_in_ignore_list (entry->d_name, state))\r
106 +           strcmp (entry->d_name, ".notmuch") == 0)\r
107 +           continue;\r
108 +\r
109 +       /* Ignore any files/directories the user has configured to be\r
110 +        * ignored\r
111 +        */\r
112 +       if (_entry_in_ignore_list (entry->d_name, state)) {\r
113 +           if (state->debug)\r
114                 printf ("(D) count_files: explicitly ignoring %s/%s\n",\r
115 -                       path,\r
116 -                       entry->d_name);\r
117 +                       path, entry->d_name);\r
118             continue;\r
119         }\r
120  \r
121 -- \r
122 2.1.4\r
123 \r