const char *db_path;
const char *mail_root;
+ notmuch_indexopts_t *indexopts;
int output_is_a_tty;
enum verbosity verbosity;
bool debug;
if (status)
goto DONE;
- status = notmuch_database_index_file (notmuch, filename, indexing_cli_choices.opts, &message);
+ status = notmuch_database_index_file (notmuch, filename, state->indexopts, &message);
switch (status) {
/* Success. */
case NOTMUCH_STATUS_SUCCESS:
else if (verbose)
add_files_state.verbosity = VERBOSITY_VERBOSE;
+ add_files_state.indexopts = notmuch_database_get_default_indexopts (notmuch);
+
add_files_state.new_tags = notmuch_config_get_values (notmuch, NOTMUCH_CONFIG_NEW_TAGS);
if (print_status_database (
if (notmuch == NULL)
return EXIT_FAILURE;
- status = notmuch_process_shared_indexing_options (notmuch);
+ status = notmuch_process_shared_indexing_options (add_files_state.indexopts);
if (status != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "Error: Failed to process index options. (%s)\n",
notmuch_status_to_string (status));