* fix some confusion between --reindex and --rebuild (remove the former)

This commit is contained in:
djcb
2013-04-21 23:10:40 +03:00
parent 42807a3a01
commit 094979ab68
4 changed files with 7 additions and 18 deletions

View File

@ -197,7 +197,6 @@ database_version_check_and_update (MuStore *store, MuConfig *opts,
/* when rebuilding, we empty the database before doing
* anything */
if (opts->rebuild) {
opts->reindex = TRUE;
g_debug ("clearing database");
g_debug ("clearing contacts-cache");
return mu_store_clear (store, err);
@ -208,7 +207,6 @@ database_version_check_and_update (MuStore *store, MuConfig *opts,
/* ok, database is not up to date */
if (opts->autoupgrade) {
opts->reindex = TRUE;
g_debug ("auto-upgrade: clearing old database and cache");
return mu_store_clear (store, err);
}
@ -319,7 +317,7 @@ cmd_index (MuIndex *midx, MuConfig *opts, MuIndexStats *stats, GError **err)
show_progress = !opts->quiet && isatty(fileno(stdout));
idata.color = !opts->nocolor;
newline_before_on();
rv = mu_index_run (midx, opts->maildir, opts->reindex, stats,
rv = mu_index_run (midx, opts->maildir, opts->rebuild, stats,
show_progress ?
(MuIndexMsgCallback)index_msg_cb :
(MuIndexMsgCallback)index_msg_silent_cb,

View File

@ -146,8 +146,6 @@ config_options_group_index (void)
GOptionEntry entries[] = {
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &MU_CONFIG.maildir,
"top of the maildir", "<maildir>"},
{"reindex", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.reindex,
"index even already indexed messages (false)", NULL},
{"rebuild", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.rebuild,
"rebuild the database from scratch (false)", NULL},
{"my-address", 0, 0, G_OPTION_ARG_STRING_ARRAY,

View File

@ -109,7 +109,6 @@ struct _MuConfig {
/* options for indexing */
gchar *maildir; /* where the mails are */
gboolean nocleanup; /* don't cleanup del'd mails from db */
gboolean reindex; /* re-index existing mails */
gboolean rebuild; /* empty the database before indexing */
gboolean autoupgrade; /* automatically upgrade db
* when needed */