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 860E26DE00EB
\r
6 for <notmuch@notmuchmail.org>; Fri, 15 Apr 2016 12:30:46 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.556 tagged_above=-999 required=5 tests=[AWL=0.164,
\r
12 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,
\r
13 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled
\r
14 Received: from arlo.cworth.org ([127.0.0.1])
\r
15 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id nEYz8wgo23LO for <notmuch@notmuchmail.org>;
\r
17 Fri, 15 Apr 2016 12:30:37 -0700 (PDT)
\r
18 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com
\r
19 [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id B5A4A6DE00F5 for
\r
20 <notmuch@notmuchmail.org>; Fri, 15 Apr 2016 12:30:37 -0700 (PDT)
\r
21 Received: by mail-wm0-f67.google.com with SMTP id n3so8629323wmn.1
\r
22 for <notmuch@notmuchmail.org>; Fri, 15 Apr 2016 12:30:37 -0700 (PDT)
\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
24 d=nikula-org.20150623.gappssmtp.com; s=20150623;
\r
25 h=from:to:cc:subject:date:message-id;
\r
26 bh=gTA4HllegNCu2L0ydg4xINdI+VnfmxpVrbUzRT5HHBo=;
\r
27 b=0+IrOQV0MPGESSxhj3bdTuoOJhgUcpgRyC2vJLseAcKPc62hfmPpL6upEvYRefiKSE
\r
28 S2G3CUlrstFLaF1xK/uBEdpaYXh6RqWSdqFcuDVE31nNiSqjROHeOh3+aYiQcRd0hkFE
\r
29 wjrm6SszLiTVlDaFJL4y3lKNsx7XNl0iRXjcTfYhNJ+3fhy5cofRRqCrnbB422YXOoi0
\r
30 lfLHb9rbftwPOdUlAXNP3dZP3k2bx/Ag1ct8sO0FUKj1tOcg5L6aMQ+HCKddJGKPMagk
\r
31 cMEshahndrhQp5qg1nLfgsHIBNmKBJf5jLchZkpT1jmzqTN2tp/iJp9G3uJv+CObhopQ
\r
33 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
34 d=1e100.net; s=20130820;
\r
35 h=x-gm-message-state:from:to:cc:subject:date:message-id;
\r
36 bh=gTA4HllegNCu2L0ydg4xINdI+VnfmxpVrbUzRT5HHBo=;
\r
37 b=P9SONMWuYHPCg0P95R1S4oXMgEbkLTJFmVrW3wKby/EyuPKhTGY0r0fkgGCqCaqSOc
\r
38 /5zKjGDJSjXi3QaX1JFXfQZo81YYvIvSGOjUJYY8XmMuub8i3LbxlGiXo5SDOhzk/Enq
\r
39 nm+tH9Q9lda8hPvJQLWOofcprFmeD/U+4MCI0bB7hbaw7MUMEqjZ8US2roZowYQE8dck
\r
40 Zi1c7BplzEUZcU7Ufw97pcrDpfbYXdn/QKqCCHFu+5fAXBWxQVLRGO4ehUgkhjRc2piH
\r
41 pcCtzmeLyzX50XKjhnKb1QcZMF1cU+DAKX4CXW26FpfOZvBYoqaIjdI9CUHx6/CvD8mA
\r
44 AOPr4FWc7BKHLlTnPoDGqGr6F9HCyKEtgRtepaWdPkeMwPBWF4rlKdWs3nmNVv+G/VkpCw==
\r
45 X-Received: by 10.194.144.10 with SMTP id si10mr22992574wjb.180.1460748634560;
\r
46 Fri, 15 Apr 2016 12:30:34 -0700 (PDT)
\r
47 Received: from localhost (mobile-access-bcee7f-102.dhcp.inet.fi.
\r
49 by smtp.gmail.com with ESMTPSA id i5sm50411782wjx.15.2016.04.15.12.30.33
\r
50 (version=TLSv1/SSLv3 cipher=OTHER);
\r
51 Fri, 15 Apr 2016 12:30:33 -0700 (PDT)
\r
52 From: Jani Nikula <jani@nikula.org>
\r
53 To: notmuch@notmuchmail.org
\r
54 Subject: [RFC PATCH 0/5] cli: notmuch new scandir rework
\r
55 Date: Fri, 15 Apr 2016 22:29:14 +0300
\r
56 Message-Id: <cover.1460748142.git.jani@nikula.org>
\r
57 X-Mailer: git-send-email 2.1.4
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.20
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Fri, 15 Apr 2016 19:30:46 -0000
\r
72 David gave some feedback to my old series to add globbing to new.ignore
\r
73 [1]. One thing that annoyed me in that series was that we have to do the
\r
74 ignore check in several places. I thought it would be nice to use the
\r
75 filter parameter to scandir(3) but alas you can't pass a context
\r
78 I ended up experimenting with that, and here's the result. Maybe this
\r
79 makes it easier to read and understand the add_files() function, and
\r
80 this centralizes the new.ignore handling, but is this really worth it?
\r
83 Patch 1 is trivial and should be pushed no matter what.
\r
89 [1] id:871t6efgdt.fsf@maritornes.cs.unb.ca
\r
92 cli: remove leftover dir variable
\r
93 cli: drop inode sort order on directories unknown to the database
\r
94 util: add a homebrew scandir implementation
\r
95 cli: use homebrew scandir in notmuch new add_files
\r
96 cli: convert count_files to new scandir
\r
98 notmuch-new.c | 382 ++++++++++++++++++++++++++++------------------------
\r
99 util/Makefile.local | 2 +-
\r
100 util/scandir.c | 87 ++++++++++++
\r
101 util/scandir.h | 11 ++
\r
102 4 files changed, 305 insertions(+), 177 deletions(-)
\r
103 create mode 100644 util/scandir.c
\r
104 create mode 100644 util/scandir.h
\r