config: add message-size, batch-size option for init

This commit is contained in:
Dirk-Jan C. Binnema 2020-06-27 11:36:34 +03:00
parent c8e8004f29
commit 63a8c72b74
2 changed files with 14 additions and 5 deletions

View File

@ -144,10 +144,17 @@ config_options_group_init (void)
{"my-address", 0, 0, G_OPTION_ARG_STRING_ARRAY,
&MU_CONFIG.my_addresses, "my e-mail address; can be used multiple times",
"<address>"},
{"max-message-size", 0, 0, G_OPTION_ARG_INT,
&MU_CONFIG.max_msg_size, "Maximum allowed size for messages",
"<size-in-bytes>"},
{"batch-size", 0, 0, G_OPTION_ARG_INT,
&MU_CONFIG.max_msg_size,
"Number of changes in a database transaction batch",
"<number>"},
{NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL}
};
og = g_option_group_new("init", "Options for the 'index' command",
og = g_option_group_new("init", "Options for the 'init' command",
"", NULL, NULL);
g_option_group_add_entries(og, entries);

View File

@ -109,16 +109,18 @@ struct _MuConfig {
/* options for init */
gchar *maildir; /* where the mails are */
char** my_addresses; /* 'my e-mail address', for mu
* cfind; can be use multiple
* times */
char** my_addresses; /* 'my e-mail address', for mu cfind;
* can be use multiple times */
int max_msg_size; /* maximum size for message files */
int batch_size; /* database transaction batch size */
/* options for indexing */
gboolean nocleanup; /* don't cleanup del'd mails from db */
gboolean rebuild; /* empty the database before indexing */
gboolean lazycheck; /* don't check dirs with up-to-date
* timestamps */
int max_msg_size; /* maximum size for message files */
/* options for querying 'find' (and view-> 'summary') */
gchar *fields; /* fields to show in output */