[RFC PATCH 0/5] cli: notmuch new scandir rework
Jani Nikula
jani at nikula.org
Fri Apr 15 12:29:14 PDT 2016
David gave some feedback to my old series to add globbing to new.ignore
[1]. One thing that annoyed me in that series was that we have to do the
ignore check in several places. I thought it would be nice to use the
filter parameter to scandir(3) but alas you can't pass a context
parameter there.
I ended up experimenting with that, and here's the result. Maybe this
makes it easier to read and understand the add_files() function, and
this centralizes the new.ignore handling, but is this really worth it?
I'm unsure.
Patch 1 is trivial and should be pushed no matter what.
BR,
Jani.
[1] id:871t6efgdt.fsf at maritornes.cs.unb.ca
Jani Nikula (5):
cli: remove leftover dir variable
cli: drop inode sort order on directories unknown to the database
util: add a homebrew scandir implementation
cli: use homebrew scandir in notmuch new add_files
cli: convert count_files to new scandir
notmuch-new.c | 382 ++++++++++++++++++++++++++++------------------------
util/Makefile.local | 2 +-
util/scandir.c | 87 ++++++++++++
util/scandir.h | 11 ++
4 files changed, 305 insertions(+), 177 deletions(-)
create mode 100644 util/scandir.c
create mode 100644 util/scandir.h
--
2.1.4
More information about the notmuch
mailing list