mirror of https://github.com/djcb/mu.git
* fix some confusion between --reindex and --rebuild (remove the former)
This commit is contained in:
parent
42807a3a01
commit
094979ab68
|
@ -76,24 +76,18 @@ found in the address fields of a message which also has
|
||||||
(\fBmu cfind --personal\fR) addresses which were merely seen in mailing list
|
(\fBmu cfind --personal\fR) addresses which were merely seen in mailing list
|
||||||
messages.
|
messages.
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-reindex\fR re-index all mails, even ones that are already in the
|
|
||||||
database.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-nocleanup\fR
|
\fB\-\-nocleanup\fR
|
||||||
disables the database cleanup that \fBmu\fR does by default after indexing.
|
disables the database cleanup that \fBmu\fR does by default after indexing.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-rebuild\fR
|
\fB\-\-rebuild\fR
|
||||||
clear all messages from the database before
|
clear all messages from the database before indexing. \fB\-\-rebuild\fR
|
||||||
indexing. This is effectively the same as removing the database. The
|
guarantees that after the indexing has finished, there are no 'old' messages
|
||||||
difference with \fB\-\-reindex\fR is that \fB\-\-rebuild\fR guarantees that
|
in the database anymore, which is not true with \fB\-\-reindex\fR when
|
||||||
after the indexing has finished, there are no 'old' messages in the database
|
indexing only a part of messages (using \fB\-\-maildir\fR). For this reason,
|
||||||
anymore, which is not true with \fB\-\-reindex\fR when indexing only a part of
|
it is necessary to run \fBmu index \-\-rebuild\fR when there is an upgrade in
|
||||||
messages (using \fB\-\-maildir\fR). For this reason, it is necessary to run
|
the database format. \fBmu index\fR will issue a warning about this.
|
||||||
\fBmu index \-\-rebuild\fR when there is an upgrade in the database
|
|
||||||
format. \fBmu index\fR will issue a warning about this.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-autoupgrade\fR
|
\fB\-\-autoupgrade\fR
|
||||||
|
|
|
@ -197,7 +197,6 @@ database_version_check_and_update (MuStore *store, MuConfig *opts,
|
||||||
/* when rebuilding, we empty the database before doing
|
/* when rebuilding, we empty the database before doing
|
||||||
* anything */
|
* anything */
|
||||||
if (opts->rebuild) {
|
if (opts->rebuild) {
|
||||||
opts->reindex = TRUE;
|
|
||||||
g_debug ("clearing database");
|
g_debug ("clearing database");
|
||||||
g_debug ("clearing contacts-cache");
|
g_debug ("clearing contacts-cache");
|
||||||
return mu_store_clear (store, err);
|
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 */
|
/* ok, database is not up to date */
|
||||||
if (opts->autoupgrade) {
|
if (opts->autoupgrade) {
|
||||||
opts->reindex = TRUE;
|
|
||||||
g_debug ("auto-upgrade: clearing old database and cache");
|
g_debug ("auto-upgrade: clearing old database and cache");
|
||||||
return mu_store_clear (store, err);
|
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));
|
show_progress = !opts->quiet && isatty(fileno(stdout));
|
||||||
idata.color = !opts->nocolor;
|
idata.color = !opts->nocolor;
|
||||||
newline_before_on();
|
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 ?
|
show_progress ?
|
||||||
(MuIndexMsgCallback)index_msg_cb :
|
(MuIndexMsgCallback)index_msg_cb :
|
||||||
(MuIndexMsgCallback)index_msg_silent_cb,
|
(MuIndexMsgCallback)index_msg_silent_cb,
|
||||||
|
|
|
@ -146,8 +146,6 @@ config_options_group_index (void)
|
||||||
GOptionEntry entries[] = {
|
GOptionEntry entries[] = {
|
||||||
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &MU_CONFIG.maildir,
|
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &MU_CONFIG.maildir,
|
||||||
"top of the maildir", "<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", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.rebuild,
|
||||||
"rebuild the database from scratch (false)", NULL},
|
"rebuild the database from scratch (false)", NULL},
|
||||||
{"my-address", 0, 0, G_OPTION_ARG_STRING_ARRAY,
|
{"my-address", 0, 0, G_OPTION_ARG_STRING_ARRAY,
|
||||||
|
|
|
@ -109,7 +109,6 @@ struct _MuConfig {
|
||||||
/* options for indexing */
|
/* options for indexing */
|
||||||
gchar *maildir; /* where the mails are */
|
gchar *maildir; /* where the mails are */
|
||||||
gboolean nocleanup; /* don't cleanup del'd mails from db */
|
gboolean nocleanup; /* don't cleanup del'd mails from db */
|
||||||
gboolean reindex; /* re-index existing mails */
|
|
||||||
gboolean rebuild; /* empty the database before indexing */
|
gboolean rebuild; /* empty the database before indexing */
|
||||||
gboolean autoupgrade; /* automatically upgrade db
|
gboolean autoupgrade; /* automatically upgrade db
|
||||||
* when needed */
|
* when needed */
|
||||||
|
|
Loading…
Reference in New Issue