summaryrefslogtreecommitdiffstats
path: root/notmuch-reindex.c
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-24 08:17:43 -0700
committerDavid Bremner <david@tethera.net>2021-09-04 17:07:19 -0700
commit2944d5913319056dfec5c23065932fd1c87a96f6 (patch)
treeb4f7711a7ee1cbb46f54dd2a4a711ebff2bb5472 /notmuch-reindex.c
parenta2e7af5b6986bca5a2bb2752f892cb86a9767b3c (diff)
CLI/{count, dump, reindex, reply, show}: enable sexp queries
The change in each case is to call notmuch_query_create_with_syntax, relying on the already inherited shared options. As a bonus we get improved error handling from the new query creation API. The remaining subcommand is 'tag', which is a bit trickier.
Diffstat (limited to 'notmuch-reindex.c')
-rw-r--r--notmuch-reindex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/notmuch-reindex.c b/notmuch-reindex.c
index b40edbb6..49eacd47 100644
--- a/notmuch-reindex.c
+++ b/notmuch-reindex.c
@@ -49,11 +49,11 @@ reindex_query (notmuch_database_t *notmuch, const char *query_string,
notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
- query = notmuch_query_create (notmuch, query_string);
- if (query == NULL) {
- fprintf (stderr, "Out of memory.\n");
+ status = notmuch_query_create_with_syntax (notmuch, query_string,
+ shared_option_query_syntax (),
+ &query);
+ if (print_status_database ("notmuch reindex", notmuch, status))
return 1;
- }
/* reindexing is not interested in any special sort order */
notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED);