[PATCH 0/3] Introduce the add command

Subject: [PATCH 0/3] Introduce the add command

Date: Sat, 13 Jul 2013 18:45:43 -0600

To: notmuch@notmuchmail.org

Cc:

From: Adam Wolfe Gordon


Hi everyone,

The recent introduction of insert inspired me to finally add a feature I've
been wanting: a command to index a specific file in the maildir. My usecase
for this is that I have an inotify-based script that watches for new mail
and calls notmuch new when new mail shows up. Running notmuch new in this
situation is overkill, since I know exactly what's changed. A faster command
that just adds a single file reduces contention on the database lock.

This series introduces a new command, "notmuch add", which indexes a file
that already exists in the maildir. It is implemented in notmuch-insert.c
because it uses the basic infrastructure introduced for the insert command.

Missing man page for now - wanted to get the code out first for review.

-- Adam

Adam Wolfe Gordon (3):
  cli: Return an error code from add_message_to_database
  cli: Introduce the add command
  test: Add simple tests for the add command

 notmuch-client.h |    3 +++
 notmuch-insert.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 notmuch.c        |    2 ++
 test/insert      |   35 +++++++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+), 3 deletions(-)

-- 
1.7.9.5


Thread: