diff options
author | David Bremner <david@tethera.net> | 2015-04-06 07:39:55 +0900 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2015-08-14 18:23:49 +0200 |
commit | f76d8f82dd004cf14426a91e8a80dcd2a4b97317 (patch) | |
tree | b2a08fb89242d809d095665a84ff75c6d7d142e3 /notmuch-compact.c | |
parent | 5a3b42fb8c556397841b86c5fda1c4554dab253a (diff) |
cli: add global option "--uuid"
The function notmuch_exit_if_unmatched_db_uuid is split from
notmuch_process_shared_options because it needs an open notmuch
database.
There are two exceptional cases in uuid handling.
1) notmuch config and notmuch setup don't currently open the database,
so it doesn't make sense to check the UUID.
2) notmuch compact opens the database inside the library, so we either
need to open the database just to check uuid, or change the API.
Diffstat (limited to 'notmuch-compact.c')
-rw-r--r-- | notmuch-compact.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/notmuch-compact.c b/notmuch-compact.c index 5be551d4..93737216 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@ -46,6 +46,11 @@ notmuch_compact_command (notmuch_config_t *config, int argc, char *argv[]) if (opt_index < 0) return EXIT_FAILURE; + if (notmuch_requested_db_uuid) { + fprintf (stderr, "Error: --uuid not implemented for compact\n"); + return EXIT_FAILURE; + } + notmuch_process_shared_options (argv[0]); if (! quiet) |