diff options
author | David Bremner <david@tethera.net> | 2017-02-18 11:08:04 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2017-03-22 08:47:13 -0300 |
commit | 242d5a3ed5ed85bb935c8ed4a4678d7596d8534d (patch) | |
tree | 19dd13df847db2aa51a6b17eaef77264524d4002 /notmuch-search.c | |
parent | 3721bd45d72e50436ee760b03ae533d49bbb8724 (diff) |
lib: make notmuch_query_add_tag_exclude return a status value
Since this is an ABI breaking change, but we already bumped the SONAME
for the next release
Diffstat (limited to 'notmuch-search.c')
-rw-r--r-- | notmuch-search.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/notmuch-search.c b/notmuch-search.c index 30722e86..019e14ee 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -735,11 +735,19 @@ _notmuch_search_prepare (search_context_t *ctx, notmuch_config_t *config, int ar if (ctx->exclude != NOTMUCH_EXCLUDE_FALSE) { const char **search_exclude_tags; size_t search_exclude_tags_length; + notmuch_status_t status; search_exclude_tags = notmuch_config_get_search_exclude_tags (config, &search_exclude_tags_length); - for (i = 0; i < search_exclude_tags_length; i++) - notmuch_query_add_tag_exclude (ctx->query, search_exclude_tags[i]); + + for (i = 0; i < search_exclude_tags_length; i++) { + status = notmuch_query_add_tag_exclude (ctx->query, search_exclude_tags[i]); + if (status && status != NOTMUCH_STATUS_IGNORED) { + print_status_query ("notmuch search", ctx->query, status); + return EXIT_FAILURE; + } + } + notmuch_query_set_omit_excluded (ctx->query, ctx->exclude); } |