--- /dev/null
+Return-Path: <jani@nikula.org>\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 ED64D6DE1926\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Nov 2015 11:50:16 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.191\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.191 tagged_above=-999 required=5\r
+ tests=[AWL=-0.171, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-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 oTgX5XodP2nv for <notmuch@notmuchmail.org>;\r
+ Tue, 3 Nov 2015 11:50:15 -0800 (PST)\r
+Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com\r
+ [74.125.82.49]) by arlo.cworth.org (Postfix) with ESMTPS id 937236DE13DA for\r
+ <notmuch@notmuchmail.org>; Tue, 3 Nov 2015 11:50:14 -0800 (PST)\r
+Received: by wmff134 with SMTP id f134so24165176wmf.0\r
+ for <notmuch@notmuchmail.org>; Tue, 03 Nov 2015 11:50:13 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=nikula_org.20150623.gappssmtp.com; s=20150623;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references\r
+ :in-reply-to:references;\r
+ bh=xFYcTFBZC8NJtdDzfVhLqc8ITJopbseQm+4nWE0JbDg=;\r
+ b=q3XogTPh/PxKYlobQRBchPE+3fqc10qPD0d0TGTb+7DDNeckcDBGsj/6xYdCN9pb0e\r
+ kmZoX/SWmzsfRd1r7YA0O70gX4tyC9C5p6SraCjKFmDJwiz/kfRZSaoyHe8BR7JnGm3o\r
+ 9H9te/5GTKwCuRE/Q7ZEnNxC+h2fjCRZWvBykhZ6AtjPGKYMzkO1l1Y/M4+ekSg2Tfo5\r
+ PQfqh60u394G+8UiCgOYxYhyzs3Fp8jvwGGNl3Xm+4I0tzrNKD/xyJWeMx2zAyrqjjvm\r
+ CDLcO7f30EH9vnzsAE16Z6pJ5o8nZCH0XilWZm4zt0/ovZY2w/R3675pT9KCCcdYxXiA\r
+ zQOA==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references:in-reply-to:references;\r
+ bh=xFYcTFBZC8NJtdDzfVhLqc8ITJopbseQm+4nWE0JbDg=;\r
+ b=XubV7cMzyAll/pNGjCyakq9ezrdIR8iiX5ZeiA+HgvwzSQxEDO29VHl6EUPVi1f9Tb\r
+ 02SVRnPgLHJMmK4YCAzjtUTZtX9iyrWjnw3eDwT75nyApi/CF2FDYPe7ZDuvWniXoROr\r
+ CutmWtdLO/b2+USNjSXLYH2Z/iU0EhRGpYBAbn/3PmRJfxhxxF4+HX3qvh0HODwa7zhC\r
+ 5OKGGGime0/1CycLESH5L29P9VqTBGKHgOG2TcRPQJfV+DrJvqIqRHvM8i1ZkdQWsX3O\r
+ U/o7K1hf4Nqet+/Bf03PV8it+UW70/5vObzv/PhhaD7wBxNI89YGZL4kJ74iF/TTl20D\r
+ 6bVg==\r
+X-Gm-Message-State:\r
+ ALoCoQk0OyEIyFFYXna/Qw1eky351cv8pbdb8tmESRqE1xZHeEheHOeLP2wgn1Aw/o/n2AAjE6v/\r
+X-Received: by 10.28.143.21 with SMTP id r21mr20506910wmd.39.1446580213184;\r
+ Tue, 03 Nov 2015 11:50:13 -0800 (PST)\r
+Received: from localhost (mobile-access-bceec0-208.dhcp.inet.fi.\r
+ [188.238.192.208])\r
+ by smtp.gmail.com with ESMTPSA id n17sm24942049wmg.17.2015.11.03.11.50.12\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Tue, 03 Nov 2015 11:50:12 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC 2/5] cli: don't call _entry_in_ignore_list twice in count files\r
+ debug\r
+Date: Tue, 3 Nov 2015 21:49:30 +0200\r
+Message-Id:\r
+ <ef2e3009ed104d2bf801536f203d0f2f95a29336.1446579858.git.jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <cover.1446579858.git.jani@nikula.org>\r
+References: <cover.1446579858.git.jani@nikula.org>\r
+In-Reply-To: <cover.1446579858.git.jani@nikula.org>\r
+References: <cover.1446579858.git.jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 03 Nov 2015 19:50:17 -0000\r
+\r
+Split file ignores in count_files to fixed and user configured in\r
+order to not have to call _entry_in_ignore_list twice when debugging\r
+is enabled. Minor detail.\r
+---\r
+ notmuch-new.c | 18 ++++++++++--------\r
+ 1 file changed, 10 insertions(+), 8 deletions(-)\r
+\r
+diff --git a/notmuch-new.c b/notmuch-new.c\r
+index e5037761c8ee..da1d1be2ed3b 100644\r
+--- a/notmuch-new.c\r
++++ b/notmuch-new.c\r
+@@ -734,18 +734,20 @@ count_files (const char *path, int *count, add_files_state_t *state)\r
+ entry = fs_entries[i];\r
+ \r
+ /* Ignore special directories to avoid infinite recursion.\r
+- * Also ignore the .notmuch directory and files/directories\r
+- * the user has configured to be ignored.\r
++ * Also ignore the .notmuch directory.\r
+ */\r
+ if (strcmp (entry->d_name, ".") == 0 ||\r
+ strcmp (entry->d_name, "..") == 0 ||\r
+- strcmp (entry->d_name, ".notmuch") == 0 ||\r
+- _entry_in_ignore_list (entry->d_name, state))\r
+- {\r
+- if (state->debug && _entry_in_ignore_list (entry->d_name, state))\r
++ strcmp (entry->d_name, ".notmuch") == 0)\r
++ continue;\r
++\r
++ /* Ignore any files/directories the user has configured to be\r
++ * ignored\r
++ */\r
++ if (_entry_in_ignore_list (entry->d_name, state)) {\r
++ if (state->debug)\r
+ printf ("(D) count_files: explicitly ignoring %s/%s\n",\r
+- path,\r
+- entry->d_name);\r
++ path, entry->d_name);\r
+ continue;\r
+ }\r
+ \r
+-- \r
+2.1.4\r
+\r