X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-insert.c;h=48490b51deb26c315bae42b9a7591c828d7c45a7;hp=4d6b0a7fba2feb66d7d8ae3de5ca77cf5aa0bfce;hb=e29ec5f0e9d36a8ccf335b30554408d4b6cbbc28;hpb=c5356b9ed56e42d36ca18206155b62c94cfbd79d diff --git a/notmuch-insert.c b/notmuch-insert.c index 4d6b0a7f..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; @@ -464,10 +464,10 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[]) unsigned int i; notmuch_opt_desc_t options[] = { - { .opt_string = &folder, .name = "folder" }, + { .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"); }