diff options
| author | David Bremner <david@tethera.net> | 2021-08-24 08:17:10 -0700 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-09-04 17:07:19 -0700 |
| commit | d447b694b498c3e18a22f1eb15139a798c6aab26 (patch) | |
| tree | 7cc9c4f01f7a91da530743ec3a25441f38b9732e /notmuch-insert.c | |
| parent | 005c6201184c539d23d076303bd360bdba412e48 (diff) | |
CLI: make variable n_requested_db_uuid file scope.
It turns out that now that we pass an open database into the
subcommands, it is easy to check any requested uuid against the
database at the same time as we process the other shared
arguments. This results in overall less boilerplate code, as well as
making a CLI scope function and variable file scope in notmuch.c.
Diffstat (limited to 'notmuch-insert.c')
| -rw-r--r-- | notmuch-insert.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/notmuch-insert.c b/notmuch-insert.c index e3d87e4a..72e2e35f 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -478,7 +478,7 @@ notmuch_insert_command (notmuch_database_t *notmuch, int argc, char *argv[]) if (opt_index < 0) return EXIT_FAILURE; - notmuch_process_shared_options (argv[0]); + notmuch_process_shared_options (notmuch, argv[0]); mail_root = notmuch_config_get (notmuch, NOTMUCH_CONFIG_MAIL_ROOT); @@ -550,8 +550,6 @@ notmuch_insert_command (notmuch_database_t *notmuch, int argc, char *argv[]) return EXIT_FAILURE; } - notmuch_exit_if_unmatched_db_uuid (notmuch); - status = notmuch_process_shared_indexing_options (notmuch); if (status != NOTMUCH_STATUS_SUCCESS) { fprintf (stderr, "Error: Failed to process index options. (%s)\n", |
