Re: [notmuch] [PATCH] d_type fix
authorCarl Worth <cworth@cworth.org>
Sat, 23 Jan 2010 05:48:35 +0000 (18:48 +1300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:01 +0000 (09:36 -0800)
d5/c91d965e75b80fbd41cc8a1ea0bc4a1384ed9c [new file with mode: 0644]

diff --git a/d5/c91d965e75b80fbd41cc8a1ea0bc4a1384ed9c b/d5/c91d965e75b80fbd41cc8a1ea0bc4a1384ed9c
new file mode 100644 (file)
index 0000000..18c2a81
--- /dev/null
@@ -0,0 +1,92 @@
+Return-Path: <cworth@cworth.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 6F138431FBC\r
+       for <notmuch@notmuchmail.org>; Fri, 22 Jan 2010 21:48:43 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.853\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.853 tagged_above=-999 required=5\r
+       tests=[ALL_TRUSTED=-1.8, AWL=-0.054, BAYES_50=0.001] autolearn=ham\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 qm6kUnb7K8nW; Fri, 22 Jan 2010 21:48:42 -0800 (PST)\r
+Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8B0A2431FAE;\r
+       Fri, 22 Jan 2010 21:48:42 -0800 (PST)\r
+Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
+       id AFE3025409D; Sat, 23 Jan 2010 18:48:41 +1300 (NZDT)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Geo Carncross <geocar-notmuch@internetconnection.net>,\r
+       notmuch@notmuchmail.org\r
+In-Reply-To: <1264104618.3941.108.camel@dwarf>\r
+References: <1264104618.3941.108.camel@dwarf>\r
+Date: Sat, 23 Jan 2010 18:48:35 +1300\r
+Message-ID: <87636tz80c.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Subject: Re: [notmuch] [PATCH] d_type fix\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: Sat, 23 Jan 2010 05:48:43 -0000\r
+\r
+--=-=-=\r
+\r
+On Thu, 21 Jan 2010 15:10:18 -0500, Geo Carncross <geocar-notmuch@internetconnection.net> wrote:\r
+> A review of notmuch-new.c shows three uses of ->d_type:\r
+\r
+Excellent, thank you.\r
+\r
+> Near line 153, in _entries_resemble_maildir() we can simply allow for\r
+> DT_UNKNOWN. This would fail if people have MH-style folders which have\r
+> three folders called "new" "cur" and "tmp", but that seems unlikely, in\r
+> which case the "tmp" folder would simply not be scanned.\r
+\r
+The check will also fail if someone happens to have two regular files\r
+named "cur" and "new" next to a directory named "tmp", (which would then\r
+be ignored). But I agree this seems very unlikely.\r
+\r
+> [snip]\r
+\r
+The rest of your analysis looks good to me. And it's nice to see how\r
+simple the final patch is.\r
+\r
+> Attached is a patch which was tested with reiserfs. It should also work\r
+> with xfs.\r
+\r
+I had been waiting to apply the previous patch until I could test it on\r
+a filesystem returning DT_UNKNOWN. But this one looks clean enough to\r
+apply immediately.\r
+\r
+One thing that would have made that easier would be a commit message,\r
+(such as making a commit with "git commit" then using "git format-patch"\r
+and "git send-email" to send it). But I'll go ahead and make one up.\r
+\r
+Thanks again!\r
+\r
+-Carl\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iD8DBQFLWo2z6JDdNq8qSWgRAry8AJ0eftnGesu7wGTK5KjQSOGAHqL9swCfSzIQ\r
+si3ucTxP72CWo48oubhKBGA=\r
+=G2XC\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r