diff options
| author | Jani Nikula <jani@nikula.org> | 2017-10-14 16:16:07 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-12-13 08:28:37 -0400 |
| commit | e29ec5f0e9d36a8ccf335b30554408d4b6cbbc28 (patch) | |
| tree | 98a91b4ce88fc4af4fa4d970a73bd693f22ad264 /notmuch-insert.c | |
| parent | 39abd3b5226fef99de1adaa2e8f6b1ba8480c5f5 (diff) | |
cli: use the negating boolean support for new and insert --no-hooks
This lets us use the positive hooks variable in code, increasing
clarity.
Diffstat (limited to 'notmuch-insert.c')
| -rw-r--r-- | notmuch-insert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/notmuch-insert.c b/notmuch-insert.c index bb835ba9..48490b51 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -456,7 +456,7 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[]) const char *folder = ""; bool create_folder = false; bool keep = false; - bool no_hooks = false; + bool hooks = true; bool synchronize_flags; char *maildir; char *newpath; @@ -467,7 +467,7 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[]) { .opt_string = &folder, .name = "folder", .allow_empty = true }, { .opt_bool = &create_folder, .name = "create-folder" }, { .opt_bool = &keep, .name = "keep" }, - { .opt_bool = &no_hooks, .name = "no-hooks" }, + { .opt_bool = &hooks, .name = "hooks" }, { .opt_inherit = notmuch_shared_indexing_options }, { .opt_inherit = notmuch_shared_options }, { } @@ -581,7 +581,7 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[]) } } - if (! no_hooks && status == NOTMUCH_STATUS_SUCCESS) { + if (hooks && status == NOTMUCH_STATUS_SUCCESS) { /* Ignore hook failures. */ notmuch_run_hook (db_path, "post-insert"); } |
