diff options
| author | David Bremner <david@tethera.net> | 2021-06-12 10:26:17 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-10-23 09:51:50 -0300 |
| commit | 2ce6c76a61c907b5d1d508e12255e83d9256937c (patch) | |
| tree | fcb1e35acb341eeaccfdd387fe214b5ba8dab9e6 /notmuch-reindex.c | |
| parent | c128c995bc3e7474d4086af7e2066f60f54329b2 (diff) | |
CLI: move indexopts variable out of shared options block
This reduces the amount of global state. Furthermore, index options
can be set (in principle) in several ways, not just in the one
function for processing indexing command line options.
Diffstat (limited to 'notmuch-reindex.c')
| -rw-r--r-- | notmuch-reindex.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/notmuch-reindex.c b/notmuch-reindex.c index 49eacd47..e9a65456 100644 --- a/notmuch-reindex.c +++ b/notmuch-reindex.c @@ -90,6 +90,7 @@ notmuch_reindex_command (notmuch_database_t *notmuch, int argc, char *argv[]) int opt_index; int ret; notmuch_status_t status; + notmuch_indexopts_t *indexopts = notmuch_database_get_default_indexopts (notmuch); /* Set up our handler for SIGINT */ memset (&action, 0, sizeof (struct sigaction)); @@ -110,7 +111,7 @@ notmuch_reindex_command (notmuch_database_t *notmuch, int argc, char *argv[]) notmuch_process_shared_options (notmuch, argv[0]); - status = notmuch_process_shared_indexing_options (notmuch); + status = notmuch_process_shared_indexing_options (indexopts); if (status != NOTMUCH_STATUS_SUCCESS) { fprintf (stderr, "Error: Failed to process index options. (%s)\n", notmuch_status_to_string (status)); @@ -128,7 +129,7 @@ notmuch_reindex_command (notmuch_database_t *notmuch, int argc, char *argv[]) return EXIT_FAILURE; } - ret = reindex_query (notmuch, query_string, indexing_cli_choices.opts); + ret = reindex_query (notmuch, query_string, indexopts); notmuch_database_destroy (notmuch); |
