--- /dev/null
+Return-Path: <james@hackervisions.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 olra.theworths.org (Postfix) with ESMTP id E39FE431FD0\r
+ for <notmuch@notmuchmail.org>; Tue, 23 Aug 2011 17:12:01 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.363\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.363 tagged_above=-999 required=5\r
+ tests=[RDNS_DYNAMIC=0.363, TO_NO_BRKTS_DYNIP=1] 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 uvGgABh5Q0tL for <notmuch@notmuchmail.org>;\r
+ Tue, 23 Aug 2011 17:12:01 -0700 (PDT)\r
+Received: from hackervisions.org (67-207-143-141.slicehost.net\r
+ [67.207.143.141]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 8E2B5431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 23 Aug 2011 17:12:01 -0700 (PDT)\r
+Received: from ool-4572d87b.dyn.optonline.net ([69.114.216.123]\r
+ helo=localhost) by hackervisions.org with esmtpsa\r
+ (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from\r
+ <james@hackervisions.org>) id 1Qw15s-0000lO-9c for notmuch@notmuchmail.org;\r
+ Tue, 23 Aug 2011 20:13:20 -0400\r
+From: James Vasile <james@hackervisions.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] Skip dot files in `notmuch new`\r
+User-Agent: Notmuch/0.7-35-g138289f (http://notmuchmail.org) Emacs/23.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 23 Aug 2011 20:11:53 -0400\r
+Message-ID: <8762lnwtva.fsf@hackervisions.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Wed, 24 Aug 2011 00:12:02 -0000\r
+\r
+No known mail client or fetch tool stores mail in dot files, because\r
+files that start with '.' are usually used to store metadata\r
+(i.e. state or configuration) as opposed to subject-matter data.\r
+\r
+Some mail fetch tools (including mbsync) and clients use dot files in\r
+maildirs to store metadata. Notmuch should not warn that it is\r
+ignoring these files, since it *should* ignore them. Indeed, it\r
+should ignore all dot files.\r
+---\r
+ notmuch-new.c | 4 ++++\r
+ 1 files changed, 4 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch-new.c b/notmuch-new.c\r
+index 7d17793..87ee07e 100644\r
+--- a/notmuch-new.c\r
++++ b/notmuch-new.c\r
+@@ -428,6 +428,10 @@ add_files_recursive (notmuch_database_t *notmuch,\r
+ continue;\r
+ }\r
+ \r
++ /* Don't add dot files. */\r
++ if (entry->d_name[0] == '.')\r
++ continue;\r
++\r
+ /* We're now looking at a regular file that doesn't yet exist\r
+ * in the database, so add it. */\r
+ next = talloc_asprintf (notmuch, "%s/%s", path, entry->d_name);\r
+-- \r
+1.7.5.4\r
+\r